DotNet 4.8.1 build of DotNetBar

This commit is contained in:
2025-02-07 10:35:23 -05:00
parent 33439b63a0
commit 6b0a5d60f4
2609 changed files with 989814 additions and 7 deletions

View File

@@ -0,0 +1,56 @@
using DevComponents.DotNetBar.Controls;
using DevComponents.DotNetBar.Rendering;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Text;
using System.Windows.Forms.Design;
namespace DevComponents.DotNetBar.Design
{
public class TokenEditorDesigner : ControlDesigner
{
#region Private Variables
#endregion
#region Constructor
#endregion
#region Internal Implementation
public override void Initialize(System.ComponentModel.IComponent component)
{
base.Initialize(component);
if (component == null || component.Site == null || !component.Site.DesignMode)
return;
IDesignerHost dh = this.GetService(typeof(IDesignerHost)) as IDesignerHost;
if (dh != null)
dh.LoadComplete += DesignerLoadComplete;
}
private void DesignerLoadComplete(object sender, EventArgs e)
{
IDesignerHost dh = this.GetService(typeof(IDesignerHost)) as IDesignerHost;
if (dh != null)
dh.LoadComplete -= DesignerLoadComplete;
System.Windows.Forms.Control c = this.Control;
if (c != null && !string.IsNullOrEmpty(c.Text))
TypeDescriptor.GetProperties(c)["Text"].SetValue(c, "");
}
public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
{
TokenEditor c = this.Control as TokenEditor;
if (c != null)
{
c.BackgroundStyle.Class = ElementStyleClassKeys.DateTimeInputBackgroundKey;
c.Separators.Add(";");
c.Separators.Add(",");
}
base.InitializeNewComponent(defaultValues);
}
#endregion
}
}