public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (new Padding (0), epp.DefaultMargin, "C1");
			Assert.AreEqual (new Padding (0), epp.DefaultPadding, "C2");
		}
Ejemplo n.º 2
0
        public void ProtectedProperties()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            Assert.AreEqual(new Padding(1, 0, 1, 0), epp.DefaultMargin, "C1");
            Assert.AreEqual(new Size(100, 22), epp.DefaultSize, "C2");
        }
Ejemplo n.º 3
0
        public void MethodCreateParams()
        {
            ExposeProtectedProperties uc = new ExposeProtectedProperties();

            Assert.AreEqual(WindowStyles.WS_TILED | WindowStyles.WS_MAXIMIZEBOX | WindowStyles.WS_CLIPCHILDREN | WindowStyles.WS_CLIPSIBLINGS | WindowStyles.WS_VISIBLE | WindowStyles.WS_CHILD, (WindowStyles)uc.CreateParams.Style, "D1");
            Assert.AreEqual(WindowExStyles.WS_EX_CONTROLPARENT, (WindowExStyles)uc.CreateParams.ExStyle, "D2");
        }
Ejemplo n.º 4
0
        public void ProtectedProperties()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            Assert.AreEqual(new Padding(0), epp.DefaultMargin, "C1");
            Assert.AreEqual(new Padding(0), epp.DefaultPadding, "C2");
        }
Ejemplo n.º 5
0
		public void MethodCreateParams ()
		{
			ExposeProtectedProperties uc = new ExposeProtectedProperties ();

			Assert.AreEqual (WindowStyles.WS_TILED | WindowStyles.WS_MAXIMIZEBOX | WindowStyles.WS_CLIPCHILDREN | WindowStyles.WS_CLIPSIBLINGS | WindowStyles.WS_VISIBLE | WindowStyles.WS_CHILD, (WindowStyles)uc.CreateParams.Style, "D1");
			Assert.AreEqual (WindowExStyles.WS_EX_CONTROLPARENT, (WindowExStyles)uc.CreateParams.ExStyle, "D2");
		}
		public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (new Padding (1, 2, 1, 1), epp.DefaultMargin, "C1");
			Assert.AreEqual (new Size (100, 15), epp.DefaultSize, "C2");
		}
Ejemplo n.º 7
0
		public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (DockStyle.Bottom, epp.DefaultDock, "C1");
			Assert.AreEqual (new Padding (1, 0, 14, 0), epp.DefaultPadding, "C2");
			Assert.AreEqual (false, epp.DefaultShowItemToolTips, "C3");
			Assert.AreEqual (new Size (200, 22), epp.DefaultSize, "C4");
		}
Ejemplo n.º 8
0
		public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (new Padding (2, 2, 0, 2), epp.DefaultGripMargin, "C1");
			Assert.AreEqual (new Padding (6, 2, 0, 2), epp.DefaultPadding, "C2");
			Assert.AreEqual (false, epp.DefaultShowItemToolTips, "C3");
			Assert.AreEqual (new Size (200, 24), epp.DefaultSize, "C4");
		}
        public void ProtectedProperties()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            Assert.AreEqual(DockStyle.Bottom, epp.DefaultDock, "C1");
            Assert.AreEqual(new Padding(1, 0, 14, 0), epp.DefaultPadding, "C2");
            Assert.AreEqual(false, epp.DefaultShowItemToolTips, "C3");
            Assert.AreEqual(new Size(200, 22), epp.DefaultSize, "C4");
        }
Ejemplo n.º 10
0
        public void ProtectedProperties()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            Assert.AreEqual(new Padding(2, 2, 0, 2), epp.DefaultGripMargin, "C1");
            Assert.AreEqual(new Padding(6, 2, 0, 2), epp.DefaultPadding, "C2");
            Assert.AreEqual(false, epp.DefaultShowItemToolTips, "C3");
            Assert.AreEqual(new Size(200, 24), epp.DefaultSize, "C4");
        }
Ejemplo n.º 11
0
        public void MethodCreateLayoutSettings()
        {
            ExposeProtectedProperties ts = new ExposeProtectedProperties();

            Assert.AreEqual("System.Windows.Forms.FlowLayoutSettings", ts.PublicCreateLayoutSettings(ToolStripLayoutStyle.Flow).ToString(), "A1");
            Assert.AreEqual(null, ts.PublicCreateLayoutSettings(ToolStripLayoutStyle.HorizontalStackWithOverflow), "A2");
            Assert.AreEqual(null, ts.PublicCreateLayoutSettings(ToolStripLayoutStyle.StackWithOverflow), "A3");
            //Assert.AreEqual ("System.Windows.Forms.TableLayoutSettings", ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.Table).ToString (), "A4");
            Assert.AreEqual(null, ts.PublicCreateLayoutSettings(ToolStripLayoutStyle.VerticalStackWithOverflow), "A5");
        }
Ejemplo n.º 12
0
        public void PropertyDefaultSize()
        {
            VariableSizeControl       c   = new VariableSizeControl();
            ExposeProtectedProperties epp = new ExposeProtectedProperties(c);

            Assert.AreEqual(new Size(-1, -1), epp.DefaultSize, "#A1");

            c.Size = new Size(666, 666);
            Assert.AreEqual(new Size(666, 666), c.Size, "#B99");
            Assert.AreEqual(new Size(666, 666), epp.DefaultSize, "#B1");
        }
Ejemplo n.º 13
0
		public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (false, epp.DefaultAutoToolTip, "C1");
			Assert.AreEqual (ToolStripItemDisplayStyle.ImageAndText, epp.DefaultDisplayStyle, "C2");
			Assert.AreEqual (new Padding (0,1,0,2), epp.DefaultMargin, "C3");
			Assert.AreEqual (new Padding (0), epp.DefaultPadding, "C4");
			Assert.AreEqual (new Size (23, 23), epp.DefaultSize, "C5");
			Assert.AreEqual (true, epp.DismissWhenClicked, "C6");
			Assert.AreEqual (null, epp.Parent, "C7");
			Assert.AreEqual (false, epp.ShowKeyboardCues, "C8");
		}
Ejemplo n.º 14
0
        public void ProtectedProperties()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            Assert.AreEqual(WindowStyles.WS_TILED | WindowStyles.WS_CLIPCHILDREN | WindowStyles.WS_POPUP, (WindowStyles)epp.CreateParams.Style, "C1");
            // This makes no sense
            // Assert.AreEqual (WindowExStyles.WS_EX_CONTROLPARENT, (WindowExStyles)epp.CreateParams.ExStyle, "C2");
            Assert.AreEqual(DockStyle.None, epp.DefaultDock, "C3");
            Assert.AreEqual(new Padding(1, 2, 1, 2), epp.DefaultPadding, "C4");
            Assert.AreEqual(true, epp.DefaultShowItemToolTips, "C5");
            // Dependent on monitor resolution
            // Assert.AreEqual (new Size (1678, 1016), epp.MaxItemSize, "C6");
            Assert.AreEqual(true, epp.TopMost, "C7");
        }
Ejemplo n.º 15
0
		public void ControlStyle ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			ControlStyles cs = ControlStyles.ContainerControl;
			cs |= ControlStyles.UserPaint;
			cs |= ControlStyles.StandardClick;
			cs |= ControlStyles.SupportsTransparentBackColor;
			cs |= ControlStyles.StandardDoubleClick;
			cs |= ControlStyles.AllPaintingInWmPaint;
			cs |= ControlStyles.OptimizedDoubleBuffer;
			cs |= ControlStyles.UseTextForAccessibility;

			Assert.AreEqual (cs, epp.GetControlStyles (), "Styles");
		}
Ejemplo n.º 16
0
        public void ControlStyle()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            ControlStyles cs = ControlStyles.ContainerControl;

            cs |= ControlStyles.UserPaint;
            cs |= ControlStyles.StandardClick;
            cs |= ControlStyles.SupportsTransparentBackColor;
            cs |= ControlStyles.StandardDoubleClick;
            cs |= ControlStyles.AllPaintingInWmPaint;
            cs |= ControlStyles.OptimizedDoubleBuffer;
            cs |= ControlStyles.UseTextForAccessibility;

            Assert.AreEqual(cs, epp.GetControlStyles(), "Styles");
        }
        public void ControlStyle()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            ControlStyles cs = ControlStyles.ContainerControl;

            cs |= ControlStyles.UserPaint;
            cs |= ControlStyles.StandardClick;
            cs |= ControlStyles.SupportsTransparentBackColor;
            cs |= ControlStyles.StandardDoubleClick;
            cs |= ControlStyles.Selectable;
            cs |= ControlStyles.ResizeRedraw;
            cs |= ControlStyles.UseTextForAccessibility;

            Assert.AreEqual(cs, epp.GetControlStyles(), "Styles");
        }
Ejemplo n.º 18
0
        public void ProtectedProperties()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            Assert.AreEqual(DockStyle.Top, epp.DefaultDock, "C1");
            Assert.AreEqual(new Padding(2), epp.DefaultGripMargin, "C2");
            Assert.AreEqual(new Padding(0), epp.DefaultMargin, "C3");
            Assert.AreEqual(new Padding(0, 0, 1, 0), epp.DefaultPadding, "C4");
            Assert.AreEqual(true, epp.DefaultShowItemToolTips, "C5");
            Assert.AreEqual(new Size(100, 25), epp.DefaultSize, "C6");
            Assert.AreEqual(new Size(92, 25), epp.MaxItemSize, "C7");

            epp.Size = new Size(300, 100);
            Assert.AreEqual(new Size(292, 100), epp.MaxItemSize, "C8");

            epp.GripStyle = ToolStripGripStyle.Hidden;
            Assert.AreEqual(new Size(299, 100), epp.MaxItemSize, "C9");
        }
Ejemplo n.º 19
0
        public void ControlStyle()
        {
            Form f = new Form();

            f.ShowInTaskbar = false;

            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            f.Controls.Add(epp);

            ControlStyles cs = ControlStyles.ContainerControl;

            cs |= ControlStyles.UserPaint;
            cs |= ControlStyles.StandardClick;
            cs |= ControlStyles.SupportsTransparentBackColor;
            cs |= ControlStyles.StandardDoubleClick;
            cs |= ControlStyles.AllPaintingInWmPaint;
            cs |= ControlStyles.OptimizedDoubleBuffer;
            cs |= ControlStyles.UseTextForAccessibility;

            Assert.AreEqual(cs, epp.GetControlStyles(), "Styles");

            epp.TabStop = true;

            cs |= ControlStyles.Selectable;

            Assert.AreEqual(cs, epp.GetControlStyles(), "Styles-2");

            epp.TabStop = false;

            cs &= ~ControlStyles.Selectable;

            Assert.AreEqual(cs, epp.GetControlStyles(), "Styles-3");

            f.Close();
            f.Dispose();
        }
Ejemplo n.º 20
0
		public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (false, epp.DefaultAutoToolTip, "C1");
			Assert.AreEqual (ToolStripItemDisplayStyle.ImageAndText, epp.DefaultDisplayStyle, "C2");
			Assert.AreEqual (new Padding (0,1,0,2), epp.DefaultMargin, "C3");
			Assert.AreEqual (new Padding (0), epp.DefaultPadding, "C4");
			Assert.AreEqual (new Size (23, 23), epp.DefaultSize, "C5");
			Assert.AreEqual (true, epp.DismissWhenClicked, "C6");
			Assert.AreEqual (null, epp.Parent, "C7");
			Assert.AreEqual (false, epp.ShowKeyboardCues, "C8");
		}
		public void PropertyDefaultSize ()
		{
			VariableSizeControl c = new VariableSizeControl ();
			ExposeProtectedProperties epp = new ExposeProtectedProperties (c);

			Assert.AreEqual (new Size (-1, -1), epp.DefaultSize, "#A1");

			c.Size = new Size (666, 666);
			Assert.AreEqual (new Size (666, 666), c.Size, "#B99");
			Assert.AreEqual (new Size (666, 666), epp.DefaultSize, "#B1");
		}
Ejemplo n.º 22
0
		public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (DockStyle.Top, epp.DefaultDock, "C1");
			Assert.AreEqual (new Padding (2), epp.DefaultGripMargin, "C2");
			Assert.AreEqual (new Padding (0), epp.DefaultMargin, "C3");
			Assert.AreEqual (new Padding (0,0,1,0), epp.DefaultPadding, "C4");
			Assert.AreEqual (true, epp.DefaultShowItemToolTips, "C5");
			Assert.AreEqual (new Size (100, 25), epp.DefaultSize, "C6");
			Assert.AreEqual (new Size (92, 25), epp.MaxItemSize, "C7");
			
			epp.Size = new Size (300, 100);
			Assert.AreEqual (new Size (292, 100), epp.MaxItemSize, "C8");
			
			epp.GripStyle = ToolStripGripStyle.Hidden;
			Assert.AreEqual (new Size (299, 100), epp.MaxItemSize, "C9");
		}
		public void MethodCreateControlsInstance ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual ("System.Windows.Forms.ToolStripPanel+ToolStripPanelControlCollection", epp.CreateControlsInstance (). GetType ().ToString (), "B1");
		}
Ejemplo n.º 24
0
		public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (true, epp.DefaultAutoToolTip, "C1");
		}
Ejemplo n.º 25
0
		public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (new Size (150, 175), epp.DefaultSize, "C1");
		}
Ejemplo n.º 26
0
		public void MethodIsInputKey ()
		{
			string result = string.Empty;
			string expected = "13;13;33;33;34;34;35;36;37;38;39;40;46;48;96;113;";

			ExposeProtectedProperties dgv = new ExposeProtectedProperties ();
		
			foreach (Keys k in Enum.GetValues (typeof (Keys)))
				if (dgv.PublicIsInputKey (k))
					result += ((int)k).ToString () + ";";

			Assert.AreEqual (expected, result, "A1");
		}
Ejemplo n.º 27
0
		public void ControlStyle ()
		{
			Form f = new Form ();
			f.ShowInTaskbar = false;
			
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();
			f.Controls.Add (epp);
			
			ControlStyles cs = ControlStyles.ContainerControl;
			cs |= ControlStyles.UserPaint;
			cs |= ControlStyles.StandardClick;
			cs |= ControlStyles.SupportsTransparentBackColor;
			cs |= ControlStyles.StandardDoubleClick;
			cs |= ControlStyles.AllPaintingInWmPaint;
			cs |= ControlStyles.OptimizedDoubleBuffer;
			cs |= ControlStyles.UseTextForAccessibility;

			Assert.AreEqual (cs, epp.GetControlStyles (), "Styles");
			
			epp.TabStop = true;
			
			cs |= ControlStyles.Selectable;

			Assert.AreEqual (cs, epp.GetControlStyles (), "Styles-2");
			
			epp.TabStop = false;
			
			cs &= ~ControlStyles.Selectable;

			Assert.AreEqual (cs, epp.GetControlStyles (), "Styles-3");
			
			f.Close ();
			f.Dispose ();
		}
        public void ProtectedProperties()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            Assert.AreEqual(true, epp.DefaultAutoToolTip, "C1");
        }
        public void ProtectedProperties()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            Assert.AreEqual(new Size(150, 175), epp.DefaultSize, "C1");
        }
        public void MethodCreateControlsInstance()
        {
            ExposeProtectedProperties epp = new ExposeProtectedProperties();

            Assert.AreEqual("System.Windows.Forms.ToolStripContainer+ToolStripContainerTypedControlCollection", epp.CreateControlsInstance().GetType().ToString(), "B1");
        }
Ejemplo n.º 31
0
		public void MethodCreateLayoutSettings ()
		{
			ExposeProtectedProperties ts = new ExposeProtectedProperties ();

			Assert.AreEqual ("System.Windows.Forms.FlowLayoutSettings", ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.Flow).ToString (), "A1");
			Assert.AreEqual (null, ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.HorizontalStackWithOverflow), "A2");
			Assert.AreEqual (null, ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.StackWithOverflow), "A3");
			//Assert.AreEqual ("System.Windows.Forms.TableLayoutSettings", ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.Table).ToString (), "A4");
			Assert.AreEqual (null, ts.PublicCreateLayoutSettings (ToolStripLayoutStyle.VerticalStackWithOverflow), "A5");
		}
Ejemplo n.º 32
0
		public void ControlStyle ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			ControlStyles cs = ControlStyles.ContainerControl;
			cs |= ControlStyles.UserPaint;
			cs |= ControlStyles.StandardClick;
			cs |= ControlStyles.SupportsTransparentBackColor;
			cs |= ControlStyles.StandardDoubleClick;
			cs |= ControlStyles.Selectable;
			cs |= ControlStyles.ResizeRedraw;
			cs |= ControlStyles.UseTextForAccessibility;

			Assert.AreEqual (cs, epp.GetControlStyles (), "Styles");
		}
Ejemplo n.º 33
0
		public void ProtectedProperties ()
		{
			ExposeProtectedProperties epp = new ExposeProtectedProperties ();

			Assert.AreEqual (WindowStyles.WS_TILED | WindowStyles.WS_CLIPCHILDREN | WindowStyles.WS_POPUP, (WindowStyles)epp.CreateParams.Style, "C1");
			// This makes no sense
			// Assert.AreEqual (WindowExStyles.WS_EX_CONTROLPARENT, (WindowExStyles)epp.CreateParams.ExStyle, "C2");
			Assert.AreEqual (DockStyle.None, epp.DefaultDock, "C3");
			Assert.AreEqual (new Padding (1, 2, 1, 2), epp.DefaultPadding, "C4");
			Assert.AreEqual (true, epp.DefaultShowItemToolTips, "C5");
			// Dependent on monitor resolution
			// Assert.AreEqual (new Size (1678, 1016), epp.MaxItemSize, "C6");
			Assert.AreEqual (true, epp.TopMost, "C7");
		}
Ejemplo n.º 34
0
		public void MethodIsInputChar ()
		{
			bool result = false;

			ExposeProtectedProperties dgv = new ExposeProtectedProperties ();

			for (int i = 0; i < 255; i++)
				if (!dgv.PublicIsInputChar ((char)i))
					result = true;

			// Basically, it always returns true
			Assert.AreEqual (false, result, "A1");
		}