using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.ComponentModel.Design;
|
using System.Drawing;
|
using System.Drawing.Design;
|
using System.Linq;
|
using System.Text;
|
using System.Windows.Forms;
|
using DPumpHydr.WinFrmUI.WenSkin.Controls;
|
|
|
namespace DPumpHydr.WinFrmUI.WenSkin.Design.Designer
|
{
|
public class WenButtonDesigner : TextDesigner
|
{
|
public override void AddDesignerActionList()
|
{
|
this.ActionLists.Add(new WenDesignerActionList(this.Component));
|
}
|
|
public class WenDesignerActionList : TextBoxDesignerActionList
|
{
|
public WenDesignerActionList(IComponent component) : base(component)
|
{
|
}
|
|
public WenButton WenButton => this.Component as WenButton;
|
|
public Image Image { get => WenButton.Image; set => WenButton.Image = value; }
|
|
public WenButton.WenButtonBorderStyle BorderStyle
|
{ get => WenButton.BorderStyle; set => WenButton.BorderStyle = value; }
|
public Size ImageSize { get => WenButton.ImageSize; set => WenButton.ImageSize = value; }
|
|
public TextImageRelation TextImageRelation { get => WenButton.TextImageRelation; set => WenButton.TextImageRelation = value; }
|
|
public override DesignerActionItemCollection GetSortedActionItems()
|
{
|
DesignerActionPropertyItem image = new DesignerActionPropertyItem("Image", "图标");
|
DesignerActionPropertyItem text = new DesignerActionPropertyItem("Text", "文本");
|
|
DesignerActionPropertyItem borderStyle = new DesignerActionPropertyItem("BorderStyle", "边框样式");
|
DesignerActionPropertyItem imageSize = new DesignerActionPropertyItem("ImageSize", "图标尺寸");
|
DesignerActionPropertyItem textImageRelation = new DesignerActionPropertyItem("TextImageRelation", "图表文字位置");
|
|
|
return new DesignerActionItemCollection() { image, text, borderStyle, imageSize, textImageRelation };
|
}
|
}
|
}
|
}
|