PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 1ms

/Scenes/Tests/ToolTipTests.cs

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