DotNet 4.8.1 build of DotNetBar
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.Editors;
|
||||
|
||||
namespace DevComponents.DotNetBar.Design
|
||||
{
|
||||
public class CalculatorDesigner : ControlDesigner
|
||||
{
|
||||
#region Internal Implementation
|
||||
public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
|
||||
{
|
||||
Calculator mc = this.Control as Calculator;
|
||||
if (mc != null)
|
||||
{
|
||||
mc.AutoSize = true;
|
||||
}
|
||||
base.InitializeNewComponent(defaultValues);
|
||||
}
|
||||
|
||||
protected override void PreFilterProperties(System.Collections.IDictionary properties)
|
||||
{
|
||||
base.PreFilterProperties(properties);
|
||||
RemoveDescriptors(properties,
|
||||
new String[] { "AutoScrollMargin",
|
||||
"AlwaysDisplayKeyAccelerators",
|
||||
"AutoScroll",
|
||||
"AutoScrollMinSize",
|
||||
"AutoValidate",
|
||||
"BorderStyle",
|
||||
"ForeColor",
|
||||
"DisabledImagesGrayScale",
|
||||
"DispatchShortcuts",
|
||||
"Enabled",
|
||||
"BackColor",
|
||||
"BackgroundImage",
|
||||
"BackgroundImageLayout",
|
||||
"Margin",
|
||||
"MaximumSize",
|
||||
"MinimumSize",
|
||||
"Padding",
|
||||
"RightToLeft",
|
||||
"TabStop",
|
||||
"TabIndex",
|
||||
"UseWaitCursor",
|
||||
"ImeMode" });
|
||||
}
|
||||
private void RemoveDescriptors(System.Collections.IDictionary properties, String[] propNames)
|
||||
{
|
||||
foreach (String propName in propNames)
|
||||
{
|
||||
if (properties.Contains(propName))
|
||||
properties.Remove(propName);
|
||||
}
|
||||
}
|
||||
protected override void PreFilterEvents(System.Collections.IDictionary events)
|
||||
{
|
||||
RemoveDescriptors(events,
|
||||
new string[] {
|
||||
"AutoSizeChanged",
|
||||
"AutoValidate",
|
||||
"BackColorChanged",
|
||||
"BackgroundImageChanged",
|
||||
"BackgroundImageLayoutChanged",
|
||||
"BindingContext",
|
||||
"BackgroundStyle",
|
||||
"ButtonCheckedChanged",
|
||||
"CausesValidationChanged",
|
||||
"ChangeUICues",
|
||||
"ClientSizeChanged",
|
||||
"ContainerControlDeserialize",
|
||||
"ContainerControlSerialize",
|
||||
"ContainerLoadControl",
|
||||
"Enter",
|
||||
"Leave",
|
||||
"ContextMenuStripChanged",
|
||||
"ControlAdded",
|
||||
"ControlRemoved",
|
||||
"CursorChanged",
|
||||
"DefinitionLoaded",
|
||||
"DockChanged",
|
||||
"EnabledChanged",
|
||||
"ExpandedChange",
|
||||
"FontChanged",
|
||||
"ForeColorChanged",
|
||||
"ImeModeChanged",
|
||||
"KeyDown",
|
||||
"KeyPress",
|
||||
"KeyUp",
|
||||
"Layout",
|
||||
"MarginChanged",
|
||||
"PaddingChanged",
|
||||
"Paint",
|
||||
"ParentChanged",
|
||||
"PreviewKeyDown",
|
||||
"RegionChanged",
|
||||
"Scroll",
|
||||
"RightToLeftChanged",
|
||||
"StyleChanged",
|
||||
"SystemColorsChanged",
|
||||
"TabIndexChanged",
|
||||
"TabStopChanged",
|
||||
"TextChanged",
|
||||
"Resize",
|
||||
"Validating",
|
||||
"Validated",
|
||||
"VisibleChanged" });
|
||||
base.PreFilterEvents(events);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,137 @@
|
||||
#if FRAMEWORK20
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.Editors.DateTimeAdv;
|
||||
using DevComponents.DotNetBar;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace DevComponents.DotNetBar.Design
|
||||
{
|
||||
public class DateTimeInputDesigner : VisualControlBaseDesigner
|
||||
{
|
||||
#region Internal Implementation
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the DateTimeInputDesigner class.
|
||||
/// </summary>
|
||||
public DateTimeInputDesigner()
|
||||
{
|
||||
this.AutoResizeHandles = true;
|
||||
}
|
||||
|
||||
public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
|
||||
{
|
||||
DateTimeInput c = this.Control as DateTimeInput;
|
||||
if (c != null)
|
||||
{
|
||||
c.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = eColorSchemePart.PanelBackground;
|
||||
c.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = eColorSchemePart.PanelBackground2;
|
||||
c.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90;
|
||||
c.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = eColorSchemePart.BarBackground;
|
||||
c.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = eColorSchemePart.BarBackground2;
|
||||
c.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90;
|
||||
c.MonthCalendar.CommandsBackgroundStyle.BorderTop = eStyleBorderType.Solid;
|
||||
c.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = eColorSchemePart.BarDockedBorder;
|
||||
c.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1;
|
||||
c.ButtonDropDown.Visible = true;
|
||||
c.MonthCalendar.TodayButtonVisible = true;
|
||||
c.MonthCalendar.ClearButtonVisible = true;
|
||||
c.ButtonDropDown.Shortcut = eShortcut.AltDown;
|
||||
c.Style = eDotNetBarStyle.StyleManagerControlled;
|
||||
}
|
||||
base.InitializeNewComponent(defaultValues);
|
||||
}
|
||||
|
||||
public override System.Windows.Forms.Design.SelectionRules SelectionRules
|
||||
{
|
||||
get
|
||||
{
|
||||
SelectionRules rules = base.SelectionRules;
|
||||
if (!this.Control.AutoSize)
|
||||
{
|
||||
rules &= ~(SelectionRules.BottomSizeable | SelectionRules.TopSizeable);
|
||||
}
|
||||
return rules;
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveDescriptors(System.Collections.IDictionary properties, String[] propNames)
|
||||
{
|
||||
foreach (String propName in propNames)
|
||||
{
|
||||
if (properties.Contains(propName))
|
||||
{
|
||||
if (properties[propName] is PropertyDescriptor)
|
||||
properties[propName] = TypeDescriptor.CreateProperty(this.Component.GetType(), (PropertyDescriptor)properties[propName], new BrowsableAttribute(false));
|
||||
else if (properties[propName] is EventDescriptor)
|
||||
properties[propName] = TypeDescriptor.CreateEvent(this.Component.GetType(), (EventDescriptor)properties[propName], new BrowsableAttribute(false));
|
||||
else
|
||||
properties.Remove(propName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void PreFilterProperties(System.Collections.IDictionary properties)
|
||||
{
|
||||
base.PreFilterProperties(properties);
|
||||
RemoveDescriptors(properties,
|
||||
new String[] { "AllowDrop",
|
||||
"BackColor",
|
||||
"MaximumSize",
|
||||
"MinimumSize",
|
||||
"RightToLeft",
|
||||
"UseWaitCursor",
|
||||
"ImeMode" });
|
||||
}
|
||||
|
||||
protected override void PreFilterEvents(System.Collections.IDictionary events)
|
||||
{
|
||||
RemoveDescriptors(events,
|
||||
new string[] { "BackColorChanged",
|
||||
"BackgroundImageChanged",
|
||||
"BackgroundImageLayoutChanged",
|
||||
"BackgroundStyle",
|
||||
"CausesValidationChanged",
|
||||
"ChangeUICues",
|
||||
"ClientSizeChanged",
|
||||
"Colors",
|
||||
"ContextMenuStripChanged",
|
||||
"ControlAdded",
|
||||
"ControlRemoved",
|
||||
"CursorChanged",
|
||||
"DefinitionLoaded",
|
||||
"DockChanged",
|
||||
"EnabledChanged",
|
||||
"FontChanged",
|
||||
"ForeColorChanged",
|
||||
"ImeModeChanged",
|
||||
"KeyDown",
|
||||
"KeyPress",
|
||||
"KeyUp",
|
||||
"Layout",
|
||||
"MarginChanged",
|
||||
"MonthCalendar",
|
||||
"PaddingChanged",
|
||||
"Paint",
|
||||
"ParentChanged",
|
||||
"PopupClose",
|
||||
"PopupContainerLoad",
|
||||
"PopupContainerUnload",
|
||||
"PopupOpen",
|
||||
"PopupShowing",
|
||||
"RegionChanged",
|
||||
"RightToLeftChanged",
|
||||
"StyleChanged",
|
||||
"SystemColorsChanged",
|
||||
"TabIndexChanged",
|
||||
"TabStopChanged",
|
||||
"Resize",
|
||||
"SizeChanged",
|
||||
"VisibleChanged" });
|
||||
base.PreFilterEvents(events);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -0,0 +1,56 @@
|
||||
#if FRAMEWORK20
|
||||
using System;
|
||||
using System.Windows.Forms.Design;
|
||||
using System.Text;
|
||||
using DevComponents.Editors;
|
||||
|
||||
namespace DevComponents.DotNetBar.Design
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents designer for IpAddressInput control.
|
||||
/// </summary>
|
||||
public class IpAddressInputDesigner: VisualControlBaseDesigner
|
||||
{
|
||||
#region Private Variables
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the IpAddressInputDesigner class.
|
||||
/// </summary>
|
||||
public IpAddressInputDesigner()
|
||||
{
|
||||
this.AutoResizeHandles = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Internal Implementation
|
||||
public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
|
||||
{
|
||||
IpAddressInput c = this.Control as IpAddressInput;
|
||||
if (c != null)
|
||||
{
|
||||
c.AutoOverwrite = true;
|
||||
c.ButtonFreeText.Visible = true;
|
||||
c.ButtonFreeText.Shortcut = DevComponents.DotNetBar.eShortcut.F2;
|
||||
c.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
}
|
||||
base.InitializeNewComponent(defaultValues);
|
||||
}
|
||||
|
||||
public override System.Windows.Forms.Design.SelectionRules SelectionRules
|
||||
{
|
||||
get
|
||||
{
|
||||
SelectionRules rules = base.SelectionRules;
|
||||
if (!this.Control.AutoSize)
|
||||
{
|
||||
rules &= ~(SelectionRules.BottomSizeable | SelectionRules.TopSizeable);
|
||||
}
|
||||
return rules;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
@@ -0,0 +1,45 @@
|
||||
#if FRAMEWORK20
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.Editors.DateTimeAdv;
|
||||
using System.Drawing;
|
||||
using DevComponents.DotNetBar.Rendering;
|
||||
|
||||
namespace DevComponents.DotNetBar.Design
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents Windows Forms designer for MonthCalendarAdv control.
|
||||
/// </summary>
|
||||
public class MonthCalendarAdvDesigner : ControlDesigner
|
||||
{
|
||||
#region Private Variables
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
#endregion
|
||||
|
||||
#region Internal Implementation
|
||||
public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
|
||||
{
|
||||
MonthCalendarAdv mc = this.Control as MonthCalendarAdv;
|
||||
if (mc != null)
|
||||
{
|
||||
mc.BackgroundStyle.Class = ElementStyleClassKeys.MonthCalendarAdvKey;
|
||||
//mc.BackgroundStyle.BackColor = SystemColors.Window;
|
||||
//mc.BackgroundStyle.Border = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
//mc.BackgroundStyle.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
//mc.BackgroundStyle.BorderWidth = 1;
|
||||
mc.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
|
||||
mc.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
|
||||
mc.NavigationBackgroundStyle.BackColorGradientAngle = 90;
|
||||
mc.AutoSize = true;
|
||||
}
|
||||
base.InitializeNewComponent(defaultValues);
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -0,0 +1,58 @@
|
||||
#if FRAMEWORK20
|
||||
using System;
|
||||
using System.Windows.Forms.Design;
|
||||
using System.Text;
|
||||
using DevComponents.DotNetBar;
|
||||
using DevComponents.Editors;
|
||||
|
||||
namespace DevComponents.DotNetBar.Design
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the base designer for the NumericInputBase controls.
|
||||
/// </summary>
|
||||
public class NumericInputBaseDesigner : VisualControlBaseDesigner
|
||||
{
|
||||
#region Private Variables
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the NumericInputBaseDesigner class.
|
||||
/// </summary>
|
||||
public NumericInputBaseDesigner()
|
||||
{
|
||||
this.AutoResizeHandles = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Internal Implementation
|
||||
public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
|
||||
{
|
||||
NumericInputBase c = this.Control as NumericInputBase;
|
||||
if (c != null)
|
||||
{
|
||||
c.ShowUpDown = true;
|
||||
c.AutoOverwrite = false;
|
||||
c.ButtonFreeText.Shortcut = eShortcut.F2;
|
||||
}
|
||||
base.InitializeNewComponent(defaultValues);
|
||||
}
|
||||
|
||||
public override System.Windows.Forms.Design.SelectionRules SelectionRules
|
||||
{
|
||||
get
|
||||
{
|
||||
SelectionRules rules = base.SelectionRules;
|
||||
if (!this.Control.AutoSize)
|
||||
{
|
||||
rules &= ~(SelectionRules.BottomSizeable | SelectionRules.TopSizeable);
|
||||
}
|
||||
return rules;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.Editors.DateTimeAdv;
|
||||
using System.Drawing;
|
||||
using DevComponents.DotNetBar.Rendering;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DevComponents.DotNetBar.Design
|
||||
{
|
||||
public class TimeSelectorDesigner : ControlDesigner
|
||||
{
|
||||
#region Private Variables
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
#endregion
|
||||
|
||||
#region Internal Implementation
|
||||
public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
|
||||
{
|
||||
TimeSelector mc = this.Control as TimeSelector;
|
||||
if (mc != null)
|
||||
{
|
||||
mc.BackgroundStyle.Class = ElementStyleClassKeys.ItemPanelKey;
|
||||
mc.AutoSize = true;
|
||||
}
|
||||
base.InitializeNewComponent(defaultValues);
|
||||
}
|
||||
|
||||
protected override void PreFilterProperties(System.Collections.IDictionary properties)
|
||||
{
|
||||
base.PreFilterProperties(properties);
|
||||
RemoveDescriptors(properties,
|
||||
new String[] { "AutoScrollMargin",
|
||||
"AlwaysDisplayKeyAccelerators",
|
||||
"AutoScroll",
|
||||
"AutoScrollMinSize",
|
||||
"DisabledImagesGrayScale",
|
||||
"DispatchShortcuts",
|
||||
"Enabled",
|
||||
"Images",
|
||||
"ImageSize",
|
||||
"ImagesLarge",
|
||||
"ImagesMedium",
|
||||
"KeyTipsFont",
|
||||
"BackColor",
|
||||
"BackgroundImage",
|
||||
"BackgroundImageLayout",
|
||||
"Margin",
|
||||
"MaximumSize",
|
||||
"MinimumSize",
|
||||
"Padding",
|
||||
"RightToLeft",
|
||||
"ShowShortcutKeysInToolTips",
|
||||
"ShowToolTips",
|
||||
"TabStop",
|
||||
"TabIndex",
|
||||
"UseWaitCursor",
|
||||
"ImeMode" });
|
||||
}
|
||||
private void RemoveDescriptors(System.Collections.IDictionary properties, String[] propNames)
|
||||
{
|
||||
foreach (String propName in propNames)
|
||||
{
|
||||
if (properties.Contains(propName))
|
||||
properties.Remove(propName);
|
||||
}
|
||||
}
|
||||
protected override void PreFilterEvents(System.Collections.IDictionary events)
|
||||
{
|
||||
RemoveDescriptors(events,
|
||||
new string[] { "BackColorChanged",
|
||||
"BackgroundImageChanged",
|
||||
"BackgroundImageLayoutChanged",
|
||||
"BackgroundStyle",
|
||||
"ButtonCheckedChanged",
|
||||
"CausesValidationChanged",
|
||||
"ChangeUICues",
|
||||
"ClientSizeChanged",
|
||||
"ContainerControlDeserialize",
|
||||
"ContainerControlSerialize",
|
||||
"ContainerLoadControl",
|
||||
"Enter",
|
||||
"Leave",
|
||||
"ContextMenuStripChanged",
|
||||
"ControlAdded",
|
||||
"ControlRemoved",
|
||||
"CursorChanged",
|
||||
"DefinitionLoaded",
|
||||
"DockChanged",
|
||||
"EnabledChanged",
|
||||
"ExpandedChange",
|
||||
"FontChanged",
|
||||
"ForeColorChanged",
|
||||
"ImeModeChanged",
|
||||
"ItemAdded",
|
||||
"ItemClick",
|
||||
"ItemDoubleClick",
|
||||
"ItemLayoutUpdated",
|
||||
"ItemRemoved",
|
||||
"ItemTextChanged",
|
||||
"KeyDown",
|
||||
"KeyPress",
|
||||
"KeyUp",
|
||||
"Layout",
|
||||
"MarginChanged",
|
||||
"OptionGroupChanging",
|
||||
"PaddingChanged",
|
||||
"Paint",
|
||||
"ParentChanged",
|
||||
"PopupClose",
|
||||
"PopupContainerLoad",
|
||||
"PopupContainerUnload",
|
||||
"PopupOpen",
|
||||
"PopupShowing",
|
||||
"RegionChanged",
|
||||
"Scroll",
|
||||
"RightToLeftChanged",
|
||||
"StyleChanged",
|
||||
"SystemColorsChanged",
|
||||
"TabIndexChanged",
|
||||
"TabStopChanged",
|
||||
"TextChanged",
|
||||
"Resize",
|
||||
"ToolTipShowing",
|
||||
"UserCustomize",
|
||||
"VisibleChanged" });
|
||||
base.PreFilterEvents(events);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
#if FRAMEWORK20
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Windows.Forms.Design;
|
||||
using DevComponents.Editors;
|
||||
|
||||
namespace DevComponents.DotNetBar.Design
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents Windows Forms designer for the VisualControlBase control.
|
||||
/// </summary>
|
||||
public class VisualControlBaseDesigner : ControlDesigner
|
||||
{
|
||||
#region Private Variables
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
#endregion
|
||||
|
||||
#region Internal Implementation
|
||||
public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
|
||||
{
|
||||
VisualControlBase c = this.Control as VisualControlBase;
|
||||
if (c != null)
|
||||
{
|
||||
c.Height = c.PreferredHeight;
|
||||
}
|
||||
base.InitializeNewComponent(defaultValues);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user