新增Icon图标,Siganl信号
This commit is contained in:
parent
1d69359052
commit
b5a4dd0216
@ -13,7 +13,7 @@
|
||||
<Copyright>Copyright © 2024 czz_y</Copyright>
|
||||
<FileVersion>$(Version)</FileVersion>
|
||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||
<Version>1.6.0</Version>
|
||||
<Version>1.6.1</Version>
|
||||
<Authors>czz_y</Authors>
|
||||
<Description>基于 Winform UI框架 AntdUI 设计的Demo</Description>
|
||||
<PackageProjectUrl>https://gitee.com/mubaiyanghua/antd-uidemo</PackageProjectUrl>
|
||||
@ -30,7 +30,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AntdUI" Version="1.6.0" />
|
||||
<PackageReference Include="AntdUI" Version="1.6.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="NLog" Version="5.3.3" />
|
||||
</ItemGroup>
|
||||
|
||||
1
MainWindow.Designer.cs
generated
1
MainWindow.Designer.cs
generated
@ -125,6 +125,7 @@
|
||||
//
|
||||
// input_search
|
||||
//
|
||||
this.input_search.AllowClear = true;
|
||||
this.input_search.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.input_search.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F);
|
||||
this.input_search.Location = new System.Drawing.Point(596, 0);
|
||||
|
||||
@ -121,25 +121,6 @@ namespace AntdUIDemo
|
||||
}
|
||||
}
|
||||
|
||||
//private void LoadMenu()
|
||||
//{
|
||||
// menu.Items.Clear();
|
||||
// foreach (var rootItem in DataUtil.MenuItems)
|
||||
// {
|
||||
// var rootMenu = new AntdUI.MenuItem { Text = rootItem.Key };
|
||||
// foreach (var item in rootItem.Value)
|
||||
// {
|
||||
// var menuItem = new AntdUI.MenuItem
|
||||
// {
|
||||
// Text = item.Text,
|
||||
// IconSvg = item.IconSvg,
|
||||
// Tag = item.Tag,
|
||||
// };
|
||||
// rootMenu.Sub.Add(menuItem);
|
||||
// }
|
||||
// menu.Items.Add(rootMenu);
|
||||
// }
|
||||
//}
|
||||
private void LoadMenu(string filter = "")
|
||||
{
|
||||
menu.Items.Clear();
|
||||
@ -197,6 +178,9 @@ namespace AntdUIDemo
|
||||
case "FloatButton":
|
||||
control = new FloatButtonDemo(this);
|
||||
break;
|
||||
case "Icon":
|
||||
control = new IconDemo(this);
|
||||
break;
|
||||
case "Divider":
|
||||
control = new DividerDemo();
|
||||
break;
|
||||
@ -350,6 +334,9 @@ namespace AntdUIDemo
|
||||
case "PageHeader":
|
||||
control = new PageHeaderDemo(this);
|
||||
break;
|
||||
case "Signal":
|
||||
control = new SignalDemo();
|
||||
break;
|
||||
case "WindowBar":
|
||||
control = new WindowBarDemo();
|
||||
break;
|
||||
|
||||
@ -14,6 +14,7 @@ namespace AntdUIDemo.Models
|
||||
{
|
||||
new MenuItems { Text = "Button 按钮" , Tag = "Button"},
|
||||
new MenuItems { Text = "FloatButton 悬浮按钮", Tag = "FloatButton"},
|
||||
new MenuItems { Text = "Icon 图标", Tag = "Icon"},
|
||||
}
|
||||
},
|
||||
{ "布局", new List<MenuItems>
|
||||
@ -94,6 +95,7 @@ namespace AntdUIDemo.Models
|
||||
new MenuItems { Text = "ContextMenuStrip 快捷菜单", Tag = "ContextMenuStrip" },
|
||||
new MenuItems { Text = "Image3D 图片3D", Tag = "Image3D" },
|
||||
new MenuItems { Text = "PageHeader 页头", Tag= "PageHeader"},
|
||||
new MenuItems { Text = "Signal 信号", Tag = "Signal" },
|
||||
new MenuItems { Text = "WindowBar 窗口栏", Tag = "WindowBar" }
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
<h1>AntdUI Demo</h1>
|
||||
|
||||
本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.6.0`
|
||||
本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.6.1`
|
||||
|
||||
</div>
|
||||
|
||||
@ -40,6 +40,8 @@
|
||||

|
||||
#### FloatButton 悬浮按钮
|
||||

|
||||
#### Icon 图标
|
||||

|
||||
|
||||
### 布局
|
||||
#### Divider 分割线
|
||||
@ -157,5 +159,7 @@
|
||||

|
||||
#### PageHeader 页头
|
||||

|
||||
#### Signal 信号
|
||||

|
||||
#### WindowBar 窗口栏
|
||||

|
||||
157
Views/IconDemo.Designer.cs
generated
Normal file
157
Views/IconDemo.Designer.cs
generated
Normal file
@ -0,0 +1,157 @@
|
||||
namespace AntdUIDemo.Views
|
||||
{
|
||||
partial class IconDemo
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AntdUI.SegmentedItem segmentedItem1 = new AntdUI.SegmentedItem();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(IconDemo));
|
||||
AntdUI.SegmentedItem segmentedItem2 = new AntdUI.SegmentedItem();
|
||||
this.stackPanel1 = new AntdUI.StackPanel();
|
||||
this.divider1 = new AntdUI.Divider();
|
||||
this.label3 = new AntdUI.Label();
|
||||
this.label2 = new AntdUI.Label();
|
||||
this.label1 = new AntdUI.Label();
|
||||
this.segmented1 = new AntdUI.Segmented();
|
||||
this.txt_search = new AntdUI.Input();
|
||||
this.vpanel = new AntdUI.VirtualPanel();
|
||||
this.stackPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// stackPanel1
|
||||
//
|
||||
this.stackPanel1.Controls.Add(this.vpanel);
|
||||
this.stackPanel1.Controls.Add(this.txt_search);
|
||||
this.stackPanel1.Controls.Add(this.segmented1);
|
||||
this.stackPanel1.Controls.Add(this.divider1);
|
||||
this.stackPanel1.Controls.Add(this.label3);
|
||||
this.stackPanel1.Controls.Add(this.label2);
|
||||
this.stackPanel1.Controls.Add(this.label1);
|
||||
this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.stackPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.stackPanel1.Name = "stackPanel1";
|
||||
this.stackPanel1.Size = new System.Drawing.Size(700, 560);
|
||||
this.stackPanel1.TabIndex = 0;
|
||||
this.stackPanel1.Text = "stackPanel1";
|
||||
this.stackPanel1.Vertical = true;
|
||||
//
|
||||
// divider1
|
||||
//
|
||||
this.divider1.Location = new System.Drawing.Point(3, 109);
|
||||
this.divider1.Name = "divider1";
|
||||
this.divider1.Size = new System.Drawing.Size(694, 12);
|
||||
this.divider1.TabIndex = 17;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
this.label3.Location = new System.Drawing.Point(3, 79);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(694, 24);
|
||||
this.label3.TabIndex = 16;
|
||||
this.label3.Text = "Icon没有工具箱控件,用于Svg属性赋值。";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label2.Location = new System.Drawing.Point(3, 49);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(694, 24);
|
||||
this.label2.TabIndex = 15;
|
||||
this.label2.Text = "语义化的矢量图形。";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label1.Location = new System.Drawing.Point(3, 3);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(694, 40);
|
||||
this.label1.TabIndex = 14;
|
||||
this.label1.Text = "Icon 图标";
|
||||
//
|
||||
// segmented1
|
||||
//
|
||||
this.segmented1.BackActive = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(150)))), ((int)(((byte)(243)))));
|
||||
this.segmented1.BarStyle = true;
|
||||
this.segmented1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.segmented1.IconAlign = AntdUI.TAlignMini.Left;
|
||||
segmentedItem1.IconSvg = resources.GetString("segmentedItem1.IconSvg");
|
||||
segmentedItem1.Text = "线框风格";
|
||||
segmentedItem2.IconSvg = "<svg viewBox=\"0 0 1024 1024\"><path d=\"M864 64H160C107 64 64 107 64 160v704c0 53 4" +
|
||||
"3 96 96 96h704c53 0 96-43 96-96V160c0-53-43-96-96-96z\"></path></svg>";
|
||||
segmentedItem2.Text = "实底风格";
|
||||
this.segmented1.Items.Add(segmentedItem1);
|
||||
this.segmented1.Items.Add(segmentedItem2);
|
||||
this.segmented1.Location = new System.Drawing.Point(3, 127);
|
||||
this.segmented1.Name = "segmented1";
|
||||
this.segmented1.SelectIndex = 0;
|
||||
this.segmented1.Size = new System.Drawing.Size(694, 38);
|
||||
this.segmented1.TabIndex = 18;
|
||||
this.segmented1.Text = "segmented1";
|
||||
//
|
||||
// txt_search
|
||||
//
|
||||
this.txt_search.AllowClear = true;
|
||||
this.txt_search.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.txt_search.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F);
|
||||
this.txt_search.Location = new System.Drawing.Point(3, 171);
|
||||
this.txt_search.Name = "txt_search";
|
||||
this.txt_search.PlaceholderText = "输入关键字搜索...";
|
||||
this.txt_search.PrefixSvg = "SearchOutlined";
|
||||
this.txt_search.Size = new System.Drawing.Size(694, 40);
|
||||
this.txt_search.TabIndex = 19;
|
||||
//
|
||||
// vpanel
|
||||
//
|
||||
this.vpanel.Location = new System.Drawing.Point(3, 217);
|
||||
this.vpanel.Name = "vpanel";
|
||||
this.vpanel.Size = new System.Drawing.Size(694, 340);
|
||||
this.vpanel.TabIndex = 20;
|
||||
//
|
||||
// IconDemo
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||
this.Controls.Add(this.stackPanel1);
|
||||
this.Name = "IconDemo";
|
||||
this.Size = new System.Drawing.Size(700, 560);
|
||||
this.stackPanel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private AntdUI.StackPanel stackPanel1;
|
||||
private AntdUI.Divider divider1;
|
||||
private AntdUI.Label label2;
|
||||
private AntdUI.Label label1;
|
||||
private AntdUI.Label label3;
|
||||
private AntdUI.Segmented segmented1;
|
||||
private AntdUI.VirtualPanel vpanel;
|
||||
private AntdUI.Input txt_search;
|
||||
}
|
||||
}
|
||||
292
Views/IconDemo.cs
Normal file
292
Views/IconDemo.cs
Normal file
@ -0,0 +1,292 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AntdUIDemo.Views
|
||||
{
|
||||
public partial class IconDemo : UserControl
|
||||
{
|
||||
private AntdUI.Window window;
|
||||
public IconDemo(AntdUI.Window _window)
|
||||
{
|
||||
window = _window;
|
||||
InitializeComponent();
|
||||
//设置默认值
|
||||
InitData();
|
||||
// 绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
|
||||
private void BindEventHandler()
|
||||
{
|
||||
segmented1.SelectIndexChanged += segmented1_SelectIndexChanged;
|
||||
txt_search.TextChanged += txt_search_TextChanged;
|
||||
txt_search.SuffixClick += txt_search_SuffixClick;
|
||||
vpanel.ItemClick += vpanel_ItemClick;
|
||||
}
|
||||
|
||||
#region 数据
|
||||
|
||||
private void segmented1_SelectIndexChanged(object sender, AntdUI.IntEventArgs e)
|
||||
{
|
||||
InitData();
|
||||
}
|
||||
|
||||
private void InitData()
|
||||
{
|
||||
var data = GetData();
|
||||
var svgs = new List<AntdUI.VirtualItem>(data.Count);
|
||||
foreach (var it in data)
|
||||
{
|
||||
svgs.Add(new TItem(it.Key, it.Value));
|
||||
svgs.AddRange(it.Value);
|
||||
}
|
||||
vpanel.Items.Clear();
|
||||
txt_search.Text = "";
|
||||
vpanel.Items.AddRange(svgs);
|
||||
}
|
||||
|
||||
Dictionary<string, List<VItem>> GetData()
|
||||
{
|
||||
var dir = new Dictionary<string, List<VItem>>(AntdUI.SvgDb.Custom.Count);
|
||||
var tmp = new List<VItem>(AntdUI.SvgDb.Custom.Count);
|
||||
if (segmented1.SelectIndex == 0)
|
||||
{
|
||||
foreach (var it in AntdUI.SvgDb.Custom)
|
||||
{
|
||||
if (it.Key == "QuestionOutlined")
|
||||
{
|
||||
dir.Add("方向性图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "EditOutlined")
|
||||
{
|
||||
dir.Add("提示建议性图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AreaChartOutlined")
|
||||
{
|
||||
dir.Add("编辑类图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AndroidOutlined")
|
||||
{
|
||||
dir.Add("数据类图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AccountBookOutlined")
|
||||
{
|
||||
dir.Add("品牌和标识", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "StepBackwardFilled")
|
||||
{
|
||||
dir.Add("网站通用图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
return dir;
|
||||
}
|
||||
tmp.Add(new VItem(it.Key, it.Value));
|
||||
}
|
||||
dir.Add("网站通用图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
bool isadd = false;
|
||||
foreach (var it in AntdUI.SvgDb.Custom)
|
||||
{
|
||||
if (it.Key == "StepBackwardFilled") isadd = true;
|
||||
else if (it.Key == "QuestionCircleFilled")
|
||||
{
|
||||
dir.Add("方向性图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "EditFilled")
|
||||
{
|
||||
dir.Add("提示建议性图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "PieChartFilled")
|
||||
{
|
||||
dir.Add("编辑类图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AndroidFilled")
|
||||
{
|
||||
dir.Add("数据类图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
else if (it.Key == "AccountBookFilled")
|
||||
{
|
||||
dir.Add("品牌和标识", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
if (isadd) tmp.Add(new VItem(it.Key, it.Value));
|
||||
}
|
||||
dir.Add("网站通用图标", new List<VItem>(tmp));
|
||||
tmp.Clear();
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 渲染
|
||||
|
||||
class TItem : AntdUI.VirtualItem
|
||||
{
|
||||
string title, count;
|
||||
public List<VItem> data;
|
||||
public TItem(string t, List<VItem> d)
|
||||
{
|
||||
CanClick = false;
|
||||
data = d;
|
||||
title = t;
|
||||
count = d.Count.ToString();
|
||||
}
|
||||
|
||||
StringFormat s_f = AntdUI.Helper.SF_NoWrap(lr: StringAlignment.Near);
|
||||
StringFormat s_c = AntdUI.Helper.SF_NoWrap();
|
||||
public override void Paint(Graphics g, AntdUI.VirtualPanelArgs e)
|
||||
{
|
||||
var dpi = AntdUI.Config.Dpi;
|
||||
|
||||
using (var fore = new SolidBrush(AntdUI.Style.Db.Text))
|
||||
{
|
||||
using (var font_title = new Font(e.Panel.Font, FontStyle.Bold))
|
||||
using (var font_count = new Font(e.Panel.Font.FontFamily, e.Panel.Font.Size * .74F, e.Panel.Font.Style))
|
||||
{
|
||||
var size = AntdUI.Helper.Size(g.MeasureString(title, font_title));
|
||||
AntdUI.CorrectionTextRendering.DrawStr(g, title, font_title, fore, e.Rect, s_f);
|
||||
|
||||
var rect_count = new Rectangle(e.Rect.X + size.Width, e.Rect.Y + (e.Rect.Height - size.Height) / 2, size.Height, size.Height);
|
||||
using (var path = AntdUI.Helper.RoundPath(rect_count, e.Radius))
|
||||
{
|
||||
using (var brush = new SolidBrush(AntdUI.Style.Db.TagDefaultBg))
|
||||
{
|
||||
g.FillPath(brush, path);
|
||||
}
|
||||
using (var pen = new Pen(AntdUI.Style.Db.DefaultBorder, 1 * dpi))
|
||||
{
|
||||
g.DrawPath(pen, path);
|
||||
}
|
||||
}
|
||||
AntdUI.CorrectionTextRendering.DrawStr(g, count, font_count, fore, rect_count, s_c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Size Size(Graphics g, AntdUI.VirtualPanelArgs e)
|
||||
{
|
||||
var dpi = AntdUI.Config.Dpi;
|
||||
return new Size(e.Rect.Width, (int)(44 * dpi));
|
||||
}
|
||||
}
|
||||
class VItem : AntdUI.VirtualItem
|
||||
{
|
||||
public string Key, Value;
|
||||
public VItem(string key, string value) { Tag = Key = key; Value = value; }
|
||||
|
||||
StringFormat s_f = AntdUI.Helper.SF_NoWrap();
|
||||
Bitmap bmp = null, bmp_ac = null;
|
||||
public override void Paint(Graphics g, AntdUI.VirtualPanelArgs e)
|
||||
{
|
||||
var dpi = AntdUI.Config.Dpi;
|
||||
int icon_size = (int)(24 * dpi), text_size = (int)(24 * dpi), y = e.Rect.Y + (e.Rect.Height - (icon_size + text_size)) / 2;
|
||||
var rect_icon = new Rectangle(e.Rect.X + (e.Rect.Width - icon_size) / 2, y, icon_size, icon_size);
|
||||
var rect_text = new Rectangle(e.Rect.X, y + icon_size / 2 + text_size, e.Rect.Width, text_size);
|
||||
if (Hover)
|
||||
{
|
||||
using (var path = AntdUI.Helper.RoundPath(e.Rect, e.Radius))
|
||||
{
|
||||
using (var brush = new SolidBrush(AntdUI.Style.Db.Primary))
|
||||
{
|
||||
g.FillPath(brush, path);
|
||||
}
|
||||
}
|
||||
if (bmp_ac == null) bmp_ac = AntdUI.SvgExtend.SvgToBmp(Value, icon_size, icon_size, AntdUI.Style.Db.PrimaryColor);
|
||||
g.DrawImage(bmp_ac, rect_icon);
|
||||
|
||||
using (var fore = new SolidBrush(AntdUI.Style.Db.PrimaryColor))
|
||||
{
|
||||
AntdUI.CorrectionTextRendering.DrawStr(g, Key, e.Panel.Font, fore, rect_text, s_f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bmp == null) bmp = AntdUI.SvgExtend.SvgToBmp(Value, icon_size, icon_size, AntdUI.Style.Db.Text);
|
||||
g.DrawImage(bmp, rect_icon);
|
||||
using (var fore = new SolidBrush(AntdUI.Style.Db.Text))
|
||||
{
|
||||
AntdUI.CorrectionTextRendering.DrawStr(g, Key, e.Panel.Font, fore, rect_text, s_f);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public override Size Size(Graphics g, AntdUI.VirtualPanelArgs e)
|
||||
{
|
||||
var dpi = AntdUI.Config.Dpi;
|
||||
return new Size((int)(140 * dpi), (int)(100 * dpi));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void vpanel_ItemClick(object sender, AntdUI.VirtualItemEventArgs e)
|
||||
{
|
||||
if (e.Item is VItem item)
|
||||
{
|
||||
if (AntdUI.Helper.ClipboardSetText(this, item.Key)) AntdUI.Message.success(window, item.Key + " 复制成功");
|
||||
else AntdUI.Message.error(window, item.Key + " 复制失败");
|
||||
}
|
||||
}
|
||||
|
||||
#region 搜索
|
||||
|
||||
private void txt_search_TextChanged(object sender, System.EventArgs e) => LoadSearchList();
|
||||
private void txt_search_SuffixClick(object sender, MouseEventArgs e) => LoadSearchList();
|
||||
|
||||
void LoadSearchList()
|
||||
{
|
||||
string search = txt_search.Text;
|
||||
BeginInvoke(new Action(() =>
|
||||
{
|
||||
vpanel.PauseLayout = true;
|
||||
if (string.IsNullOrEmpty(search))
|
||||
{
|
||||
foreach (var it in vpanel.Items) it.Visible = true;
|
||||
vpanel.Empty = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
vpanel.Empty = true;
|
||||
string searchLower = search.ToLower();
|
||||
var titles = new List<TItem>(vpanel.Items.Count);
|
||||
foreach (var it in vpanel.Items)
|
||||
{
|
||||
if (it is VItem item) it.Visible = item.Key.ToLower().Contains(searchLower);
|
||||
else if (it is TItem itemTitle) titles.Add(itemTitle);
|
||||
}
|
||||
foreach (var it in titles)
|
||||
{
|
||||
int count = 0;
|
||||
foreach (var item in it.data)
|
||||
{
|
||||
if (item.Visible) count++;
|
||||
}
|
||||
it.Visible = count > 0;
|
||||
}
|
||||
}
|
||||
vpanel.PauseLayout = false;
|
||||
}));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
123
Views/IconDemo.resx
Normal file
123
Views/IconDemo.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="segmentedItem1.IconSvg" xml:space="preserve">
|
||||
<value><svg viewBox="0 0 1024 1024"><path d="M864 64H160C107 64 64 107 64 160v704c0 53 43 96 96 96h704c53 0 96-43 96-96V160c0-53-43-96-96-96z m-12 800H172c-6.6 0-12-5.4-12-12V172c0-6.6 5.4-12 12-12h680c6.6 0 12 5.4 12 12v680c0 6.6-5.4 12-12 12z"></path></svg></value>
|
||||
</data>
|
||||
</root>
|
||||
442
Views/SignalDemo.Designer.cs
generated
Normal file
442
Views/SignalDemo.Designer.cs
generated
Normal file
@ -0,0 +1,442 @@
|
||||
namespace AntdUIDemo.Views
|
||||
{
|
||||
partial class SignalDemo
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.stackPanel1 = new AntdUI.StackPanel();
|
||||
this.flowPanel = new AntdUI.FlowPanel();
|
||||
this.label4 = new AntdUI.Label();
|
||||
this.divider1 = new AntdUI.Divider();
|
||||
this.label2 = new AntdUI.Label();
|
||||
this.label1 = new AntdUI.Label();
|
||||
this.signal1 = new AntdUI.Signal();
|
||||
this.signal2 = new AntdUI.Signal();
|
||||
this.signal3 = new AntdUI.Signal();
|
||||
this.signal4 = new AntdUI.Signal();
|
||||
this.signal5 = new AntdUI.Signal();
|
||||
this.label3 = new AntdUI.Label();
|
||||
this.flowPanel1 = new AntdUI.FlowPanel();
|
||||
this.signal6 = new AntdUI.Signal();
|
||||
this.signal7 = new AntdUI.Signal();
|
||||
this.signal8 = new AntdUI.Signal();
|
||||
this.signal9 = new AntdUI.Signal();
|
||||
this.signal10 = new AntdUI.Signal();
|
||||
this.label5 = new AntdUI.Label();
|
||||
this.flowPanel3 = new AntdUI.FlowPanel();
|
||||
this.signal16 = new AntdUI.Signal();
|
||||
this.signal17 = new AntdUI.Signal();
|
||||
this.signal18 = new AntdUI.Signal();
|
||||
this.signal19 = new AntdUI.Signal();
|
||||
this.signal20 = new AntdUI.Signal();
|
||||
this.flowPanel2 = new AntdUI.FlowPanel();
|
||||
this.signal11 = new AntdUI.Signal();
|
||||
this.signal12 = new AntdUI.Signal();
|
||||
this.signal13 = new AntdUI.Signal();
|
||||
this.signal14 = new AntdUI.Signal();
|
||||
this.signal15 = new AntdUI.Signal();
|
||||
this.stackPanel1.SuspendLayout();
|
||||
this.flowPanel.SuspendLayout();
|
||||
this.flowPanel1.SuspendLayout();
|
||||
this.flowPanel3.SuspendLayout();
|
||||
this.flowPanel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// stackPanel1
|
||||
//
|
||||
this.stackPanel1.Controls.Add(this.flowPanel2);
|
||||
this.stackPanel1.Controls.Add(this.flowPanel3);
|
||||
this.stackPanel1.Controls.Add(this.label5);
|
||||
this.stackPanel1.Controls.Add(this.flowPanel1);
|
||||
this.stackPanel1.Controls.Add(this.label3);
|
||||
this.stackPanel1.Controls.Add(this.flowPanel);
|
||||
this.stackPanel1.Controls.Add(this.label4);
|
||||
this.stackPanel1.Controls.Add(this.divider1);
|
||||
this.stackPanel1.Controls.Add(this.label2);
|
||||
this.stackPanel1.Controls.Add(this.label1);
|
||||
this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.stackPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.stackPanel1.Name = "stackPanel1";
|
||||
this.stackPanel1.Size = new System.Drawing.Size(700, 488);
|
||||
this.stackPanel1.TabIndex = 0;
|
||||
this.stackPanel1.Text = "stackPanel1";
|
||||
this.stackPanel1.Vertical = true;
|
||||
//
|
||||
// flowPanel
|
||||
//
|
||||
this.flowPanel.Controls.Add(this.signal5);
|
||||
this.flowPanel.Controls.Add(this.signal4);
|
||||
this.flowPanel.Controls.Add(this.signal3);
|
||||
this.flowPanel.Controls.Add(this.signal2);
|
||||
this.flowPanel.Controls.Add(this.signal1);
|
||||
this.flowPanel.Location = new System.Drawing.Point(3, 127);
|
||||
this.flowPanel.Name = "flowPanel";
|
||||
this.flowPanel.Size = new System.Drawing.Size(694, 38);
|
||||
this.flowPanel.TabIndex = 57;
|
||||
this.flowPanel.Text = "flowPanel1";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label4.Location = new System.Drawing.Point(3, 97);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(694, 24);
|
||||
this.label4.TabIndex = 56;
|
||||
this.label4.Text = "基本用法";
|
||||
//
|
||||
// divider1
|
||||
//
|
||||
this.divider1.Location = new System.Drawing.Point(3, 79);
|
||||
this.divider1.Name = "divider1";
|
||||
this.divider1.Size = new System.Drawing.Size(694, 12);
|
||||
this.divider1.TabIndex = 55;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label2.Location = new System.Drawing.Point(3, 49);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(694, 24);
|
||||
this.label2.TabIndex = 54;
|
||||
this.label2.Text = "信号显示";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label1.Location = new System.Drawing.Point(3, 3);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(694, 40);
|
||||
this.label1.TabIndex = 53;
|
||||
this.label1.Text = "Signal 信号";
|
||||
//
|
||||
// signal1
|
||||
//
|
||||
this.signal1.Location = new System.Drawing.Point(3, 3);
|
||||
this.signal1.Name = "signal1";
|
||||
this.signal1.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal1.TabIndex = 0;
|
||||
this.signal1.Text = "signal1";
|
||||
this.signal1.Value = 1;
|
||||
//
|
||||
// signal2
|
||||
//
|
||||
this.signal2.Location = new System.Drawing.Point(84, 3);
|
||||
this.signal2.Name = "signal2";
|
||||
this.signal2.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal2.TabIndex = 1;
|
||||
this.signal2.Text = "signal2";
|
||||
this.signal2.Value = 2;
|
||||
//
|
||||
// signal3
|
||||
//
|
||||
this.signal3.Location = new System.Drawing.Point(165, 3);
|
||||
this.signal3.Name = "signal3";
|
||||
this.signal3.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal3.TabIndex = 2;
|
||||
this.signal3.Text = "signal3";
|
||||
this.signal3.Value = 3;
|
||||
//
|
||||
// signal4
|
||||
//
|
||||
this.signal4.Location = new System.Drawing.Point(246, 3);
|
||||
this.signal4.Name = "signal4";
|
||||
this.signal4.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal4.TabIndex = 3;
|
||||
this.signal4.Text = "signal4";
|
||||
this.signal4.Value = 4;
|
||||
//
|
||||
// signal5
|
||||
//
|
||||
this.signal5.Location = new System.Drawing.Point(327, 3);
|
||||
this.signal5.Name = "signal5";
|
||||
this.signal5.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal5.TabIndex = 4;
|
||||
this.signal5.Text = "signal5";
|
||||
this.signal5.Value = 5;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label3.Location = new System.Drawing.Point(3, 171);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(694, 24);
|
||||
this.label3.TabIndex = 58;
|
||||
this.label3.Text = "线条样式";
|
||||
//
|
||||
// flowPanel1
|
||||
//
|
||||
this.flowPanel1.Controls.Add(this.signal6);
|
||||
this.flowPanel1.Controls.Add(this.signal7);
|
||||
this.flowPanel1.Controls.Add(this.signal8);
|
||||
this.flowPanel1.Controls.Add(this.signal9);
|
||||
this.flowPanel1.Controls.Add(this.signal10);
|
||||
this.flowPanel1.Location = new System.Drawing.Point(3, 201);
|
||||
this.flowPanel1.Name = "flowPanel1";
|
||||
this.flowPanel1.Size = new System.Drawing.Size(694, 38);
|
||||
this.flowPanel1.TabIndex = 59;
|
||||
this.flowPanel1.Text = "flowPanel1";
|
||||
//
|
||||
// signal6
|
||||
//
|
||||
this.signal6.Location = new System.Drawing.Point(327, 3);
|
||||
this.signal6.Name = "signal6";
|
||||
this.signal6.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal6.StyleLine = true;
|
||||
this.signal6.TabIndex = 4;
|
||||
this.signal6.Text = "signal6";
|
||||
this.signal6.Value = 5;
|
||||
//
|
||||
// signal7
|
||||
//
|
||||
this.signal7.Location = new System.Drawing.Point(246, 3);
|
||||
this.signal7.Name = "signal7";
|
||||
this.signal7.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal7.StyleLine = true;
|
||||
this.signal7.TabIndex = 3;
|
||||
this.signal7.Text = "signal7";
|
||||
this.signal7.Value = 4;
|
||||
//
|
||||
// signal8
|
||||
//
|
||||
this.signal8.Location = new System.Drawing.Point(165, 3);
|
||||
this.signal8.Name = "signal8";
|
||||
this.signal8.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal8.StyleLine = true;
|
||||
this.signal8.TabIndex = 2;
|
||||
this.signal8.Text = "signal8";
|
||||
this.signal8.Value = 3;
|
||||
//
|
||||
// signal9
|
||||
//
|
||||
this.signal9.Location = new System.Drawing.Point(84, 3);
|
||||
this.signal9.Name = "signal9";
|
||||
this.signal9.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal9.StyleLine = true;
|
||||
this.signal9.TabIndex = 1;
|
||||
this.signal9.Text = "signal9";
|
||||
this.signal9.Value = 2;
|
||||
//
|
||||
// signal10
|
||||
//
|
||||
this.signal10.Location = new System.Drawing.Point(3, 3);
|
||||
this.signal10.Name = "signal10";
|
||||
this.signal10.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal10.StyleLine = true;
|
||||
this.signal10.TabIndex = 0;
|
||||
this.signal10.Text = "signal10";
|
||||
this.signal10.Value = 1;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label5.Location = new System.Drawing.Point(3, 245);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(694, 24);
|
||||
this.label5.TabIndex = 60;
|
||||
this.label5.Text = "自定义底色";
|
||||
//
|
||||
// flowPanel3
|
||||
//
|
||||
this.flowPanel3.Controls.Add(this.signal16);
|
||||
this.flowPanel3.Controls.Add(this.signal17);
|
||||
this.flowPanel3.Controls.Add(this.signal18);
|
||||
this.flowPanel3.Controls.Add(this.signal19);
|
||||
this.flowPanel3.Controls.Add(this.signal20);
|
||||
this.flowPanel3.Location = new System.Drawing.Point(3, 275);
|
||||
this.flowPanel3.Name = "flowPanel3";
|
||||
this.flowPanel3.Size = new System.Drawing.Size(694, 38);
|
||||
this.flowPanel3.TabIndex = 62;
|
||||
this.flowPanel3.Text = "flowPanel3";
|
||||
//
|
||||
// signal16
|
||||
//
|
||||
this.signal16.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal16.Location = new System.Drawing.Point(327, 3);
|
||||
this.signal16.Name = "signal16";
|
||||
this.signal16.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal16.TabIndex = 4;
|
||||
this.signal16.Text = "signal16";
|
||||
this.signal16.Value = 5;
|
||||
//
|
||||
// signal17
|
||||
//
|
||||
this.signal17.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal17.Location = new System.Drawing.Point(246, 3);
|
||||
this.signal17.Name = "signal17";
|
||||
this.signal17.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal17.TabIndex = 3;
|
||||
this.signal17.Text = "signal17";
|
||||
this.signal17.Value = 4;
|
||||
//
|
||||
// signal18
|
||||
//
|
||||
this.signal18.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal18.Location = new System.Drawing.Point(165, 3);
|
||||
this.signal18.Name = "signal18";
|
||||
this.signal18.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal18.TabIndex = 2;
|
||||
this.signal18.Text = "signal18";
|
||||
this.signal18.Value = 3;
|
||||
//
|
||||
// signal19
|
||||
//
|
||||
this.signal19.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal19.Location = new System.Drawing.Point(84, 3);
|
||||
this.signal19.Name = "signal19";
|
||||
this.signal19.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal19.TabIndex = 1;
|
||||
this.signal19.Text = "signal19";
|
||||
this.signal19.Value = 2;
|
||||
//
|
||||
// signal20
|
||||
//
|
||||
this.signal20.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal20.Location = new System.Drawing.Point(3, 3);
|
||||
this.signal20.Name = "signal20";
|
||||
this.signal20.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal20.TabIndex = 0;
|
||||
this.signal20.Text = "signal20";
|
||||
this.signal20.Value = 1;
|
||||
//
|
||||
// flowPanel2
|
||||
//
|
||||
this.flowPanel2.Controls.Add(this.signal11);
|
||||
this.flowPanel2.Controls.Add(this.signal12);
|
||||
this.flowPanel2.Controls.Add(this.signal13);
|
||||
this.flowPanel2.Controls.Add(this.signal14);
|
||||
this.flowPanel2.Controls.Add(this.signal15);
|
||||
this.flowPanel2.Location = new System.Drawing.Point(3, 319);
|
||||
this.flowPanel2.Name = "flowPanel2";
|
||||
this.flowPanel2.Size = new System.Drawing.Size(694, 38);
|
||||
this.flowPanel2.TabIndex = 63;
|
||||
this.flowPanel2.Text = "flowPanel2";
|
||||
//
|
||||
// signal11
|
||||
//
|
||||
this.signal11.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal11.Location = new System.Drawing.Point(327, 3);
|
||||
this.signal11.Name = "signal11";
|
||||
this.signal11.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal11.StyleLine = true;
|
||||
this.signal11.TabIndex = 4;
|
||||
this.signal11.Text = "signal11";
|
||||
this.signal11.Value = 5;
|
||||
//
|
||||
// signal12
|
||||
//
|
||||
this.signal12.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal12.Location = new System.Drawing.Point(246, 3);
|
||||
this.signal12.Name = "signal12";
|
||||
this.signal12.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal12.StyleLine = true;
|
||||
this.signal12.TabIndex = 3;
|
||||
this.signal12.Text = "signal12";
|
||||
this.signal12.Value = 4;
|
||||
//
|
||||
// signal13
|
||||
//
|
||||
this.signal13.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal13.Location = new System.Drawing.Point(165, 3);
|
||||
this.signal13.Name = "signal13";
|
||||
this.signal13.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal13.StyleLine = true;
|
||||
this.signal13.TabIndex = 2;
|
||||
this.signal13.Text = "signal13";
|
||||
this.signal13.Value = 3;
|
||||
//
|
||||
// signal14
|
||||
//
|
||||
this.signal14.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal14.Location = new System.Drawing.Point(84, 3);
|
||||
this.signal14.Name = "signal14";
|
||||
this.signal14.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal14.StyleLine = true;
|
||||
this.signal14.TabIndex = 1;
|
||||
this.signal14.Text = "signal14";
|
||||
this.signal14.Value = 2;
|
||||
//
|
||||
// signal15
|
||||
//
|
||||
this.signal15.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(188)))), ((int)(((byte)(212)))));
|
||||
this.signal15.Location = new System.Drawing.Point(3, 3);
|
||||
this.signal15.Name = "signal15";
|
||||
this.signal15.Size = new System.Drawing.Size(75, 32);
|
||||
this.signal15.StyleLine = true;
|
||||
this.signal15.TabIndex = 0;
|
||||
this.signal15.Text = "signal15";
|
||||
this.signal15.Value = 1;
|
||||
//
|
||||
// SignalDemo
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||
this.Controls.Add(this.stackPanel1);
|
||||
this.Name = "SignalDemo";
|
||||
this.Size = new System.Drawing.Size(700, 488);
|
||||
this.stackPanel1.ResumeLayout(false);
|
||||
this.flowPanel.ResumeLayout(false);
|
||||
this.flowPanel1.ResumeLayout(false);
|
||||
this.flowPanel3.ResumeLayout(false);
|
||||
this.flowPanel2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private AntdUI.StackPanel stackPanel1;
|
||||
private AntdUI.FlowPanel flowPanel;
|
||||
private AntdUI.Label label4;
|
||||
private AntdUI.Divider divider1;
|
||||
private AntdUI.Label label2;
|
||||
private AntdUI.Label label1;
|
||||
private AntdUI.Signal signal4;
|
||||
private AntdUI.Signal signal3;
|
||||
private AntdUI.Signal signal2;
|
||||
private AntdUI.Signal signal1;
|
||||
private AntdUI.Signal signal5;
|
||||
private AntdUI.Label label3;
|
||||
private AntdUI.FlowPanel flowPanel1;
|
||||
private AntdUI.Signal signal6;
|
||||
private AntdUI.Signal signal7;
|
||||
private AntdUI.Signal signal8;
|
||||
private AntdUI.Signal signal9;
|
||||
private AntdUI.Signal signal10;
|
||||
private AntdUI.Label label5;
|
||||
private AntdUI.FlowPanel flowPanel3;
|
||||
private AntdUI.Signal signal16;
|
||||
private AntdUI.Signal signal17;
|
||||
private AntdUI.Signal signal18;
|
||||
private AntdUI.Signal signal19;
|
||||
private AntdUI.Signal signal20;
|
||||
private AntdUI.FlowPanel flowPanel2;
|
||||
private AntdUI.Signal signal11;
|
||||
private AntdUI.Signal signal12;
|
||||
private AntdUI.Signal signal13;
|
||||
private AntdUI.Signal signal14;
|
||||
private AntdUI.Signal signal15;
|
||||
}
|
||||
}
|
||||
20
Views/SignalDemo.cs
Normal file
20
Views/SignalDemo.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AntdUIDemo.Views
|
||||
{
|
||||
public partial class SignalDemo : UserControl
|
||||
{
|
||||
public SignalDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
Views/SignalDemo.resx
Normal file
120
Views/SignalDemo.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
BIN
assets/screenshots/Icon.png
Normal file
BIN
assets/screenshots/Icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 290 KiB |
BIN
assets/screenshots/Signal.png
Normal file
BIN
assets/screenshots/Signal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 248 KiB |
Loading…
x
Reference in New Issue
Block a user