PageRenderTime 56ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/Scenes/Tests/ToolTipTests.cs

#
C# | 45 lines | 27 code | 5 blank | 13 comment | 0 complexity | 65961be36e48ef972e17c4de93c44e44 MD5 | raw file
Possible License(s): Apache-2.0
  1. using Delta.Engine;
  2. using Delta.Scenes.UserInterfaces;
  3. using Delta.Scenes.UserInterfaces.Controls;
  4. using Delta.Utilities.Datatypes;
  5. using NUnit.Framework;
  6. namespace Delta.Scenes.Tests
  7. {
  8. /// <summary>
  9. /// Tool tip popup tests
  10. /// </summary>
  11. public class ToolTipPopupTests
  12. {
  13. #region ShowToolTip (LongRunning)
  14. /// <summary>
  15. /// Show tool tip
  16. /// </summary>
  17. [Test, Category("Visual")]
  18. public static void ShowToolTip()
  19. {
  20. Button anyControl = new Button
  21. {
  22. LocalArea = Rectangle.FromCenter(Point.Half, new Size(0.3f, 0.1f)),
  23. Text = "SampleButton",
  24. ToolTipText = "SampleButton ToolTip",
  25. };
  26. //anyControl.ToolTip = new ToolTipPopup
  27. //{
  28. // MinWaitTime = 1.0f,
  29. // Text = anyControl.Text + " ToolTip",
  30. //};
  31. Screen testScene = new Screen();
  32. testScene.Add(anyControl);
  33. // Open now the scene to "activate" for the test
  34. testScene.Open();
  35. //Settings.ShowUIDebugInfo = true;
  36. Application.Start();
  37. }
  38. #endregion
  39. }
  40. }