升级1.7.13,Calendar支持字符串,Modal支持拖拽

This commit is contained in:
czz_y
2024-12-25 09:00:01 +08:00
parent 5bbd4cbf1f
commit 9b9fa6411c
7 changed files with 37 additions and 5 deletions
+6 -1
View File
@@ -49,7 +49,12 @@ namespace AntdUIDemo.Views
return new List<DateBadge> {
new DateBadge(now.ToString("yyyy-MM-dd"),0),
new DateBadge(now.AddDays(-20).ToString("yyyy-MM-dd"),5),
new DateBadge(now.AddDays(-2).ToString("yyyy-MM-dd"),99),
new DateBadge(now.AddDays(-14).ToString("yyyy-MM-dd"), "休"),
new DateBadge(now.AddDays(-7).ToString("yyyy-MM-dd"), "休")
{
//圆角支持,默认值是6
Radius = 12
},
new DateBadge(now.AddDays(-6).ToString("yyyy-MM-dd"),998,Color.FromArgb(112, 237, 58)),
};
};
+15 -1
View File
@@ -45,6 +45,7 @@
this.button_base = new AntdUI.Button();
this.label3 = new AntdUI.Label();
this.header1 = new AntdUI.PageHeader();
this.button_drag = new AntdUI.Button();
this.stackPanel1.SuspendLayout();
this.flowPanel4.SuspendLayout();
this.flowPanel3.SuspendLayout();
@@ -195,6 +196,7 @@
//
// flowPanel2
//
this.flowPanel2.Controls.Add(this.button_drag);
this.flowPanel2.Controls.Add(this.button_base);
this.flowPanel2.Location = new System.Drawing.Point(3, 33);
this.flowPanel2.Name = "flowPanel2";
@@ -209,7 +211,7 @@
this.button_base.Name = "button_base";
this.button_base.Size = new System.Drawing.Size(90, 32);
this.button_base.TabIndex = 3;
this.button_base.Text = "Open Modal";
this.button_base.Text = "默认";
this.button_base.Type = AntdUI.TTypeMini.Primary;
this.button_base.WaveSize = 0;
//
@@ -236,6 +238,17 @@
this.header1.Text = "Modal 对话框";
this.header1.UseTitleFont = true;
//
// button_drag
//
this.button_drag.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button_drag.Location = new System.Drawing.Point(99, 3);
this.button_drag.Name = "button_drag";
this.button_drag.Size = new System.Drawing.Size(90, 32);
this.button_drag.TabIndex = 4;
this.button_drag.Text = "支持拖拽";
this.button_drag.Type = AntdUI.TTypeMini.Primary;
this.button_drag.WaveSize = 0;
//
// ModalDemo
//
this.Controls.Add(this.stackPanel1);
@@ -270,5 +283,6 @@
private AntdUI.Button button_sys;
private AntdUI.Label label6;
private AntdUI.PageHeader header1;
private AntdUI.Button button_drag;
}
}
+13
View File
@@ -20,6 +20,7 @@ namespace AntdUIDemo.Views
private void BindEventHandler()
{
button_base.Click += Button_base_Click;
button_drag.Click += Button_drag_Click;
button_nobutton.Click += Button_nobutton_Click;
button_custombutton.Click += Button_custombutton_Click;
button_nomask.Click += Button_nomask_Click;
@@ -28,6 +29,18 @@ namespace AntdUIDemo.Views
button_sys.Click += Button_sys_Click;
}
private void Button_drag_Click(object sender, EventArgs e)
{
AntdUI.Modal.open(new AntdUI.Modal.Config(window, "Basic Modal", "Some contents...\r\nSome contents...\r\nSome contents...")
{
Icon = TType.Info,
//内边距
Padding = new Size(24, 20),
//支持拖拽
Draggable = true,
});
}
private void Button_sys_Click(object sender, EventArgs e)
{
using (var form = new SystemSet(window))