This commit is contained in:
Sunny 2022-04-17 23:34:44 +08:00
parent 178fdd4a15
commit 9e48c68f62
13 changed files with 321 additions and 163 deletions

Binary file not shown.

Binary file not shown.

View File

@ -14,7 +14,7 @@ namespace Sunny.UI.Demo
}
/// <summary>
/// 放在 [窗体Load、重载OnLoad、重载Init] 的内容每次页面切换,进入页面都会执行。
/// 放在 [窗体Load (NeedReload = true)] 的内容每次页面切换,进入页面都会执行。
/// 这三个选一个用就行了。
/// </summary>
/// <param name="sender"></param>
@ -25,14 +25,14 @@ namespace Sunny.UI.Demo
}
//放在 [窗体Load、重载OnLoad、重载Init] 的内容每次页面切换,进入页面都会执行。
//放在 [窗体Load (NeedReload = true)] 的内容每次页面切换,进入页面都会执行。
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Console.WriteLine("3. FButton_OnLoad");
}
//放在 [窗体Load、重载OnLoad、重载Init] 的内容每次页面切换,进入页面都会执行。
//放在 [重载Init] 的内容每次页面切换,进入页面都会执行。
public override void Init()
{
base.Init();

View File

@ -97,6 +97,11 @@ namespace Sunny.UI.Demo
this.uiDatePicker3 = new Sunny.UI.UIDatePicker();
this.uiLine4 = new Sunny.UI.UILine();
this.uiComboDataGridView1 = new Sunny.UI.UIComboDataGridView();
this.uiLine5 = new Sunny.UI.UILine();
this.uiComboBox3 = new Sunny.UI.UIComboBox();
this.uiComboBox4 = new Sunny.UI.UIComboBox();
this.uiComboDataGridView2 = new Sunny.UI.UIComboDataGridView();
this.uiLine9 = new Sunny.UI.UILine();
this.SuspendLayout();
//
// uiComboTreeView3
@ -104,9 +109,8 @@ namespace Sunny.UI.Demo
this.uiComboTreeView3.CheckBoxes = true;
this.uiComboTreeView3.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.uiComboTreeView3.FillColor = System.Drawing.Color.White;
this.uiComboTreeView3.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiComboTreeView3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboTreeView3.Location = new System.Drawing.Point(544, 213);
this.uiComboTreeView3.Location = new System.Drawing.Point(544, 373);
this.uiComboTreeView3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboTreeView3.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboTreeView3.Name = "uiComboTreeView3";
@ -144,14 +148,14 @@ namespace Sunny.UI.Demo
this.uiComboTreeView3.Size = new System.Drawing.Size(150, 29);
this.uiComboTreeView3.TabIndex = 67;
this.uiComboTreeView3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboTreeView3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiComboTreeView4
//
this.uiComboTreeView4.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.uiComboTreeView4.FillColor = System.Drawing.Color.White;
this.uiComboTreeView4.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiComboTreeView4.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboTreeView4.Location = new System.Drawing.Point(386, 213);
this.uiComboTreeView4.Location = new System.Drawing.Point(386, 373);
this.uiComboTreeView4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboTreeView4.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboTreeView4.Name = "uiComboTreeView4";
@ -189,15 +193,15 @@ namespace Sunny.UI.Demo
this.uiComboTreeView4.Size = new System.Drawing.Size(150, 29);
this.uiComboTreeView4.TabIndex = 66;
this.uiComboTreeView4.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboTreeView4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiComboTreeView2
//
this.uiComboTreeView2.CheckBoxes = true;
this.uiComboTreeView2.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.uiComboTreeView2.FillColor = System.Drawing.Color.White;
this.uiComboTreeView2.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiComboTreeView2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboTreeView2.Location = new System.Drawing.Point(544, 169);
this.uiComboTreeView2.Location = new System.Drawing.Point(544, 329);
this.uiComboTreeView2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboTreeView2.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboTreeView2.Name = "uiComboTreeView2";
@ -218,27 +222,27 @@ namespace Sunny.UI.Demo
this.uiComboTreeView2.Size = new System.Drawing.Size(150, 29);
this.uiComboTreeView2.TabIndex = 65;
this.uiComboTreeView2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboTreeView2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiComboTreeView2.NodesSelected += new Sunny.UI.UIComboTreeView.OnNodesSelected(this.uiComboTreeView2_NodesSelected);
//
// uiLine1
//
this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine1.LineDashStyle = Sunny.UI.UILineDashStyle.None;
this.uiLine1.Location = new System.Drawing.Point(386, 134);
this.uiLine1.Location = new System.Drawing.Point(386, 294);
this.uiLine1.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine1.Name = "uiLine1";
this.uiLine1.Size = new System.Drawing.Size(308, 20);
this.uiLine1.TabIndex = 64;
this.uiLine1.Text = "UIComboTreeView";
this.uiLine1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLine1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiComboTreeView1
//
this.uiComboTreeView1.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.uiComboTreeView1.FillColor = System.Drawing.Color.White;
this.uiComboTreeView1.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiComboTreeView1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboTreeView1.Location = new System.Drawing.Point(386, 169);
this.uiComboTreeView1.Location = new System.Drawing.Point(386, 329);
this.uiComboTreeView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboTreeView1.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboTreeView1.Name = "uiComboTreeView1";
@ -259,26 +263,26 @@ namespace Sunny.UI.Demo
this.uiComboTreeView1.Size = new System.Drawing.Size(150, 29);
this.uiComboTreeView1.TabIndex = 63;
this.uiComboTreeView1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboTreeView1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiLine8
//
this.uiLine8.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine8.LineDashStyle = Sunny.UI.UILineDashStyle.None;
this.uiLine8.Location = new System.Drawing.Point(30, 257);
this.uiLine8.Location = new System.Drawing.Point(30, 337);
this.uiLine8.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine8.Name = "uiLine8";
this.uiLine8.Size = new System.Drawing.Size(308, 20);
this.uiLine8.TabIndex = 62;
this.uiLine8.Text = "UIDatetimePicker";
this.uiLine8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLine8.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiDatetimePicker1
//
this.uiDatetimePicker1.CanEmpty = true;
this.uiDatetimePicker1.FillColor = System.Drawing.Color.White;
this.uiDatetimePicker1.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiDatetimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiDatetimePicker1.Location = new System.Drawing.Point(30, 292);
this.uiDatetimePicker1.Location = new System.Drawing.Point(30, 372);
this.uiDatetimePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiDatetimePicker1.MaxLength = 19;
this.uiDatetimePicker1.MinimumSize = new System.Drawing.Size(63, 0);
@ -291,13 +295,13 @@ namespace Sunny.UI.Demo
this.uiDatetimePicker1.Text = "2020-06-02 17:57:28";
this.uiDatetimePicker1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiDatetimePicker1.Value = new System.DateTime(2020, 6, 2, 17, 57, 28, 203);
this.uiDatetimePicker1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiDatetimePicker1.ValueChanged += new Sunny.UI.UIDatetimePicker.OnDateTimeChanged(this.uiDatetimePicker1_ValueChanged);
//
// uiColorPicker1
//
this.uiColorPicker1.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.uiColorPicker1.FillColor = System.Drawing.Color.White;
this.uiColorPicker1.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiColorPicker1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiColorPicker1.Location = new System.Drawing.Point(388, 89);
this.uiColorPicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
@ -306,16 +310,14 @@ namespace Sunny.UI.Demo
this.uiColorPicker1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiColorPicker1.Size = new System.Drawing.Size(150, 29);
this.uiColorPicker1.TabIndex = 60;
this.uiColorPicker1.Text = "uiColorPicker1";
this.uiColorPicker1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiColorPicker1.Value = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.uiColorPicker1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiColorPicker1.ValueChanged += new Sunny.UI.UIColorPicker.OnColorChanged(this.uiColorPicker1_ValueChanged);
this.uiColorPicker1.Click += new System.EventHandler(this.uiColorPicker1_Click);
//
// uiLine7
//
this.uiLine7.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine7.LineDashStyle = Sunny.UI.UILineDashStyle.None;
this.uiLine7.Location = new System.Drawing.Point(388, 55);
this.uiLine7.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine7.Name = "uiLine7";
@ -323,26 +325,26 @@ namespace Sunny.UI.Demo
this.uiLine7.TabIndex = 59;
this.uiLine7.Text = "UIColorPicker";
this.uiLine7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLine7.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiLine6
//
this.uiLine6.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine6.LineDashStyle = Sunny.UI.UILineDashStyle.None;
this.uiLine6.Location = new System.Drawing.Point(30, 336);
this.uiLine6.Location = new System.Drawing.Point(30, 416);
this.uiLine6.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine6.Name = "uiLine6";
this.uiLine6.Size = new System.Drawing.Size(308, 20);
this.uiLine6.TabIndex = 58;
this.uiLine6.Text = "UITimePicker";
this.uiLine6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLine6.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiTimePicker1
//
this.uiTimePicker1.CanEmpty = true;
this.uiTimePicker1.FillColor = System.Drawing.Color.White;
this.uiTimePicker1.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiTimePicker1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiTimePicker1.Location = new System.Drawing.Point(30, 371);
this.uiTimePicker1.Location = new System.Drawing.Point(30, 451);
this.uiTimePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiTimePicker1.MaxLength = 8;
this.uiTimePicker1.MinimumSize = new System.Drawing.Size(63, 0);
@ -355,24 +357,24 @@ namespace Sunny.UI.Demo
this.uiTimePicker1.Text = "23:41:39";
this.uiTimePicker1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiTimePicker1.Value = new System.DateTime(2020, 5, 29, 23, 41, 39, 684);
this.uiTimePicker1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiTimePicker1.ValueChanged += new Sunny.UI.UITimePicker.OnDateTimeChanged(this.uiTimePicker1_ValueChanged);
//
// uiLine3
//
this.uiLine3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine3.LineDashStyle = Sunny.UI.UILineDashStyle.None;
this.uiLine3.Location = new System.Drawing.Point(30, 134);
this.uiLine3.Location = new System.Drawing.Point(30, 214);
this.uiLine3.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine3.Name = "uiLine3";
this.uiLine3.Size = new System.Drawing.Size(308, 20);
this.uiLine3.TabIndex = 56;
this.uiLine3.Text = "UIDatePicker";
this.uiLine3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLine3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiLine2
//
this.uiLine2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine2.LineDashStyle = Sunny.UI.UILineDashStyle.None;
this.uiLine2.Location = new System.Drawing.Point(30, 55);
this.uiLine2.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine2.Name = "uiLine2";
@ -380,15 +382,15 @@ namespace Sunny.UI.Demo
this.uiLine2.TabIndex = 55;
this.uiLine2.Text = "UIComboBox";
this.uiLine2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLine2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiDatePicker1
//
this.uiDatePicker1.CanEmpty = true;
this.uiDatePicker1.DateFormat = "yyyy";
this.uiDatePicker1.FillColor = System.Drawing.Color.White;
this.uiDatePicker1.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiDatePicker1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiDatePicker1.Location = new System.Drawing.Point(30, 169);
this.uiDatePicker1.Location = new System.Drawing.Point(30, 249);
this.uiDatePicker1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiDatePicker1.MaxLength = 4;
this.uiDatePicker1.MinimumSize = new System.Drawing.Size(63, 0);
@ -403,6 +405,7 @@ namespace Sunny.UI.Demo
this.uiDatePicker1.Text = "2020";
this.uiDatePicker1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiDatePicker1.Value = new System.DateTime(2020, 4, 16, 0, 0, 0, 0);
this.uiDatePicker1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiDatePicker1.ValueChanged += new Sunny.UI.UIDatePicker.OnDateTimeChanged(this.uiDatePicker1_ValueChanged);
//
// uiComboBox2
@ -411,7 +414,7 @@ namespace Sunny.UI.Demo
this.uiComboBox2.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.uiComboBox2.DropDownWidth = 300;
this.uiComboBox2.FillColor = System.Drawing.Color.White;
this.uiComboBox2.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiComboBox2.FilterMaxCount = 50;
this.uiComboBox2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboBox2.Location = new System.Drawing.Point(188, 89);
this.uiComboBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
@ -421,12 +424,13 @@ namespace Sunny.UI.Demo
this.uiComboBox2.Size = new System.Drawing.Size(150, 29);
this.uiComboBox2.TabIndex = 53;
this.uiComboBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiComboBox1
//
this.uiComboBox1.DataSource = null;
this.uiComboBox1.FillColor = System.Drawing.Color.White;
this.uiComboBox1.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiComboBox1.FilterMaxCount = 50;
this.uiComboBox1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboBox1.Items.AddRange(new object[] {
"1",
@ -434,7 +438,13 @@ namespace Sunny.UI.Demo
"3",
"4",
"5",
"6"});
"6",
"11",
"12",
"13",
"14",
"15",
"16"});
this.uiComboBox1.Location = new System.Drawing.Point(30, 90);
this.uiComboBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboBox1.MinimumSize = new System.Drawing.Size(63, 0);
@ -446,16 +456,15 @@ namespace Sunny.UI.Demo
this.uiComboBox1.TabIndex = 52;
this.uiComboBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboBox1.Watermark = "水印文字";
this.uiComboBox1.DropDown += new System.EventHandler(this.uiComboBox1_DropDown);
this.uiComboBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiDatePicker2
//
this.uiDatePicker2.CanEmpty = true;
this.uiDatePicker2.DateFormat = "yyyy-MM";
this.uiDatePicker2.FillColor = System.Drawing.Color.White;
this.uiDatePicker2.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiDatePicker2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiDatePicker2.Location = new System.Drawing.Point(188, 169);
this.uiDatePicker2.Location = new System.Drawing.Point(188, 249);
this.uiDatePicker2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiDatePicker2.MaxLength = 7;
this.uiDatePicker2.MinimumSize = new System.Drawing.Size(63, 0);
@ -470,14 +479,14 @@ namespace Sunny.UI.Demo
this.uiDatePicker2.Text = "2020-04";
this.uiDatePicker2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiDatePicker2.Value = new System.DateTime(2020, 4, 16, 0, 0, 0, 0);
this.uiDatePicker2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiDatePicker3
//
this.uiDatePicker3.CanEmpty = true;
this.uiDatePicker3.FillColor = System.Drawing.Color.White;
this.uiDatePicker3.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiDatePicker3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiDatePicker3.Location = new System.Drawing.Point(30, 213);
this.uiDatePicker3.Location = new System.Drawing.Point(30, 293);
this.uiDatePicker3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiDatePicker3.MaxLength = 10;
this.uiDatePicker3.MinimumSize = new System.Drawing.Size(63, 0);
@ -491,44 +500,147 @@ namespace Sunny.UI.Demo
this.uiDatePicker3.Text = "2020-04-16";
this.uiDatePicker3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiDatePicker3.Value = new System.DateTime(2020, 4, 16, 0, 0, 0, 0);
this.uiDatePicker3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiDatePicker3.ValueChanged += new Sunny.UI.UIDatePicker.OnDateTimeChanged(this.uiDatePicker3_ValueChanged);
//
// uiLine4
//
this.uiLine4.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine4.LineDashStyle = Sunny.UI.UILineDashStyle.None;
this.uiLine4.Location = new System.Drawing.Point(386, 257);
this.uiLine4.Location = new System.Drawing.Point(386, 134);
this.uiLine4.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine4.Name = "uiLine4";
this.uiLine4.Size = new System.Drawing.Size(308, 20);
this.uiLine4.TabIndex = 73;
this.uiLine4.Text = "UIComboDataGridView";
this.uiLine4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLine4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiComboDataGridView1
//
this.uiComboDataGridView1.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.uiComboDataGridView1.FillColor = System.Drawing.Color.White;
this.uiComboDataGridView1.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.uiComboDataGridView1.FilterColumnName = null;
this.uiComboDataGridView1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboDataGridView1.Location = new System.Drawing.Point(386, 292);
this.uiComboDataGridView1.Location = new System.Drawing.Point(386, 169);
this.uiComboDataGridView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboDataGridView1.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboDataGridView1.Name = "uiComboDataGridView1";
this.uiComboDataGridView1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiComboDataGridView1.ShowFilter = false;
this.uiComboDataGridView1.Size = new System.Drawing.Size(308, 29);
this.uiComboDataGridView1.TabIndex = 74;
this.uiComboDataGridView1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboDataGridView1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiComboDataGridView1.SelectIndexChange += new Sunny.UI.UIDataGridView.OnSelectIndexChange(this.uiComboDataGridView1_SelectIndexChange_1);
this.uiComboDataGridView1.ValueChanged += new Sunny.UI.UIComboDataGridView.OnValueChanged(this.uiComboDataGridView1_ValueChanged);
//
// uiLine5
//
this.uiLine5.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine5.Location = new System.Drawing.Point(30, 134);
this.uiLine5.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine5.Name = "uiLine5";
this.uiLine5.Size = new System.Drawing.Size(308, 20);
this.uiLine5.TabIndex = 77;
this.uiLine5.Text = "UIComboBox (ShowFilter)";
this.uiLine5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLine5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiComboBox3
//
this.uiComboBox3.DataSource = null;
this.uiComboBox3.DropDownWidth = 300;
this.uiComboBox3.FillColor = System.Drawing.Color.White;
this.uiComboBox3.FilterMaxCount = 50;
this.uiComboBox3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboBox3.Location = new System.Drawing.Point(188, 168);
this.uiComboBox3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboBox3.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboBox3.Name = "uiComboBox3";
this.uiComboBox3.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiComboBox3.ShowFilter = true;
this.uiComboBox3.Size = new System.Drawing.Size(150, 29);
this.uiComboBox3.TabIndex = 76;
this.uiComboBox3.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboBox3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiComboBox3.SelectedValueChanged += new System.EventHandler(this.uiComboBox3_SelectedValueChanged);
//
// uiComboBox4
//
this.uiComboBox4.DataSource = null;
this.uiComboBox4.FillColor = System.Drawing.Color.White;
this.uiComboBox4.FilterMaxCount = 50;
this.uiComboBox4.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboBox4.Items.AddRange(new object[] {
"1",
"2",
"3",
"4",
"5",
"6",
"11",
"12",
"13",
"14",
"15",
"16",
"111",
"112",
"113",
"114",
"115",
"116"});
this.uiComboBox4.Location = new System.Drawing.Point(30, 169);
this.uiComboBox4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboBox4.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboBox4.Name = "uiComboBox4";
this.uiComboBox4.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiComboBox4.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.uiComboBox4.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom;
this.uiComboBox4.ShowFilter = true;
this.uiComboBox4.Size = new System.Drawing.Size(150, 29);
this.uiComboBox4.TabIndex = 75;
this.uiComboBox4.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboBox4.Watermark = "水印文字";
this.uiComboBox4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiComboBox4.SelectedValueChanged += new System.EventHandler(this.uiComboBox4_SelectedValueChanged);
//
// uiComboDataGridView2
//
this.uiComboDataGridView2.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList;
this.uiComboDataGridView2.FillColor = System.Drawing.Color.White;
this.uiComboDataGridView2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiComboDataGridView2.Location = new System.Drawing.Point(386, 249);
this.uiComboDataGridView2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiComboDataGridView2.MinimumSize = new System.Drawing.Size(63, 0);
this.uiComboDataGridView2.Name = "uiComboDataGridView2";
this.uiComboDataGridView2.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
this.uiComboDataGridView2.Size = new System.Drawing.Size(308, 29);
this.uiComboDataGridView2.TabIndex = 79;
this.uiComboDataGridView2.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.uiComboDataGridView2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.uiComboDataGridView2.ValueChanged += new Sunny.UI.UIComboDataGridView.OnValueChanged(this.uiComboDataGridView2_ValueChanged);
//
// uiLine9
//
this.uiLine9.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine9.Location = new System.Drawing.Point(386, 214);
this.uiLine9.MinimumSize = new System.Drawing.Size(16, 16);
this.uiLine9.Name = "uiLine9";
this.uiLine9.Size = new System.Drawing.Size(308, 20);
this.uiLine9.TabIndex = 78;
this.uiLine9.Text = "UIComboDataGridView (MultiSelect)";
this.uiLine9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.uiLine9.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// FCombobox
//
this.AllowShowTitle = true;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(765, 522);
this.Controls.Add(this.uiComboDataGridView2);
this.Controls.Add(this.uiLine9);
this.Controls.Add(this.uiLine5);
this.Controls.Add(this.uiComboBox3);
this.Controls.Add(this.uiComboBox4);
this.Controls.Add(this.uiComboDataGridView1);
this.Controls.Add(this.uiLine4);
this.Controls.Add(this.uiDatePicker3);
@ -579,5 +691,10 @@ namespace Sunny.UI.Demo
private UIDatePicker uiDatePicker3;
private UILine uiLine4;
private UIComboDataGridView uiComboDataGridView1;
private UILine uiLine5;
private UIComboBox uiComboBox3;
private UIComboBox uiComboBox4;
private UIComboDataGridView uiComboDataGridView2;
private UILine uiLine9;
}
}

View File

@ -12,17 +12,28 @@ namespace Sunny.UI.Demo
InitializeComponent();
IList<Info> infoList = new List<Info>();
Info info1 = new Info() { Id = "1", Name = "张三" };
Info info2 = new Info() { Id = "2", Name = "李四" };
Info info3 = new Info() { Id = "3", Name = "王五" };
infoList.Add(info1);
infoList.Add(info2);
infoList.Add(info3);
for (int i = 0; i < 120; i++)
{
infoList.Add(new Info() { Id = i.ToString(), Name = "节点" + i });
}
uiComboBox2.ValueMember = "Id";
uiComboBox2.DisplayMember = "Name";
uiComboBox2.DataSource = infoList;
uiComboBox3.ValueMember = "Id";
uiComboBox3.DisplayMember = "Name";
uiComboBox3.DataSource = infoList;
dt.Columns.Add("Column1", typeof(string));
dt.Columns.Add("Column2", typeof(string));
dt.Columns.Add("Column3", typeof(string));
for (int i = 0; i < 100; i++)
{
dt.Rows.Add("A" + i.ToString("D2"), "B" + (i + 1).ToString("D2"), "C" + (i + 2).ToString("D2"));
}
uiComboDataGridView1.DataGridView.Init();
uiComboDataGridView1.ItemSize = new System.Drawing.Size(360, 240);
uiComboDataGridView1.DataGridView.AddColumn("Column1", "Column1");
@ -30,22 +41,20 @@ namespace Sunny.UI.Demo
uiComboDataGridView1.DataGridView.AddColumn("Column3", "Column3");
uiComboDataGridView1.DataGridView.ReadOnly = true;
uiComboDataGridView1.SelectIndexChange += UiComboDataGridView1_SelectIndexChange;
dt.Columns.Add("Column1", typeof(string));
dt.Columns.Add("Column2", typeof(string));
dt.Columns.Add("Column3", typeof(string));
for (int i = 0; i < 100; i++)
{
dt.Rows.Add("A" + i.ToString("D2"),
"B" + (i + 1).ToString("D2"),
"C" + (i + 2).ToString("D2"));
}
uiComboDataGridView1.ShowFilter = true;
uiComboDataGridView1.DataGridView.DataSource = dt;
uiComboDataGridView1.FilterColumnName = "Column1"; //不设置则全部列过滤
uiComboDataGridView2.DataGridView.Init();
uiComboDataGridView2.DataGridView.MultiSelect = true;//设置可多选
uiComboDataGridView2.ItemSize = new System.Drawing.Size(360, 240);
uiComboDataGridView2.DataGridView.AddColumn("Column1", "Column1");
uiComboDataGridView2.DataGridView.AddColumn("Column2", "Column2");
uiComboDataGridView2.DataGridView.AddColumn("Column3", "Column3");
uiComboDataGridView2.DataGridView.ReadOnly = true;
uiComboDataGridView2.ShowFilter = true;
uiComboDataGridView2.DataGridView.DataSource = dt;
uiComboDataGridView2.FilterColumnName = "Column1"; //不设置则全部列过滤
}
private void UiComboDataGridView1_SelectIndexChange(object sender, int index)
@ -59,15 +68,11 @@ namespace Sunny.UI.Demo
{
public string Id { get; set; }
public string Name { get; set; }
}
private void uiComboBox1_DropDown(object sender, System.EventArgs e)
public override string ToString()
{
uiComboBox1.Items.Clear();
uiComboBox1.Items.Add("100");
uiComboBox1.Items.Add("101");
uiComboBox1.Items.Add("102");
uiComboBox1.Items.Add("103");
return "ID: " + Id + ", Name: " + Name;
}
}
private void uiDatePicker1_ValueChanged(object sender, System.DateTime value)
@ -136,5 +141,40 @@ namespace Sunny.UI.Demo
ShowInfoTip(uiDatePicker3.Value.DateString());
Console.WriteLine(uiDatePicker3.Value);
}
private void uiComboBox3_SelectedValueChanged(object sender, EventArgs e)
{
uiComboBox3.SelectedValue.WriteConsole();
uiComboBox3.SelectedItem.WriteConsole();
uiComboBox3.Text.WriteConsole();
}
private void uiComboBox4_SelectedValueChanged(object sender, EventArgs e)
{
uiComboBox4.SelectedValue.WriteConsole();
uiComboBox4.SelectedItem.WriteConsole();
uiComboBox4.Text.WriteConsole();
}
private void uiComboDataGridView2_ValueChanged(object sender, object value)
{
if (value == null)
{
uiComboDataGridView2.Text = "";
}
else
{
uiComboDataGridView2.Text = "";
if (value is DataGridViewSelectedRowCollection collection)
{
foreach (var item in collection)
{
DataGridViewRow row = (DataGridViewRow)item;
uiComboDataGridView2.Text += row.Cells["Column1"].Value.ToString();
uiComboDataGridView2.Text += "; ";
}
}
}
}
}
}

View File

@ -5,8 +5,6 @@
public FNavigation()
{
InitializeComponent();
uiNavBar1.SetNodeItem(uiNavBar1.Nodes[0].Nodes[0], new NavMenuItem(100));
uiNavBar1.SetNodeItem(uiNavBar1.Nodes[0].Nodes[1], new NavMenuItem(101));
}
private void uiNavBar1_MenuItemClick(string itemText, int menuIndex, int pageIndex)

View File

@ -38,8 +38,8 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="SunnyUI, Version=3.1.3.0, Culture=neutral, PublicKeyToken=27d7d2e821d97aeb, processorArchitecture=MSIL">
<HintPath>..\packages\SunnyUI.3.1.3\lib\net40\SunnyUI.dll</HintPath>
<Reference Include="SunnyUI, Version=3.1.5.0, Culture=neutral, PublicKeyToken=27d7d2e821d97aeb, processorArchitecture=MSIL">
<HintPath>..\packages\SunnyUI.3.1.5\lib\net40\SunnyUI.dll</HintPath>
</Reference>
<Reference Include="SunnyUI.Common, Version=3.1.2.0, Culture=neutral, PublicKeyToken=5a271fb7ba597231, processorArchitecture=MSIL">
<HintPath>..\packages\SunnyUI.Common.3.1.2\lib\net40\SunnyUI.Common.dll</HintPath>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SunnyUI" version="3.1.3" targetFramework="net40" />
<package id="SunnyUI" version="3.1.5" targetFramework="net40" />
<package id="SunnyUI.Common" version="3.1.2" targetFramework="net40" />
</packages>

View File

@ -66,19 +66,19 @@ namespace Sunny.UI
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel = new Sunny.UI.UIPanel();
this.btnCancel = new Sunny.UI.UISymbolButton();
this.btnOK = new Sunny.UI.UISymbolButton();
this.dataGridView = new Sunny.UI.UIDataGridView();
this.pFilter = new Sunny.UI.UIPanel();
this.btnClear = new Sunny.UI.UISymbolButton();
this.btnSearch = new Sunny.UI.UISymbolButton();
this.edtFilter = new Sunny.UI.UITextBox();
this.btnClear = new Sunny.UI.UISymbolButton();
this.panel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.pFilter.SuspendLayout();
@ -102,29 +102,32 @@ namespace Sunny.UI
this.panel.Text = null;
this.panel.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
this.panel.Visible = false;
this.panel.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCancel.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
this.btnCancel.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(127)))), ((int)(((byte)(128)))));
this.btnCancel.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
this.btnCancel.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
this.btnCancel.FillColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
this.btnCancel.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(115)))), ((int)(((byte)(115)))));
this.btnCancel.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btnCancel.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.btnCancel.Location = new System.Drawing.Point(478, 8);
this.btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
this.btnCancel.Name = "btnCancel";
this.btnCancel.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
this.btnCancel.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(127)))), ((int)(((byte)(128)))));
this.btnCancel.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
this.btnCancel.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(87)))), ((int)(((byte)(89)))));
this.btnCancel.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(115)))), ((int)(((byte)(115)))));
this.btnCancel.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btnCancel.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btnCancel.Size = new System.Drawing.Size(80, 29);
this.btnCancel.Style = Sunny.UI.UIStyle.Red;
this.btnCancel.StyleCustomMode = true;
this.btnCancel.Symbol = 61453;
this.btnCancel.TabIndex = 1;
this.btnCancel.Text = "取消";
this.btnCancel.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnOK
@ -138,53 +141,58 @@ namespace Sunny.UI
this.btnOK.Size = new System.Drawing.Size(80, 29);
this.btnOK.TabIndex = 0;
this.btnOK.Text = "确定";
this.btnOK.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// dataGridView
//
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.dataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
this.dataGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
this.dataGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
this.dataGridView.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255)))));
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView.DefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView.DefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView.EnableHeadersVisualStyles = false;
this.dataGridView.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.dataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.dataGridView.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
this.dataGridView.Location = new System.Drawing.Point(0, 44);
this.dataGridView.MultiSelect = false;
this.dataGridView.Name = "dataGridView";
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dataGridView.RowHeight = 25;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
this.dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle10;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
this.dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle5;
this.dataGridView.RowTemplate.Height = 25;
this.dataGridView.SelectedIndex = -1;
this.dataGridView.ShowGridLine = true;
this.dataGridView.Size = new System.Drawing.Size(569, 245);
this.dataGridView.TabIndex = 3;
this.dataGridView.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// pFilter
//
@ -204,36 +212,7 @@ namespace Sunny.UI
this.pFilter.TabIndex = 4;
this.pFilter.Text = null;
this.pFilter.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.btnSearch.Location = new System.Drawing.Point(389, 8);
this.btnSearch.MinimumSize = new System.Drawing.Size(1, 1);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(80, 29);
this.btnSearch.Symbol = 61442;
this.btnSearch.TabIndex = 1;
this.btnSearch.Text = "搜索";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// edtFilter
//
this.edtFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.edtFilter.Cursor = System.Windows.Forms.Cursors.IBeam;
this.edtFilter.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.edtFilter.Location = new System.Drawing.Point(17, 10);
this.edtFilter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.edtFilter.Maximum = 2147483647D;
this.edtFilter.Minimum = -2147483648D;
this.edtFilter.MinimumSize = new System.Drawing.Size(1, 16);
this.edtFilter.Name = "edtFilter";
this.edtFilter.Size = new System.Drawing.Size(363, 25);
this.edtFilter.TabIndex = 0;
this.edtFilter.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.pFilter.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// btnClear
//
@ -248,8 +227,40 @@ namespace Sunny.UI
this.btnClear.SymbolSize = 22;
this.btnClear.TabIndex = 2;
this.btnClear.Text = "清除";
this.btnClear.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.btnSearch.Location = new System.Drawing.Point(389, 8);
this.btnSearch.MinimumSize = new System.Drawing.Size(1, 1);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(80, 29);
this.btnSearch.Symbol = 61442;
this.btnSearch.TabIndex = 1;
this.btnSearch.Text = "搜索";
this.btnSearch.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// edtFilter
//
this.edtFilter.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.edtFilter.Cursor = System.Windows.Forms.Cursors.IBeam;
this.edtFilter.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.edtFilter.Location = new System.Drawing.Point(17, 10);
this.edtFilter.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.edtFilter.MinimumSize = new System.Drawing.Size(1, 16);
this.edtFilter.Name = "edtFilter";
this.edtFilter.ShowText = false;
this.edtFilter.Size = new System.Drawing.Size(363, 25);
this.edtFilter.TabIndex = 0;
this.edtFilter.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
this.edtFilter.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// UIComboDataGridViewItem
//
this.Controls.Add(this.dataGridView);
@ -258,7 +269,6 @@ namespace Sunny.UI
this.Name = "UIComboDataGridViewItem";
this.Size = new System.Drawing.Size(569, 333);
this.panel.ResumeLayout(false);
this.dataGridView.DataSourceChanged += DataGridView_DataSourceChanged;
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.pFilter.ResumeLayout(false);
this.ResumeLayout(false);

View File

@ -89,13 +89,6 @@ namespace Sunny.UI
ItemForm = new UIDropDown(item);
}
[DefaultValue(false), Description("行多选"), Category("SunnyUI")]
public bool MultiSelect
{
get => DataGridView.MultiSelect;
set => DataGridView.MultiSelect = value;
}
public UIDataGridView DataGridView => item.DataGridView;
public event OnSelectIndexChange SelectIndexChange;
@ -105,7 +98,7 @@ namespace Sunny.UI
protected override void ItemForm_ValueChanged(object sender, object value)
{
if (MultiSelect)
if (DataGridView.MultiSelect)
{
ValueChanged?.Invoke(this, value);
}

View File

@ -271,7 +271,7 @@ namespace Sunny.UI
CellBorderStyle = DataGridViewCellBorderStyle.None;
//禁止行多选
//MultiSelect = false;
MultiSelect = false;
//不显示数据行标题
RowHeadersVisible = false;

View File

@ -29,7 +29,7 @@ namespace Sunny.UI
/// <summary>
/// 版本
/// </summary>
public const string Version = "SunnyUI.Net V3.1.3";
public const string Version = "SunnyUI.Net V3.1.5";
public const int EditorMinHeight = 20;
public const int EditorMaxHeight = 60;

View File

@ -9,7 +9,7 @@
<Description>SunnyUI.Net 是基于.Net Framework 4.0+、.Net 5、.Net 6 框架的 C# WinForm 开源控件库、工具类库、扩展类库、多页面开发框架。</Description>
<Copyright>CopyRight © SunnyUI.Net 2012-2022</Copyright>
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
<Version>3.1.3</Version>
<Version>3.1.5</Version>
<Authors>ShenYonghua</Authors>
<Company>SunnyUI.Net</Company>
<PackageId>SunnyUI</PackageId>