public void ProtectedProperties () { ExposeProtectedProperties epp = new ExposeProtectedProperties (); Assert.AreEqual (new Padding (0), epp.DefaultMargin, "C1"); Assert.AreEqual (new Padding (0), epp.DefaultPadding, "C2"); }
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"); }
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(0), epp.DefaultMargin, "C1"); Assert.AreEqual(new Padding(0), epp.DefaultPadding, "C2"); }
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"); }
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"); }
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"); }
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 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"); }
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"); }
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 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"); }
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.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"); }
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 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 (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"); }
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"); }
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 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"); }
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"); }
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"); }
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"); }
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"); }
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"); }