diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index 7afa2939..be405294 100644 Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ diff --git a/Bin/net45/SunnyUI.dll b/Bin/net45/SunnyUI.dll index 0479229c..881d6e3d 100644 Binary files a/Bin/net45/SunnyUI.dll and b/Bin/net45/SunnyUI.dll differ diff --git a/Bin/net5.0-windows/SunnyUI.dll b/Bin/net5.0-windows/SunnyUI.dll index 898e7c0d..e782fe73 100644 Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ diff --git a/Bin/net5.0-windows/ref/SunnyUI.dll b/Bin/net5.0-windows/ref/SunnyUI.dll index 4678e417..edfe3803 100644 Binary files a/Bin/net5.0-windows/ref/SunnyUI.dll and b/Bin/net5.0-windows/ref/SunnyUI.dll differ diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll index 756f9cc6..178bab53 100644 Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ diff --git a/SunnyUI.Net5.Demo/bin/net5.0-windows/SunnyUI.Net5.Demo.dll b/SunnyUI.Net5.Demo/bin/net5.0-windows/SunnyUI.Net5.Demo.dll index df2643e2..ecd20439 100644 Binary files a/SunnyUI.Net5.Demo/bin/net5.0-windows/SunnyUI.Net5.Demo.dll and b/SunnyUI.Net5.Demo/bin/net5.0-windows/SunnyUI.Net5.Demo.dll differ diff --git a/SunnyUI.Net5.Demo/bin/net5.0-windows/ref/SunnyUI.Net5.Demo.dll b/SunnyUI.Net5.Demo/bin/net5.0-windows/ref/SunnyUI.Net5.Demo.dll index 6a6c2fab..87cb2778 100644 Binary files a/SunnyUI.Net5.Demo/bin/net5.0-windows/ref/SunnyUI.Net5.Demo.dll and b/SunnyUI.Net5.Demo/bin/net5.0-windows/ref/SunnyUI.Net5.Demo.dll differ diff --git a/SunnyUI/Controls/UIControl.cs b/SunnyUI/Controls/UIControl.cs index d5d75d03..ea870ade 100644 --- a/SunnyUI/Controls/UIControl.cs +++ b/SunnyUI/Controls/UIControl.cs @@ -69,14 +69,20 @@ namespace Sunny.UI /// [DefaultValue(null)] [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] - public string TagString { get; set; } + public string TagString + { + get; set; + } /// /// 自定义主题风格 /// [DefaultValue(false)] [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] - public bool StyleCustomMode { get; set; } + public bool StyleCustomMode + { + get; set; + } /// /// 是否在设计期 @@ -89,7 +95,8 @@ namespace Sunny.UI { return true; } - else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv") + + if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv") { return true; } @@ -219,7 +226,10 @@ namespace Sunny.UI /// /// 版本 /// - public string Version { get; } + public string Version + { + get; + } /// /// 设置主题样式 @@ -367,9 +377,19 @@ namespace Sunny.UI color = rectPressColor; if (selected) color = rectSelectedColor; + if (ShowFocusColor && Focused) + color = rectPressColor; return Enabled ? color : rectDisableColor; } + [Description("是否显示激活状态颜色"), Category("SunnyUI")] + [DefaultValue(false)] + public bool ShowFocusColor + { + get; + set; + } + /// /// 获取字体颜色 /// @@ -384,6 +404,8 @@ namespace Sunny.UI color = forePressColor; if (selected) color = foreSelectedColor; + if (ShowFocusColor && Focused) + color = forePressColor; return Enabled ? color : foreDisableColor; } @@ -401,6 +423,8 @@ namespace Sunny.UI color = fillPressColor; if (selected) color = fillSelectedColor; + if (ShowFocusColor && Focused) + color = fillPressColor; return Enabled ? color : fillDisableColor; } diff --git a/SunnyUI/Controls/UIPanel.cs b/SunnyUI/Controls/UIPanel.cs index cbc6d1ac..bb0028a4 100644 --- a/SunnyUI/Controls/UIPanel.cs +++ b/SunnyUI/Controls/UIPanel.cs @@ -75,7 +75,10 @@ namespace Sunny.UI /// [DefaultValue(null)] [Description("获取或设置包含有关控件的数据的对象字符串"), Category("SunnyUI")] - public string TagString { get; set; } + public string TagString + { + get; set; + } private string text; @@ -486,7 +489,10 @@ namespace Sunny.UI /// [DefaultValue(false)] [Description("获取或设置可以自定义主题风格"), Category("SunnyUI")] - public bool StyleCustomMode { get; set; } + public bool StyleCustomMode + { + get; set; + } protected UIStyle _style = UIStyle.Blue; @@ -597,7 +603,10 @@ namespace Sunny.UI public event EventHandler RectColorChanged; - public string Version { get; } + public string Version + { + get; + } private ContentAlignment _textAlignment = ContentAlignment.MiddleCenter; diff --git a/SunnyUI/Forms/UIDataGridViewForm.Designer.cs b/SunnyUI/Forms/UIDataGridViewForm.Designer.cs index f8b62408..95d6a0f0 100644 --- a/SunnyUI/Forms/UIDataGridViewForm.Designer.cs +++ b/SunnyUI/Forms/UIDataGridViewForm.Designer.cs @@ -32,6 +32,7 @@ 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.Grid = new Sunny.UI.UIDataGridView(); this.Panel = new Sunny.UI.UIPanel(); this.uiSymbolButton4 = new Sunny.UI.UISymbolButton(); @@ -47,6 +48,7 @@ // this.PagePanel.Controls.Add(this.Grid); this.PagePanel.Controls.Add(this.Panel); + this.PagePanel.Size = new System.Drawing.Size(1264, 852); // // Grid // @@ -56,16 +58,16 @@ this.Grid.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; 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); + 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.SystemColors.Highlight; + 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.Grid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.Grid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F); + 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)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255))))); dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); @@ -73,16 +75,25 @@ this.Grid.DefaultCellStyle = dataGridViewCellStyle3; this.Grid.Dock = System.Windows.Forms.DockStyle.Fill; this.Grid.EnableHeadersVisualStyles = false; - this.Grid.Font = new System.Drawing.Font("微软雅黑", 12F); + this.Grid.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.Grid.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.Grid.Location = new System.Drawing.Point(0, 0); this.Grid.Name = "Grid"; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; - this.Grid.RowsDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((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.White; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.Grid.RowHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.Grid.RowHeight = 29; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + this.Grid.RowsDefaultCellStyle = dataGridViewCellStyle5; this.Grid.RowTemplate.Height = 29; this.Grid.SelectedIndex = -1; this.Grid.ShowGridLine = true; - this.Grid.Size = new System.Drawing.Size(800, 360); + this.Grid.Size = new System.Drawing.Size(1264, 797); this.Grid.TabIndex = 0; // // Panel @@ -92,25 +103,27 @@ this.Panel.Controls.Add(this.uiSymbolButton2); this.Panel.Controls.Add(this.uiSymbolButton1); this.Panel.Dock = System.Windows.Forms.DockStyle.Bottom; - this.Panel.Font = new System.Drawing.Font("微软雅黑", 12F); - this.Panel.Location = new System.Drawing.Point(0, 360); + this.Panel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); + this.Panel.Location = new System.Drawing.Point(0, 797); this.Panel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Panel.MinimumSize = new System.Drawing.Size(1, 1); this.Panel.Name = "Panel"; this.Panel.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.Panel.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)(((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); - this.Panel.Size = new System.Drawing.Size(800, 55); + this.Panel.Size = new System.Drawing.Size(1264, 55); this.Panel.TabIndex = 1; this.Panel.Text = null; + this.Panel.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; // // uiSymbolButton4 // this.uiSymbolButton4.Cursor = System.Windows.Forms.Cursors.Hand; - this.uiSymbolButton4.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiSymbolButton4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiSymbolButton4.Location = new System.Drawing.Point(345, 10); this.uiSymbolButton4.MinimumSize = new System.Drawing.Size(1, 1); this.uiSymbolButton4.Name = "uiSymbolButton4"; + this.uiSymbolButton4.ShowFocusColor = true; this.uiSymbolButton4.Size = new System.Drawing.Size(100, 35); this.uiSymbolButton4.Symbol = 61639; this.uiSymbolButton4.TabIndex = 3; @@ -120,10 +133,11 @@ // uiSymbolButton3 // this.uiSymbolButton3.Cursor = System.Windows.Forms.Cursors.Hand; - this.uiSymbolButton3.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiSymbolButton3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiSymbolButton3.Location = new System.Drawing.Point(235, 10); this.uiSymbolButton3.MinimumSize = new System.Drawing.Size(1, 1); this.uiSymbolButton3.Name = "uiSymbolButton3"; + this.uiSymbolButton3.ShowFocusColor = true; this.uiSymbolButton3.Size = new System.Drawing.Size(100, 35); this.uiSymbolButton3.Symbol = 61544; this.uiSymbolButton3.TabIndex = 2; @@ -132,10 +146,11 @@ // uiSymbolButton2 // this.uiSymbolButton2.Cursor = System.Windows.Forms.Cursors.Hand; - this.uiSymbolButton2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiSymbolButton2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiSymbolButton2.Location = new System.Drawing.Point(125, 10); this.uiSymbolButton2.MinimumSize = new System.Drawing.Size(1, 1); this.uiSymbolButton2.Name = "uiSymbolButton2"; + this.uiSymbolButton2.ShowFocusColor = true; this.uiSymbolButton2.Size = new System.Drawing.Size(100, 35); this.uiSymbolButton2.Symbol = 61508; this.uiSymbolButton2.TabIndex = 1; @@ -144,10 +159,11 @@ // uiSymbolButton1 // this.uiSymbolButton1.Cursor = System.Windows.Forms.Cursors.Hand; - this.uiSymbolButton1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiSymbolButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiSymbolButton1.Location = new System.Drawing.Point(15, 10); this.uiSymbolButton1.MinimumSize = new System.Drawing.Size(1, 1); this.uiSymbolButton1.Name = "uiSymbolButton1"; + this.uiSymbolButton1.ShowFocusColor = true; this.uiSymbolButton1.Size = new System.Drawing.Size(100, 35); this.uiSymbolButton1.Symbol = 61543; this.uiSymbolButton1.TabIndex = 0; @@ -156,7 +172,7 @@ // UIDataGridViewForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(800, 450); + this.ClientSize = new System.Drawing.Size(1264, 887); this.Name = "UIDataGridViewForm"; this.Text = "FDataGridView"; this.PagePanel.ResumeLayout(false); diff --git a/SunnyUI/Forms/UIDataGridViewForm.resx b/SunnyUI/Forms/UIDataGridViewForm.resx index 1af7de15..f298a7be 100644 --- a/SunnyUI/Forms/UIDataGridViewForm.resx +++ b/SunnyUI/Forms/UIDataGridViewForm.resx @@ -1,64 +1,4 @@ - - - + diff --git a/SunnyUI/Forms/UIEditForm.Designer.cs b/SunnyUI/Forms/UIEditForm.Designer.cs index 2a5e4c2f..0316c65a 100644 --- a/SunnyUI/Forms/UIEditForm.Designer.cs +++ b/SunnyUI/Forms/UIEditForm.Designer.cs @@ -50,6 +50,7 @@ this.pnlBtm.Size = new System.Drawing.Size(598, 55); this.pnlBtm.TabIndex = 1; this.pnlBtm.Text = null; + this.pnlBtm.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; // // btnCancel // @@ -61,6 +62,7 @@ this.btnCancel.MinimumSize = new System.Drawing.Size(1, 1); this.btnCancel.Name = "btnCancel"; this.btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0); + this.btnCancel.ShowFocusColor = true; this.btnCancel.Size = new System.Drawing.Size(100, 35); this.btnCancel.Symbol = 61453; this.btnCancel.TabIndex = 1; @@ -78,6 +80,7 @@ this.btnOK.MinimumSize = new System.Drawing.Size(1, 1); this.btnOK.Name = "btnOK"; this.btnOK.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0); + this.btnOK.ShowFocusColor = true; this.btnOK.Size = new System.Drawing.Size(100, 35); this.btnOK.TabIndex = 0; this.btnOK.Text = "确定"; @@ -89,6 +92,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(600, 450); this.Controls.Add(this.pnlBtm); + this.EscClose = true; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "UIEditForm"; @@ -101,8 +105,8 @@ } #endregion - private UISymbolButton btnCancel; - private UISymbolButton btnOK; protected UIPanel pnlBtm; + protected UISymbolButton btnCancel; + protected UISymbolButton btnOK; } } \ No newline at end of file diff --git a/SunnyUI/Forms/UIInputForm.Designer.cs b/SunnyUI/Forms/UIInputForm.Designer.cs index 1bc75c12..c7bf58dc 100644 --- a/SunnyUI/Forms/UIInputForm.Designer.cs +++ b/SunnyUI/Forms/UIInputForm.Designer.cs @@ -30,6 +30,7 @@ { this.label = new Sunny.UI.UILabel(); this.edit = new Sunny.UI.UITextBox(); + this.pnlBtm.SuspendLayout(); this.SuspendLayout(); // // pnlBtm @@ -39,11 +40,19 @@ this.pnlBtm.Size = new System.Drawing.Size(471, 55); this.pnlBtm.TabIndex = 2; // + // btnCancel + // + this.btnCancel.Location = new System.Drawing.Point(343, 12); + // + // btnOK + // + this.btnOK.Location = new System.Drawing.Point(228, 12); + // // label // this.label.AutoSize = true; this.label.BackColor = System.Drawing.Color.Transparent; - this.label.Font = new System.Drawing.Font("微软雅黑", 12F); + this.label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.label.Location = new System.Drawing.Point(29, 57); this.label.Name = "label"; this.label.Size = new System.Drawing.Size(218, 21); @@ -55,29 +64,32 @@ // this.edit.Cursor = System.Windows.Forms.Cursors.IBeam; this.edit.FillColor = System.Drawing.Color.White; - this.edit.Font = new System.Drawing.Font("微软雅黑", 12F); + this.edit.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.edit.Location = new System.Drawing.Point(29, 92); this.edit.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.edit.Maximum = 2147483647D; + this.edit.Minimum = -2147483648D; + this.edit.MinimumSize = new System.Drawing.Size(1, 1); this.edit.Name = "edit"; this.edit.Padding = new System.Windows.Forms.Padding(5); this.edit.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.edit.Size = new System.Drawing.Size(415, 29); this.edit.TabIndex = 0; + this.edit.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; // // UIInputForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(473, 182); this.Controls.Add(this.edit); this.Controls.Add(this.label); this.Name = "UIInputForm"; - this.ShowInTaskbar = false; this.Text = "输入"; this.Shown += new System.EventHandler(this.UIInputForm_Shown); this.Controls.SetChildIndex(this.pnlBtm, 0); this.Controls.SetChildIndex(this.label, 0); this.Controls.SetChildIndex(this.edit, 0); + this.pnlBtm.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); diff --git a/SunnyUI/Forms/UIInputForm.cs b/SunnyUI/Forms/UIInputForm.cs index 00245238..a33230b3 100644 --- a/SunnyUI/Forms/UIInputForm.cs +++ b/SunnyUI/Forms/UIInputForm.cs @@ -38,7 +38,10 @@ namespace Sunny.UI public UILabel Label => label; - public bool CheckInputEmpty { get; set; } + public bool CheckInputEmpty + { + get; set; + } protected override bool CheckData() { @@ -56,6 +59,8 @@ namespace Sunny.UI protected override void DoEnter() { + if (btnCancel.Focused || btnOK.Focused) return; + btnOK_Click(null, null); } diff --git a/SunnyUI/Forms/UIInputForm.resx b/SunnyUI/Forms/UIInputForm.resx index 1af7de15..f298a7be 100644 --- a/SunnyUI/Forms/UIInputForm.resx +++ b/SunnyUI/Forms/UIInputForm.resx @@ -1,64 +1,4 @@ - - - + diff --git a/SunnyUI/Forms/UILoginForm.Designer.cs b/SunnyUI/Forms/UILoginForm.Designer.cs index bfb881e4..90f45bf3 100644 --- a/SunnyUI/Forms/UILoginForm.Designer.cs +++ b/SunnyUI/Forms/UILoginForm.Designer.cs @@ -115,6 +115,7 @@ this.btnLogin.MinimumSize = new System.Drawing.Size(1, 1); this.btnLogin.Name = "btnLogin"; this.btnLogin.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0); + this.btnLogin.ShowFocusColor = true; this.btnLogin.Size = new System.Drawing.Size(86, 29); this.btnLogin.Style = Sunny.UI.UIStyle.Custom; this.btnLogin.TabIndex = 2; @@ -137,6 +138,7 @@ 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.ShowFocusColor = true; this.btnCancel.Size = new System.Drawing.Size(86, 29); this.btnCancel.Style = Sunny.UI.UIStyle.Red; this.btnCancel.StyleCustomMode = true; @@ -217,6 +219,7 @@ this.Controls.Add(this.uiPanel1); this.Controls.Add(this.lblSubText); this.Controls.Add(this.lblTitle); + this.EscClose = true; this.MaximumSize = new System.Drawing.Size(750, 450); this.MinimumSize = new System.Drawing.Size(750, 450); this.Name = "UILoginForm"; diff --git a/SunnyUI/Forms/UIMessageForm.cs b/SunnyUI/Forms/UIMessageForm.cs index 23eea593..adf3e313 100644 --- a/SunnyUI/Forms/UIMessageForm.cs +++ b/SunnyUI/Forms/UIMessageForm.cs @@ -35,7 +35,10 @@ namespace Sunny.UI btnCancel.Text = UILocalize.Cancel; } - public bool IsOK { get; private set; } + public bool IsOK + { + get; private set; + } private bool _showCancel = true; diff --git a/SunnyUI/Forms/UISelectForm.Designer.cs b/SunnyUI/Forms/UISelectForm.Designer.cs index 013b2a62..155b50e2 100644 --- a/SunnyUI/Forms/UISelectForm.Designer.cs +++ b/SunnyUI/Forms/UISelectForm.Designer.cs @@ -30,6 +30,7 @@ { this.label = new Sunny.UI.UILabel(); this.ComboBox = new Sunny.UI.UIComboBox(); + this.pnlBtm.SuspendLayout(); this.SuspendLayout(); // // pnlBtm @@ -38,11 +39,19 @@ this.pnlBtm.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; this.pnlBtm.Size = new System.Drawing.Size(471, 55); // + // btnCancel + // + this.btnCancel.Location = new System.Drawing.Point(343, 12); + // + // btnOK + // + this.btnOK.Location = new System.Drawing.Point(228, 12); + // // label // this.label.AutoSize = true; this.label.BackColor = System.Drawing.Color.Transparent; - this.label.Font = new System.Drawing.Font("微软雅黑", 12F); + this.label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.label.Location = new System.Drawing.Point(29, 57); this.label.Name = "label"; this.label.Size = new System.Drawing.Size(186, 21); @@ -52,30 +61,32 @@ // // ComboBox // + this.ComboBox.DataSource = null; this.ComboBox.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList; this.ComboBox.FillColor = System.Drawing.Color.White; - this.ComboBox.Font = new System.Drawing.Font("微软雅黑", 12F); + this.ComboBox.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.ComboBox.Location = new System.Drawing.Point(29, 92); this.ComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.ComboBox.MinimumSize = new System.Drawing.Size(63, 0); this.ComboBox.Name = "ComboBox"; - this.ComboBox.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0); + this.ComboBox.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2); this.ComboBox.Size = new System.Drawing.Size(415, 29); this.ComboBox.TabIndex = 4; this.ComboBox.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; // // UISelectForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(473, 182); this.Controls.Add(this.label); this.Controls.Add(this.ComboBox); + this.EscClose = true; this.Name = "UISelectForm"; this.Text = "选择"; this.Controls.SetChildIndex(this.ComboBox, 0); this.Controls.SetChildIndex(this.pnlBtm, 0); this.Controls.SetChildIndex(this.label, 0); + this.pnlBtm.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); diff --git a/SunnyUI/Forms/UISelectForm.resx b/SunnyUI/Forms/UISelectForm.resx index 1af7de15..f298a7be 100644 --- a/SunnyUI/Forms/UISelectForm.resx +++ b/SunnyUI/Forms/UISelectForm.resx @@ -1,64 +1,4 @@ - - - +