diff --git a/SunnyUI/Controls/UISymbolButton.cs b/SunnyUI/Controls/UISymbolButton.cs
index 94620a15..e24f0695 100644
--- a/SunnyUI/Controls/UISymbolButton.cs
+++ b/SunnyUI/Controls/UISymbolButton.cs
@@ -255,14 +255,14 @@ namespace Sunny.UI
}
}
- private int _symbol = FontAwesomeIcons.fa_check;
+ private int _symbol = 361452;
///
/// 字体图标
///
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
- [DefaultValue(61452)]
+ [DefaultValue(361452)]
[Description("字体图标"), Category("SunnyUI")]
public int Symbol
{
diff --git a/SunnyUI/Controls/UISymbolLabel.cs b/SunnyUI/Controls/UISymbolLabel.cs
index e242c524..b7acf3fb 100644
--- a/SunnyUI/Controls/UISymbolLabel.cs
+++ b/SunnyUI/Controls/UISymbolLabel.cs
@@ -162,14 +162,14 @@ namespace Sunny.UI
}
}
- private int _symbol = FontAwesomeIcons.fa_check;
+ private int _symbol = 361452;
///
/// 字体图标
///
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Editor("Sunny.UI.UIImagePropertyEditor, " + AssemblyRefEx.SystemDesign, typeof(UITypeEditor))]
- [DefaultValue(61452)]
+ [DefaultValue(361452)]
[Description("字体图标"), Category("SunnyUI")]
public int Symbol
{
diff --git a/SunnyUI/Forms/UIDataGridViewForm.Designer.cs b/SunnyUI/Forms/UIDataGridViewForm.Designer.cs
index b4860d3a..69e89ab4 100644
--- a/SunnyUI/Forms/UIDataGridViewForm.Designer.cs
+++ b/SunnyUI/Forms/UIDataGridViewForm.Designer.cs
@@ -33,148 +33,151 @@
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();
- this.uiSymbolButton3 = new Sunny.UI.UISymbolButton();
- this.uiSymbolButton2 = new Sunny.UI.UISymbolButton();
- this.uiSymbolButton1 = new Sunny.UI.UISymbolButton();
- ((System.ComponentModel.ISupportInitialize)(this.Grid)).BeginInit();
- this.Panel.SuspendLayout();
- this.SuspendLayout();
+ Grid = new UIDataGridView();
+ Panel = new UIPanel();
+ uiSymbolButton4 = new UISymbolButton();
+ uiSymbolButton3 = new UISymbolButton();
+ uiSymbolButton2 = new UISymbolButton();
+ uiSymbolButton1 = new UISymbolButton();
+ ((System.ComponentModel.ISupportInitialize)Grid).BeginInit();
+ Panel.SuspendLayout();
+ SuspendLayout();
//
// Grid
//
- dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
- this.Grid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
- this.Grid.BackgroundColor = System.Drawing.Color.White;
- this.Grid.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+ dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(235, 243, 255);
+ Grid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+ Grid.BackgroundColor = System.Drawing.Color.White;
+ 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, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(80, 160, 255);
+ dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
- dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+ dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(80, 160, 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;
+ Grid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+ 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, 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)))));
+ dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F);
+ dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
+ dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(155, 200, 255);
+ dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
- this.Grid.DefaultCellStyle = dataGridViewCellStyle3;
- this.Grid.Dock = System.Windows.Forms.DockStyle.Fill;
- this.Grid.EnableHeadersVisualStyles = false;
- 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, 35);
- this.Grid.Name = "Grid";
+ Grid.DefaultCellStyle = dataGridViewCellStyle3;
+ Grid.Dock = System.Windows.Forms.DockStyle.Fill;
+ Grid.EnableHeadersVisualStyles = false;
+ Grid.Font = new System.Drawing.Font("宋体", 12F);
+ Grid.GridColor = System.Drawing.Color.FromArgb(80, 160, 255);
+ Grid.Location = new System.Drawing.Point(0, 35);
+ Grid.Name = "Grid";
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.BackColor = System.Drawing.Color.FromArgb(235, 243, 255);
+ dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F);
+ dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
+ dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(80, 160, 255);
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.Grid.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
+ Grid.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
- this.Grid.RowsDefaultCellStyle = dataGridViewCellStyle5;
- this.Grid.RowTemplate.Height = 29;
- this.Grid.SelectedIndex = -1;
- this.Grid.Size = new System.Drawing.Size(1034, 511);
- this.Grid.TabIndex = 0;
+ Grid.RowsDefaultCellStyle = dataGridViewCellStyle5;
+ Grid.RowTemplate.Height = 29;
+ Grid.SelectedIndex = -1;
+ Grid.Size = new System.Drawing.Size(1034, 511);
+ Grid.StripeOddColor = System.Drawing.Color.FromArgb(235, 243, 255);
+ Grid.TabIndex = 0;
//
// Panel
//
- this.Panel.Controls.Add(this.uiSymbolButton4);
- this.Panel.Controls.Add(this.uiSymbolButton3);
- 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, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.Panel.Location = new System.Drawing.Point(0, 546);
- 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(1034, 55);
- this.Panel.TabIndex = 1;
- this.Panel.Text = null;
- this.Panel.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+ Panel.Controls.Add(uiSymbolButton4);
+ Panel.Controls.Add(uiSymbolButton3);
+ Panel.Controls.Add(uiSymbolButton2);
+ Panel.Controls.Add(uiSymbolButton1);
+ Panel.Dock = System.Windows.Forms.DockStyle.Bottom;
+ Panel.Font = new System.Drawing.Font("宋体", 12F);
+ Panel.Location = new System.Drawing.Point(0, 546);
+ Panel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+ Panel.MinimumSize = new System.Drawing.Size(1, 1);
+ Panel.Name = "Panel";
+ Panel.RadiusSides = UICornerRadiusSides.None;
+ Panel.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom;
+ Panel.Size = new System.Drawing.Size(1034, 55);
+ Panel.TabIndex = 1;
+ Panel.Text = null;
+ Panel.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
//
// uiSymbolButton4
//
- this.uiSymbolButton4.Cursor = System.Windows.Forms.Cursors.Hand;
- 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;
- this.uiSymbolButton4.Text = "导出";
- this.uiSymbolButton4.Visible = false;
+ uiSymbolButton4.Cursor = System.Windows.Forms.Cursors.Hand;
+ uiSymbolButton4.Font = new System.Drawing.Font("宋体", 12F);
+ uiSymbolButton4.Location = new System.Drawing.Point(345, 10);
+ uiSymbolButton4.MinimumSize = new System.Drawing.Size(1, 1);
+ uiSymbolButton4.Name = "uiSymbolButton4";
+ uiSymbolButton4.ShowFocusColor = true;
+ uiSymbolButton4.Size = new System.Drawing.Size(100, 35);
+ uiSymbolButton4.Symbol = 361639;
+ uiSymbolButton4.TabIndex = 3;
+ uiSymbolButton4.Text = "导出";
+ uiSymbolButton4.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
+ uiSymbolButton4.Visible = false;
//
// uiSymbolButton3
//
- this.uiSymbolButton3.Cursor = System.Windows.Forms.Cursors.Hand;
- 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 = 361544;
- this.uiSymbolButton3.TabIndex = 2;
- this.uiSymbolButton3.Text = "删除";
+ uiSymbolButton3.Cursor = System.Windows.Forms.Cursors.Hand;
+ uiSymbolButton3.Font = new System.Drawing.Font("宋体", 12F);
+ uiSymbolButton3.Location = new System.Drawing.Point(235, 10);
+ uiSymbolButton3.MinimumSize = new System.Drawing.Size(1, 1);
+ uiSymbolButton3.Name = "uiSymbolButton3";
+ uiSymbolButton3.ShowFocusColor = true;
+ uiSymbolButton3.Size = new System.Drawing.Size(100, 35);
+ uiSymbolButton3.Symbol = 361544;
+ uiSymbolButton3.TabIndex = 2;
+ uiSymbolButton3.Text = "删除";
+ uiSymbolButton3.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
//
// uiSymbolButton2
//
- this.uiSymbolButton2.Cursor = System.Windows.Forms.Cursors.Hand;
- 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;
- this.uiSymbolButton2.Text = "编辑";
+ uiSymbolButton2.Cursor = System.Windows.Forms.Cursors.Hand;
+ uiSymbolButton2.Font = new System.Drawing.Font("宋体", 12F);
+ uiSymbolButton2.Location = new System.Drawing.Point(125, 10);
+ uiSymbolButton2.MinimumSize = new System.Drawing.Size(1, 1);
+ uiSymbolButton2.Name = "uiSymbolButton2";
+ uiSymbolButton2.ShowFocusColor = true;
+ uiSymbolButton2.Size = new System.Drawing.Size(100, 35);
+ uiSymbolButton2.Symbol = 361508;
+ uiSymbolButton2.TabIndex = 1;
+ uiSymbolButton2.Text = "编辑";
+ uiSymbolButton2.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
//
// uiSymbolButton1
//
- this.uiSymbolButton1.Cursor = System.Windows.Forms.Cursors.Hand;
- 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 = 361543;
- this.uiSymbolButton1.TabIndex = 0;
- this.uiSymbolButton1.Text = "增加";
+ uiSymbolButton1.Cursor = System.Windows.Forms.Cursors.Hand;
+ uiSymbolButton1.Font = new System.Drawing.Font("宋体", 12F);
+ uiSymbolButton1.Location = new System.Drawing.Point(15, 10);
+ uiSymbolButton1.MinimumSize = new System.Drawing.Size(1, 1);
+ uiSymbolButton1.Name = "uiSymbolButton1";
+ uiSymbolButton1.ShowFocusColor = true;
+ uiSymbolButton1.Size = new System.Drawing.Size(100, 35);
+ uiSymbolButton1.Symbol = 361543;
+ uiSymbolButton1.TabIndex = 0;
+ uiSymbolButton1.Text = "增加";
+ uiSymbolButton1.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
//
// UIDataGridViewForm
//
- this.AllowShowTitle = true;
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
- this.ClientSize = new System.Drawing.Size(1034, 601);
- this.Controls.Add(this.Grid);
- this.Controls.Add(this.Panel);
- this.Name = "UIDataGridViewForm";
- this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
- this.ShowTitle = true;
- this.Text = "FDataGridView";
- ((System.ComponentModel.ISupportInitialize)(this.Grid)).EndInit();
- this.Panel.ResumeLayout(false);
- this.ResumeLayout(false);
-
+ AllowShowTitle = true;
+ AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ ClientSize = new System.Drawing.Size(1034, 601);
+ Controls.Add(Grid);
+ Controls.Add(Panel);
+ Name = "UIDataGridViewForm";
+ Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
+ ShowTitle = true;
+ Text = "FDataGridView";
+ ((System.ComponentModel.ISupportInitialize)Grid).EndInit();
+ Panel.ResumeLayout(false);
+ ResumeLayout(false);
}
#endregion
diff --git a/SunnyUI/Forms/UIDataGridViewForm.resx b/SunnyUI/Forms/UIDataGridViewForm.resx
index f298a7be..af32865e 100644
--- a/SunnyUI/Forms/UIDataGridViewForm.resx
+++ b/SunnyUI/Forms/UIDataGridViewForm.resx
@@ -1,4 +1,64 @@
-
+
+
+
diff --git a/SunnyUI/Forms/UIEditForm.Designer.cs b/SunnyUI/Forms/UIEditForm.Designer.cs
index db4b0d2a..42ccc35a 100644
--- a/SunnyUI/Forms/UIEditForm.Designer.cs
+++ b/SunnyUI/Forms/UIEditForm.Designer.cs
@@ -40,7 +40,7 @@
pnlBtm.Controls.Add(btnCancel);
pnlBtm.Controls.Add(btnOK);
pnlBtm.Dock = System.Windows.Forms.DockStyle.Bottom;
- pnlBtm.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ pnlBtm.Font = new System.Drawing.Font("宋体", 12F);
pnlBtm.Location = new System.Drawing.Point(1, 392);
pnlBtm.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
pnlBtm.MinimumSize = new System.Drawing.Size(1, 1);
@@ -56,7 +56,7 @@
//
btnCancel.BackColor = System.Drawing.Color.Transparent;
btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
- btnCancel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ btnCancel.Font = new System.Drawing.Font("宋体", 12F);
btnCancel.Location = new System.Drawing.Point(470, 12);
btnCancel.Margin = new System.Windows.Forms.Padding(0);
btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
@@ -64,10 +64,9 @@
btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
btnCancel.ShowFocusColor = true;
btnCancel.Size = new System.Drawing.Size(100, 35);
- btnCancel.Symbol = 61453;
+ btnCancel.Symbol = 361453;
btnCancel.TabIndex = 1;
btnCancel.Text = "取消";
- btnCancel.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
btnCancel.TipsText = null;
btnCancel.Click += btnCancel_Click;
//
@@ -75,7 +74,7 @@
//
btnOK.BackColor = System.Drawing.Color.Transparent;
btnOK.Cursor = System.Windows.Forms.Cursors.Hand;
- btnOK.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ btnOK.Font = new System.Drawing.Font("宋体", 12F);
btnOK.Location = new System.Drawing.Point(355, 12);
btnOK.Margin = new System.Windows.Forms.Padding(0);
btnOK.MinimumSize = new System.Drawing.Size(1, 1);
@@ -83,9 +82,9 @@
btnOK.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
btnOK.ShowFocusColor = true;
btnOK.Size = new System.Drawing.Size(100, 35);
+ btnOK.Symbol = 361452;
btnOK.TabIndex = 0;
btnOK.Text = "确定";
- btnOK.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
btnOK.TipsText = null;
btnOK.Click += btnOK_Click;
//
diff --git a/SunnyUI/Forms/UIForm2.cs b/SunnyUI/Forms/UIForm2.cs
index 22c0da7f..c8a9a275 100644
--- a/SunnyUI/Forms/UIForm2.cs
+++ b/SunnyUI/Forms/UIForm2.cs
@@ -374,7 +374,7 @@ namespace Sunny.UI
}
else
{
- ShowMaxOrNormal();
+ if (FormBorderStyle == FormBorderStyle.Sizable) ShowMaxOrNormal();
}
}
diff --git a/SunnyUI/Forms/UIFormHelper.cs b/SunnyUI/Forms/UIFormHelper.cs
index 50c43373..f810bc82 100644
--- a/SunnyUI/Forms/UIFormHelper.cs
+++ b/SunnyUI/Forms/UIFormHelper.cs
@@ -134,10 +134,28 @@ namespace Sunny.UI
/// 消息停留时长(ms)。默认1秒
/// 结果
public static bool ShowMessageDialog(string message, string title, bool showCancelButton, UIStyle style, bool showMask = false, bool topMost = true, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, int delay = 0)
+ {
+ return ShowMessageDialog(null, message, title, showCancelButton, style, showMask, topMost, defaultButton, delay);
+ }
+
+ ///
+ /// 确认信息提示框
+ ///
+ /// 标题
+ /// 信息
+ /// 显示取消按钮
+ /// 主题
+ /// 显示遮罩层
+ /// 置顶
+ /// 默认按钮
+ /// 消息停留时长(ms)。默认1秒
+ /// 结果
+ public static bool ShowMessageDialog(Form form, string message, string title, bool showCancelButton, UIStyle style, bool showMask = false, bool topMost = true, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok, int delay = 0)
{
Point pt = SystemEx.GetCursorPos();
Rectangle screen = Screen.GetBounds(pt);
using UIMessageForm frm = new UIMessageForm();
+ if (frm != null) frm.Owner = form;
frm.DefaultButton = showCancelButton ? defaultButton : UIMessageDialogButtons.Ok;
//frm.StartPosition = FormStartPosition.CenterScreen;
frm.StartPosition = FormStartPosition.Manual;
@@ -156,6 +174,33 @@ namespace Sunny.UI
return frm.IsOK;
}
+
+ ///
+ /// 确认信息提示框
+ ///
+ /// 标题
+ /// 信息
+ /// 默认按钮
+ /// 默认按钮
+ /// 消息停留时长(ms)。默认1秒
+ /// 结果
+ public static bool ShowMessageDialog2(Form form, string title, string message, UINotifierType noteType, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Cancel, int delay = 0)
+ {
+ Point pt = SystemEx.GetCursorPos();
+ Rectangle screen = Screen.GetBounds(pt);
+ using UIMessageForm2 frm = new UIMessageForm2(title, message, noteType, defaultButton);
+ if (frm != null) frm.Owner = form;
+ frm.StartPosition = FormStartPosition.Manual;
+ frm.Left = screen.Left + screen.Width / 2 - frm.Width / 2;
+ frm.Top = screen.Top + screen.Height / 2 - frm.Height / 2;
+ frm.ShowInTaskbar = false;
+ frm.TopMost = true;
+ frm.Delay = delay;
+ if (showMask)
+ return frm.ShowDialogWithMask() == DialogResult.OK;
+ else
+ return frm.ShowDialog() == DialogResult.OK;
+ }
}
public enum UIMessageDialogButtons
@@ -500,7 +545,7 @@ namespace Sunny.UI
/// 显示遮罩层
public static void ShowSuccessDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Green, bool showMask = false, int delay = 0)
{
- UIMessageBox.ShowMessageDialog(msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
+ UIMessageBox.ShowMessageDialog(form, msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
}
///
@@ -522,7 +567,7 @@ namespace Sunny.UI
/// 显示遮罩层
public static void ShowInfoDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Gray, bool showMask = false, int delay = 0)
{
- UIMessageBox.ShowMessageDialog(msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
+ UIMessageBox.ShowMessageDialog(form, msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
}
///
@@ -544,7 +589,7 @@ namespace Sunny.UI
/// 显示遮罩层
public static void ShowWarningDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Orange, bool showMask = false, int delay = 0)
{
- UIMessageBox.ShowMessageDialog(msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
+ UIMessageBox.ShowMessageDialog(form, msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
}
///
@@ -566,7 +611,7 @@ namespace Sunny.UI
/// 显示遮罩层
public static void ShowErrorDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Red, bool showMask = false, int delay = 0)
{
- UIMessageBox.ShowMessageDialog(msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
+ UIMessageBox.ShowMessageDialog(form, msg, title, false, style, showMask, true, UIMessageDialogButtons.Ok, delay);
}
///
@@ -577,7 +622,7 @@ namespace Sunny.UI
/// 结果
public static bool ShowAskDialog(this Form form, string msg, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
{
- return UIMessageBox.ShowMessageDialog(msg, UILocalize.AskTitle, true, UIStyle.Blue, showMask, true, defaultButton);
+ return UIMessageBox.ShowMessageDialog(form, msg, UILocalize.AskTitle, true, UIStyle.Blue, showMask, true, defaultButton);
}
///
@@ -590,9 +635,124 @@ namespace Sunny.UI
/// 结果
public static bool ShowAskDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Blue, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Ok)
{
- return UIMessageBox.ShowMessageDialog(msg, title, true, style, showMask, true, defaultButton);
+ return UIMessageBox.ShowMessageDialog(form, msg, title, true, style, showMask, true, defaultButton);
}
+ //---------------
+
+ ///
+ /// 正确信息提示框
+ ///
+ /// 信息
+ /// 显示遮罩层
+ public static void ShowSuccessDialog2(this Form form, string msg, bool showMask = false, int delay = 0)
+ {
+ form.ShowSuccessDialog2(UILocalize.SuccessTitle, msg, showMask, delay);
+ }
+
+ ///
+ /// 正确信息提示框
+ ///
+ /// 标题
+ /// 信息
+ /// 主题
+ /// 显示遮罩层
+ public static void ShowSuccessDialog2(this Form form, string title, string msg, bool showMask = false, int delay = 0)
+ {
+ UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.OK, showMask, UIMessageDialogButtons.Ok, delay);
+ }
+
+ ///
+ /// 信息提示框
+ ///
+ /// 信息
+ /// 显示遮罩层
+ public static void ShowInfoDialog2(this Form form, string msg, bool showMask = false, int delay = 0)
+ {
+ form.ShowInfoDialog2(UILocalize.InfoTitle, msg, showMask, delay);
+ }
+
+ ///
+ /// 信息提示框
+ ///
+ /// 标题
+ /// 信息
+ /// 主题
+ /// 显示遮罩层
+ public static void ShowInfoDialog2(this Form form, string title, string msg, bool showMask = false, int delay = 0)
+ {
+ UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.INFO, showMask, UIMessageDialogButtons.Ok, delay);
+ }
+
+ ///
+ /// 警告信息提示框
+ ///
+ /// 信息
+ /// 显示遮罩层
+ public static void ShowWarningDialog2(this Form form, string msg, bool showMask = false, int delay = 0)
+ {
+ form.ShowWarningDialog2(UILocalize.WarningTitle, msg, showMask, delay);
+ }
+
+ ///
+ /// 警告信息提示框
+ ///
+ /// 标题
+ /// 信息
+ /// 主题
+ /// 显示遮罩层
+ public static void ShowWarningDialog2(this Form form, string title, string msg, bool showMask = false, int delay = 0)
+ {
+ UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.WARNING, showMask, UIMessageDialogButtons.Ok, delay);
+ }
+
+ ///
+ /// 错误信息提示框
+ ///
+ /// 信息
+ /// 显示遮罩层
+ public static void ShowErrorDialog2(this Form form, string msg, bool showMask = false, int delay = 0)
+ {
+ form.ShowErrorDialog2(UILocalize.ErrorTitle, msg, showMask, delay);
+ }
+
+ ///
+ /// 错误信息提示框
+ ///
+ /// 标题
+ /// 信息
+ /// 主题
+ /// 显示遮罩层
+ public static void ShowErrorDialog2(this Form form, string title, string msg, bool showMask = false, int delay = 0)
+ {
+ UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.ERROR, showMask, UIMessageDialogButtons.Ok, delay);
+ }
+
+ ///
+ /// 确认信息提示框
+ ///
+ /// 信息
+ /// 显示遮罩层
+ /// 结果
+ public static bool ShowAskDialog2(this Form form, string msg, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Cancel)
+ {
+ return UIMessageBox.ShowMessageDialog2(form, UILocalize.AskTitle, msg, UINotifierType.Ask, showMask, defaultButton);
+ }
+
+ ///
+ /// 确认信息提示框
+ ///
+ /// 标题
+ /// 信息
+ /// 主题
+ /// 显示遮罩层
+ /// 结果
+ public static bool ShowAskDialog2(this Form form, string title, string msg, bool showMask = false, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Cancel)
+ {
+ return UIMessageBox.ShowMessageDialog2(form, title, msg, UINotifierType.Ask, showMask, defaultButton);
+ }
+ //---------------
+
///
/// 显示消息
///
diff --git a/SunnyUI/Forms/UIInputForm.Designer.cs b/SunnyUI/Forms/UIInputForm.Designer.cs
index 5d00a6ed..87215542 100644
--- a/SunnyUI/Forms/UIInputForm.Designer.cs
+++ b/SunnyUI/Forms/UIInputForm.Designer.cs
@@ -43,16 +43,18 @@
// btnCancel
//
btnCancel.Location = new System.Drawing.Point(343, 4);
+ btnCancel.Symbol = 361453;
//
// btnOK
//
btnOK.Location = new System.Drawing.Point(228, 4);
+ btnOK.Symbol = 361452;
//
// label
//
label.AutoSize = true;
label.BackColor = System.Drawing.Color.Transparent;
- label.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ label.Font = new System.Drawing.Font("宋体", 12F);
label.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
label.Location = new System.Drawing.Point(28, 57);
label.Name = "label";
@@ -64,7 +66,7 @@
// edit
//
edit.Cursor = System.Windows.Forms.Cursors.IBeam;
- edit.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ edit.Font = new System.Drawing.Font("宋体", 12F);
edit.Location = new System.Drawing.Point(29, 92);
edit.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
edit.MinimumSize = new System.Drawing.Size(1, 1);
@@ -85,7 +87,6 @@
Controls.Add(label);
Name = "UIInputForm";
Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
- ShowIcon = false;
Text = "输入";
ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 473, 182);
Shown += UIInputForm_Shown;
diff --git a/SunnyUI/Forms/UILoginForm.Designer.cs b/SunnyUI/Forms/UILoginForm.Designer.cs
index 8ee0588f..01f23542 100644
--- a/SunnyUI/Forms/UILoginForm.Designer.cs
+++ b/SunnyUI/Forms/UILoginForm.Designer.cs
@@ -43,7 +43,7 @@
// uiAvatar1
//
uiAvatar1.BackColor = System.Drawing.Color.Transparent;
- uiAvatar1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ uiAvatar1.Font = new System.Drawing.Font("宋体", 12F);
uiAvatar1.Location = new System.Drawing.Point(65, 16);
uiAvatar1.MinimumSize = new System.Drawing.Size(1, 1);
uiAvatar1.Name = "uiAvatar1";
@@ -54,7 +54,7 @@
// uiLine1
//
uiLine1.BackColor = System.Drawing.Color.Transparent;
- uiLine1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ uiLine1.Font = new System.Drawing.Font("宋体", 12F);
uiLine1.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
uiLine1.Location = new System.Drawing.Point(4, 85);
uiLine1.MinimumSize = new System.Drawing.Size(2, 2);
@@ -70,7 +70,7 @@
//
edtUser.Cursor = System.Windows.Forms.Cursors.IBeam;
edtUser.EnterAsTab = true;
- edtUser.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ edtUser.Font = new System.Drawing.Font("宋体", 12F);
edtUser.Location = new System.Drawing.Point(4, 121);
edtUser.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
edtUser.MinimumSize = new System.Drawing.Size(1, 1);
@@ -78,7 +78,7 @@
edtUser.Padding = new System.Windows.Forms.Padding(5);
edtUser.ShowText = false;
edtUser.Size = new System.Drawing.Size(182, 29);
- edtUser.Symbol = 61447;
+ edtUser.Symbol = 361447;
edtUser.SymbolSize = 22;
edtUser.TabIndex = 0;
edtUser.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
@@ -87,7 +87,7 @@
// edtPassword
//
edtPassword.Cursor = System.Windows.Forms.Cursors.IBeam;
- edtPassword.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ edtPassword.Font = new System.Drawing.Font("宋体", 12F);
edtPassword.Location = new System.Drawing.Point(4, 162);
edtPassword.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
edtPassword.MinimumSize = new System.Drawing.Size(1, 1);
@@ -96,7 +96,7 @@
edtPassword.PasswordChar = '*';
edtPassword.ShowText = false;
edtPassword.Size = new System.Drawing.Size(182, 29);
- edtPassword.Symbol = 61475;
+ edtPassword.Symbol = 361475;
edtPassword.SymbolSize = 22;
edtPassword.TabIndex = 1;
edtPassword.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
@@ -106,15 +106,17 @@
// btnLogin
//
btnLogin.Cursor = System.Windows.Forms.Cursors.Hand;
- btnLogin.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ btnLogin.Font = new System.Drawing.Font("宋体", 12F);
btnLogin.Location = new System.Drawing.Point(4, 206);
btnLogin.MinimumSize = new System.Drawing.Size(1, 1);
btnLogin.Name = "btnLogin";
btnLogin.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
btnLogin.ShowFocusColor = true;
btnLogin.Size = new System.Drawing.Size(86, 29);
+ btnLogin.Symbol = 361452;
btnLogin.TabIndex = 2;
btnLogin.Text = "登录";
+ btnLogin.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
btnLogin.Click += btnLogin_Click;
//
// btnCancel
@@ -125,7 +127,7 @@
btnCancel.FillHoverColor = System.Drawing.Color.FromArgb(235, 115, 115);
btnCancel.FillPressColor = System.Drawing.Color.FromArgb(184, 64, 64);
btnCancel.FillSelectedColor = System.Drawing.Color.FromArgb(184, 64, 64);
- btnCancel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ btnCancel.Font = new System.Drawing.Font("宋体", 12F);
btnCancel.Location = new System.Drawing.Point(100, 206);
btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
btnCancel.Name = "btnCancel";
@@ -138,15 +140,16 @@
btnCancel.Size = new System.Drawing.Size(86, 29);
btnCancel.Style = UIStyle.Custom;
btnCancel.StyleCustomMode = true;
- btnCancel.Symbol = 61453;
+ btnCancel.Symbol = 361453;
btnCancel.TabIndex = 3;
btnCancel.Text = "取消";
+ btnCancel.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
btnCancel.Click += btnCancel_Click;
//
// lblTitle
//
lblTitle.BackColor = System.Drawing.Color.Transparent;
- lblTitle.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ lblTitle.Font = new System.Drawing.Font("宋体", 15.75F);
lblTitle.ForeColor = System.Drawing.Color.Navy;
lblTitle.Location = new System.Drawing.Point(44, 35);
lblTitle.Name = "lblTitle";
@@ -161,7 +164,7 @@
//
lblSubText.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
lblSubText.BackColor = System.Drawing.Color.Transparent;
- lblSubText.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ lblSubText.Font = new System.Drawing.Font("宋体", 12F);
lblSubText.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
lblSubText.Location = new System.Drawing.Point(426, 421);
lblSubText.Name = "lblSubText";
@@ -179,7 +182,7 @@
uiPanel1.Controls.Add(btnCancel);
uiPanel1.Controls.Add(btnLogin);
uiPanel1.FillColor = System.Drawing.Color.White;
- uiPanel1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ uiPanel1.Font = new System.Drawing.Font("宋体", 12F);
uiPanel1.Location = new System.Drawing.Point(433, 126);
uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
diff --git a/SunnyUI/Forms/UIMessageForm2.Designer.cs b/SunnyUI/Forms/UIMessageForm2.Designer.cs
new file mode 100644
index 00000000..44fac743
--- /dev/null
+++ b/SunnyUI/Forms/UIMessageForm2.Designer.cs
@@ -0,0 +1,121 @@
+namespace Sunny.UI
+{
+ partial class UIMessageForm2
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ btnCancel = new UISymbolButton();
+ btnOK = new UISymbolButton();
+ label1 = new System.Windows.Forms.Label();
+ timer1 = new System.Windows.Forms.Timer(components);
+ SuspendLayout();
+ //
+ // btnCancel
+ //
+ btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
+ btnCancel.BackColor = System.Drawing.Color.Transparent;
+ btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
+ btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ btnCancel.Font = new System.Drawing.Font("宋体", 12F);
+ btnCancel.Location = new System.Drawing.Point(378, 124);
+ btnCancel.Margin = new System.Windows.Forms.Padding(0);
+ btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
+ btnCancel.Name = "btnCancel";
+ btnCancel.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
+ btnCancel.ShowFocusLine = true;
+ btnCancel.Size = new System.Drawing.Size(100, 35);
+ btnCancel.Symbol = 361453;
+ btnCancel.TabIndex = 10;
+ btnCancel.Text = "取消";
+ btnCancel.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
+ btnCancel.TipsText = null;
+ //
+ // btnOK
+ //
+ btnOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
+ btnOK.BackColor = System.Drawing.Color.Transparent;
+ btnOK.Cursor = System.Windows.Forms.Cursors.Hand;
+ btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
+ btnOK.Font = new System.Drawing.Font("宋体", 12F);
+ btnOK.Location = new System.Drawing.Point(263, 124);
+ btnOK.Margin = new System.Windows.Forms.Padding(0);
+ btnOK.MinimumSize = new System.Drawing.Size(1, 1);
+ btnOK.Name = "btnOK";
+ btnOK.Padding = new System.Windows.Forms.Padding(28, 0, 0, 0);
+ btnOK.ShowFocusLine = true;
+ btnOK.Size = new System.Drawing.Size(100, 35);
+ btnOK.TabIndex = 9;
+ btnOK.Text = "确定";
+ btnOK.TipsFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
+ btnOK.TipsText = null;
+ //
+ // label1
+ //
+ label1.AutoSize = true;
+ label1.Location = new System.Drawing.Point(119, 67);
+ label1.MaximumSize = new System.Drawing.Size(360, 0);
+ label1.Name = "label1";
+ label1.Size = new System.Drawing.Size(359, 32);
+ label1.TabIndex = 12;
+ label1.Text = "提示消息提示消息提示消息提示消息提示消息提示消息提示消息";
+ //
+ // timer1
+ //
+ timer1.Interval = 1000;
+ timer1.Tick += timer1_Tick;
+ //
+ // UIMessageForm2
+ //
+ AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ ClientSize = new System.Drawing.Size(500, 180);
+ Controls.Add(label1);
+ Controls.Add(btnCancel);
+ Controls.Add(btnOK);
+ EscClose = true;
+ FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ MaximizeBox = false;
+ MinimizeBox = false;
+ Name = "UIMessageForm2";
+ ShowIcon = false;
+ ShowInTaskbar = false;
+ StartPosition = System.Windows.Forms.FormStartPosition.Manual;
+ Text = "UIMessageForm2";
+ FormClosed += UIMessageForm2_FormClosed;
+ Shown += UIMessageForm2_Shown;
+ Paint += UIMessageForm2_Paint;
+ ResumeLayout(false);
+ PerformLayout();
+ }
+
+ #endregion
+ protected UISymbolButton btnCancel;
+ protected UISymbolButton btnOK;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Timer timer1;
+ }
+}
\ No newline at end of file
diff --git a/SunnyUI/Forms/UIMessageForm2.cs b/SunnyUI/Forms/UIMessageForm2.cs
new file mode 100644
index 00000000..ccf386e5
--- /dev/null
+++ b/SunnyUI/Forms/UIMessageForm2.cs
@@ -0,0 +1,139 @@
+/******************************************************************************
+ * SunnyUI 开源控件库、工具类库、扩展类库、多页面开发框架。
+ * CopyRight (C) 2012-2024 ShenYongHua(沈永华).
+ * QQ群:56829229 QQ:17612584 EMail:SunnyUI@QQ.Com
+ *
+ * Blog: https://www.cnblogs.com/yhuse
+ * Gitee: https://gitee.com/yhuse/SunnyUI
+ * GitHub: https://github.com/yhuse/SunnyUI
+ *
+ * SunnyUI.dll can be used for free under the GPL-3.0 license.
+ * If you use this code, please keep this note.
+ * 如果您使用此代码,请保留此说明。
+ ******************************************************************************
+ * 文件名称: UIMessageForm2.cs
+ * 文件说明: 消息提示窗体2
+ * 当前版本: V3.6
+ * 创建日期: 2024-05-16
+ *
+ * 2024-05-16: V3.6.6 增加文件说明
+******************************************************************************/
+
+using System.Drawing;
+
+namespace Sunny.UI
+{
+ public partial class UIMessageForm2 : UIForm2
+ {
+ public UIMessageForm2(string title, string message, UINotifierType noteType, UIMessageDialogButtons defaultButton = UIMessageDialogButtons.Cancel)
+ {
+ InitializeComponent();
+ Text = title;
+ label1.Text = message;
+ btnOK.Text = UILocalize.OK;
+ btnCancel.Text = UILocalize.Cancel;
+
+ foreColor = Color.Black;
+ Color[] colors = Color.White.GradientColors(UIStyles.ActiveStyleColor.PrimaryColor, 16);
+ Color = colors[2];
+ if (UIStyles.Style == UIStyle.DarkBlue || UIStyles.Style == UIStyle.Black)
+ {
+ Color[] colors1 = UIStyles.ActiveStyleColor.PrimaryColor.GradientColors(Color.Black, 16);
+ Color = colors1[2];
+ foreColor = Color.White;
+ }
+
+ if (noteType != UINotifierType.Ask)
+ {
+ btnOK.Left = btnCancel.Left;
+ btnCancel.Visible = false;
+ btnOK.TabIndex = 0;
+ }
+ else
+ {
+ if (defaultButton == UIMessageDialogButtons.Cancel)
+ btnCancel.TabIndex = 0;
+ else
+ btnOK.TabIndex = 0;
+ }
+
+ switch (noteType)
+ {
+ case UINotifierType.ERROR:
+ Symbol = 361527;
+ SymbolColor = UIStyles.Red.ButtonFillColor;
+ break;
+
+ case UINotifierType.INFO:
+ Symbol = 361530;
+ SymbolColor = UIStyles.ActiveStyleColor.ButtonFillColor;
+ break;
+
+ case UINotifierType.WARNING:
+ Symbol = 361553;
+ SymbolColor = UIStyles.Orange.ButtonFillColor;
+ break;
+
+ case UINotifierType.OK:
+ Symbol = 361528;
+ SymbolColor = UIStyles.Green.ButtonFillColor;
+ break;
+
+ case UINotifierType.Ask:
+ Symbol = 361529;
+ SymbolColor = UIStyles.ActiveStyleColor.ButtonFillColor;
+ break;
+ }
+ }
+
+ int Symbol = 361528;
+ Color SymbolColor = UIStyles.Green.ButtonFillColor;
+ private Color Color;
+ private Color foreColor;
+
+ public string Message { get; set; }
+ private void UIMessageForm2_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
+ {
+ int height = (190 - 48 + TitleHeight) + label1.Height;
+ if (height > 210) Height = height;
+ e.Graphics.FillRectangle(Color, new RectangleF(0, Height - 76, Width, 76));
+ e.Graphics.DrawFontImage(Symbol, 72, SymbolColor, new RectangleF(28, 64, 64, 64));
+ }
+
+ private void timer1_Tick(object sender, System.EventArgs e)
+ {
+ delay--;
+ Text = text + " [" + delay + "]";
+
+ if (delay <= 0) Close();
+ }
+
+ int delay = 0;
+
+ public int Delay
+ {
+ set
+ {
+ if (value > 0)
+ {
+ delay = value / 1000;
+ timer1.Start();
+ }
+ }
+ }
+
+ string text = "";
+
+ private void UIMessageForm2_Shown(object sender, System.EventArgs e)
+ {
+ if (delay <= 0) return;
+ if (text == "") text = Text;
+ Text = text + " [" + delay + "]";
+ }
+
+ private void UIMessageForm2_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e)
+ {
+ timer1.Stop();
+ }
+ }
+}
diff --git a/SunnyUI/Forms/UIMessageForm2.resx b/SunnyUI/Forms/UIMessageForm2.resx
new file mode 100644
index 00000000..80e1e44e
--- /dev/null
+++ b/SunnyUI/Forms/UIMessageForm2.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/SunnyUI/Forms/UINotifier.cs b/SunnyUI/Forms/UINotifier.cs
index 4380fbeb..0b867d9d 100644
--- a/SunnyUI/Forms/UINotifier.cs
+++ b/SunnyUI/Forms/UINotifier.cs
@@ -176,28 +176,28 @@ namespace Sunny.UI
switch (noteType)
{
case UINotifierType.ERROR:
- icon.Symbol = 61527;
+ icon.Symbol = 361527;
icon.SymbolColor = UIStyles.Red.ButtonFillColor;
LeaveColor = UIStyles.Red.ButtonFillColor;
HoverColor = UIStyles.Red.ButtonFillHoverColor;
break;
case UINotifierType.INFO:
- icon.Symbol = 61530;
+ icon.Symbol = 361530;
icon.SymbolColor = UIStyles.Blue.ButtonFillColor;
LeaveColor = UIStyles.Blue.ButtonFillColor;
HoverColor = UIStyles.Blue.ButtonFillHoverColor;
break;
case UINotifierType.WARNING:
- icon.Symbol = 61553;
+ icon.Symbol = 361553;
icon.SymbolColor = UIStyles.Orange.ButtonFillColor;
LeaveColor = UIStyles.Orange.ButtonFillColor;
HoverColor = UIStyles.Orange.ButtonFillHoverColor;
break;
case UINotifierType.OK:
- icon.Symbol = 61528;
+ icon.Symbol = 361528;
icon.SymbolColor = UIStyles.Green.ButtonFillColor;
LeaveColor = UIStyles.Green.ButtonFillColor;
HoverColor = UIStyles.Green.ButtonFillHoverColor;
@@ -802,6 +802,11 @@ namespace Sunny.UI
///
/// 正确
///
- OK
+ OK,
+
+ ///
+ /// 询问
+ ///
+ Ask
}
}
\ No newline at end of file
diff --git a/SunnyUI/Forms/UINotifier.designer.cs b/SunnyUI/Forms/UINotifier.designer.cs
index bb0442b7..dd382539 100644
--- a/SunnyUI/Forms/UINotifier.designer.cs
+++ b/SunnyUI/Forms/UINotifier.designer.cs
@@ -31,161 +31,159 @@
///
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- this.noteContent = new System.Windows.Forms.Label();
- this.noteDate = new System.Windows.Forms.Label();
- this.buttonClose = new System.Windows.Forms.PictureBox();
- this.buttonMenu = new System.Windows.Forms.PictureBox();
- this.menu = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.closeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.noteTitle = new System.Windows.Forms.Label();
- this.idLabel = new System.Windows.Forms.Label();
- this.icon = new Sunny.UI.UISymbolLabel();
- ((System.ComponentModel.ISupportInitialize)(this.buttonClose)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.buttonMenu)).BeginInit();
- this.menu.SuspendLayout();
- this.SuspendLayout();
+ components = new System.ComponentModel.Container();
+ noteContent = new System.Windows.Forms.Label();
+ noteDate = new System.Windows.Forms.Label();
+ buttonClose = new System.Windows.Forms.PictureBox();
+ buttonMenu = new System.Windows.Forms.PictureBox();
+ menu = new System.Windows.Forms.ContextMenuStrip(components);
+ closeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ noteTitle = new System.Windows.Forms.Label();
+ idLabel = new System.Windows.Forms.Label();
+ icon = new UISymbolLabel();
+ ((System.ComponentModel.ISupportInitialize)buttonClose).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)buttonMenu).BeginInit();
+ menu.SuspendLayout();
+ SuspendLayout();
//
// noteContent
//
- this.noteContent.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
- this.noteContent.Image = global::Sunny.UI.Properties.Resources.notifier;
- this.noteContent.Location = new System.Drawing.Point(43, 30);
- this.noteContent.Name = "noteContent";
- this.noteContent.Size = new System.Drawing.Size(270, 73);
- this.noteContent.TabIndex = 3;
- this.noteContent.Text = "Description";
- this.noteContent.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.noteContent.Click += new System.EventHandler(this.noteContent_Click);
+ noteContent.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
+ noteContent.Image = Properties.Resources.notifier;
+ noteContent.Location = new System.Drawing.Point(43, 30);
+ noteContent.Name = "noteContent";
+ noteContent.Size = new System.Drawing.Size(270, 73);
+ noteContent.TabIndex = 3;
+ noteContent.Text = "Description";
+ noteContent.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ noteContent.Click += noteContent_Click;
//
// noteDate
//
- this.noteDate.AutoSize = true;
- this.noteDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.noteDate.Image = global::Sunny.UI.Properties.Resources.notifier;
- this.noteDate.Location = new System.Drawing.Point(11, 97);
- this.noteDate.Name = "noteDate";
- this.noteDate.Size = new System.Drawing.Size(13, 9);
- this.noteDate.TabIndex = 4;
- this.noteDate.Text = "- -";
+ noteDate.AutoSize = true;
+ noteDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F);
+ noteDate.Image = Properties.Resources.notifier;
+ noteDate.Location = new System.Drawing.Point(11, 97);
+ noteDate.Name = "noteDate";
+ noteDate.Size = new System.Drawing.Size(13, 9);
+ noteDate.TabIndex = 4;
+ noteDate.Text = "- -";
//
// buttonClose
//
- this.buttonClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(140)))), ((int)(((byte)(230)))));
- this.buttonClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
- this.buttonClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
- this.buttonClose.ForeColor = System.Drawing.Color.White;
- this.buttonClose.Location = new System.Drawing.Point(256, 2);
- this.buttonClose.Name = "buttonClose";
- this.buttonClose.Size = new System.Drawing.Size(66, 24);
- this.buttonClose.TabIndex = 1;
- this.buttonClose.TabStop = false;
- this.buttonClose.Text = " Calibrator";
- this.buttonClose.Click += new System.EventHandler(this.onCloseClick);
- this.buttonClose.Paint += new System.Windows.Forms.PaintEventHandler(this.OnPaint);
+ buttonClose.BackColor = System.Drawing.Color.FromArgb(90, 140, 230);
+ buttonClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ buttonClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
+ buttonClose.ForeColor = System.Drawing.Color.White;
+ buttonClose.Location = new System.Drawing.Point(256, 2);
+ buttonClose.Name = "buttonClose";
+ buttonClose.Size = new System.Drawing.Size(66, 24);
+ buttonClose.TabIndex = 1;
+ buttonClose.TabStop = false;
+ buttonClose.Text = " Calibrator";
+ buttonClose.Click += onCloseClick;
+ buttonClose.Paint += OnPaint;
//
// buttonMenu
//
- this.buttonMenu.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(140)))), ((int)(((byte)(230)))));
- this.buttonMenu.BackgroundImage = global::Sunny.UI.Properties.Resources.menu;
- this.buttonMenu.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
- this.buttonMenu.ContextMenuStrip = this.menu;
- this.buttonMenu.Location = new System.Drawing.Point(275, 2);
- this.buttonMenu.Name = "buttonMenu";
- this.buttonMenu.Size = new System.Drawing.Size(24, 24);
- this.buttonMenu.TabIndex = 5;
- this.buttonMenu.TabStop = false;
- this.buttonMenu.Click += new System.EventHandler(this.onMenuClick);
+ buttonMenu.BackColor = System.Drawing.Color.FromArgb(90, 140, 230);
+ buttonMenu.BackgroundImage = Properties.Resources.menu;
+ buttonMenu.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ buttonMenu.ContextMenuStrip = menu;
+ buttonMenu.Location = new System.Drawing.Point(275, 2);
+ buttonMenu.Name = "buttonMenu";
+ buttonMenu.Size = new System.Drawing.Size(24, 24);
+ buttonMenu.TabIndex = 5;
+ buttonMenu.TabStop = false;
+ buttonMenu.Click += onMenuClick;
//
// menu
//
- this.menu.ImageScalingSize = new System.Drawing.Size(24, 24);
- this.menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.closeAllToolStripMenuItem});
- this.menu.Name = "menu";
- this.menu.Size = new System.Drawing.Size(120, 26);
+ menu.ImageScalingSize = new System.Drawing.Size(24, 24);
+ menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { closeAllToolStripMenuItem });
+ menu.Name = "menu";
+ menu.Size = new System.Drawing.Size(120, 26);
//
// closeAllToolStripMenuItem
//
- this.closeAllToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.closeAllToolStripMenuItem.Name = "closeAllToolStripMenuItem";
- this.closeAllToolStripMenuItem.Size = new System.Drawing.Size(119, 22);
- this.closeAllToolStripMenuItem.Text = "Close All";
- this.closeAllToolStripMenuItem.Click += new System.EventHandler(this.onMenuCloseAllClick);
+ closeAllToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 8.25F);
+ closeAllToolStripMenuItem.Name = "closeAllToolStripMenuItem";
+ closeAllToolStripMenuItem.Size = new System.Drawing.Size(119, 22);
+ closeAllToolStripMenuItem.Text = "Close All";
+ closeAllToolStripMenuItem.Click += onMenuCloseAllClick;
//
// noteTitle
//
- this.noteTitle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(140)))), ((int)(((byte)(230)))));
- this.noteTitle.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
- this.noteTitle.ForeColor = System.Drawing.Color.White;
- this.noteTitle.Location = new System.Drawing.Point(2, 2);
- this.noteTitle.Name = "noteTitle";
- this.noteTitle.Size = new System.Drawing.Size(270, 24);
- this.noteTitle.TabIndex = 6;
- this.noteTitle.Text = "Note";
- this.noteTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ noteTitle.BackColor = System.Drawing.Color.FromArgb(90, 140, 230);
+ noteTitle.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
+ noteTitle.ForeColor = System.Drawing.Color.White;
+ noteTitle.Location = new System.Drawing.Point(2, 2);
+ noteTitle.Name = "noteTitle";
+ noteTitle.Size = new System.Drawing.Size(270, 24);
+ noteTitle.TabIndex = 6;
+ noteTitle.Text = "Note";
+ noteTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// idLabel
//
- this.idLabel.AutoSize = true;
- this.idLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.idLabel.Image = global::Sunny.UI.Properties.Resources.notifier;
- this.idLabel.Location = new System.Drawing.Point(296, 103);
- this.idLabel.Name = "idLabel";
- this.idLabel.Size = new System.Drawing.Size(21, 9);
- this.idLabel.TabIndex = 7;
- this.idLabel.Text = "0000";
- this.idLabel.Visible = false;
+ idLabel.AutoSize = true;
+ idLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F);
+ idLabel.Image = Properties.Resources.notifier;
+ idLabel.Location = new System.Drawing.Point(296, 103);
+ idLabel.Name = "idLabel";
+ idLabel.Size = new System.Drawing.Size(21, 9);
+ idLabel.TabIndex = 7;
+ idLabel.Text = "0000";
+ idLabel.Visible = false;
//
// icon
//
- this.icon.BackColor = System.Drawing.Color.White;
- this.icon.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.icon.Location = new System.Drawing.Point(10, 51);
- this.icon.MinimumSize = new System.Drawing.Size(1, 1);
- this.icon.Name = "icon";
- this.icon.Padding = new System.Windows.Forms.Padding(40, 0, 0, 0);
- this.icon.Size = new System.Drawing.Size(32, 30);
- this.icon.Style = Sunny.UI.UIStyle.Custom;
- this.icon.StyleCustomMode = true;
- this.icon.Symbol = 61528;
- this.icon.SymbolColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(140)))), ((int)(((byte)(230)))));
- this.icon.SymbolSize = 36;
- this.icon.TabIndex = 8;
- this.icon.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ icon.BackColor = System.Drawing.Color.White;
+ icon.Font = new System.Drawing.Font("宋体", 12F);
+ icon.Location = new System.Drawing.Point(10, 51);
+ icon.MinimumSize = new System.Drawing.Size(1, 1);
+ icon.Name = "icon";
+ icon.Padding = new System.Windows.Forms.Padding(40, 0, 0, 0);
+ icon.Size = new System.Drawing.Size(32, 30);
+ icon.Style = UIStyle.Custom;
+ icon.StyleCustomMode = true;
+ icon.Symbol = 361528;
+ icon.SymbolColor = System.Drawing.Color.FromArgb(90, 140, 230);
+ icon.SymbolSize = 36;
+ icon.TabIndex = 8;
+ icon.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// UINotifier
//
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
- this.BackColor = System.Drawing.Color.White;
- this.BackgroundImage = global::Sunny.UI.Properties.Resources.notifier;
- this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
- this.ClientSize = new System.Drawing.Size(324, 117);
- this.Controls.Add(this.icon);
- this.Controls.Add(this.idLabel);
- this.Controls.Add(this.buttonMenu);
- this.Controls.Add(this.noteTitle);
- this.Controls.Add(this.noteDate);
- this.Controls.Add(this.noteContent);
- this.Controls.Add(this.buttonClose);
- this.DoubleBuffered = true;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
- this.Name = "UINotifier";
- this.ShowInTaskbar = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "Toast";
- this.TopMost = true;
- this.Load += new System.EventHandler(this.OnLoad);
- this.Shown += new System.EventHandler(this.UINotifier_Shown);
- this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.OnMouseDown);
- this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.OnMouseMove);
- this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.OnMouseUp);
- ((System.ComponentModel.ISupportInitialize)(this.buttonClose)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.buttonMenu)).EndInit();
- this.menu.ResumeLayout(false);
- this.ResumeLayout(false);
- this.PerformLayout();
-
+ AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ BackColor = System.Drawing.Color.White;
+ BackgroundImage = Properties.Resources.notifier;
+ BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
+ ClientSize = new System.Drawing.Size(324, 117);
+ Controls.Add(icon);
+ Controls.Add(idLabel);
+ Controls.Add(buttonMenu);
+ Controls.Add(noteTitle);
+ Controls.Add(noteDate);
+ Controls.Add(noteContent);
+ Controls.Add(buttonClose);
+ DoubleBuffered = true;
+ FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+ Name = "UINotifier";
+ ShowInTaskbar = false;
+ StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ Text = "Toast";
+ TopMost = true;
+ Load += OnLoad;
+ Shown += UINotifier_Shown;
+ MouseDown += OnMouseDown;
+ MouseMove += OnMouseMove;
+ MouseUp += OnMouseUp;
+ ((System.ComponentModel.ISupportInitialize)buttonClose).EndInit();
+ ((System.ComponentModel.ISupportInitialize)buttonMenu).EndInit();
+ menu.ResumeLayout(false);
+ ResumeLayout(false);
+ PerformLayout();
}
#endregion
diff --git a/SunnyUI/Forms/UINotifier.resx b/SunnyUI/Forms/UINotifier.resx
index 78b463dc..7ed87c42 100644
--- a/SunnyUI/Forms/UINotifier.resx
+++ b/SunnyUI/Forms/UINotifier.resx
@@ -1,4 +1,64 @@
-
+
+
+
diff --git a/SunnyUI/Forms/UISelectForm.Designer.cs b/SunnyUI/Forms/UISelectForm.Designer.cs
index 761103f4..47cd14ca 100644
--- a/SunnyUI/Forms/UISelectForm.Designer.cs
+++ b/SunnyUI/Forms/UISelectForm.Designer.cs
@@ -42,16 +42,18 @@
// btnCancel
//
btnCancel.Location = new System.Drawing.Point(343, 4);
+ btnCancel.Symbol = 361453;
//
// btnOK
//
btnOK.Location = new System.Drawing.Point(228, 4);
+ btnOK.Symbol = 361452;
//
// label
//
label.AutoSize = true;
label.BackColor = System.Drawing.Color.Transparent;
- label.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ label.Font = new System.Drawing.Font("宋体", 12F);
label.ForeColor = System.Drawing.Color.FromArgb(48, 48, 48);
label.Location = new System.Drawing.Point(29, 57);
label.Name = "label";
@@ -65,7 +67,7 @@
ComboBox.DataSource = null;
ComboBox.DropDownStyle = UIDropDownStyle.DropDownList;
ComboBox.FillColor = System.Drawing.Color.White;
- ComboBox.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ ComboBox.Font = new System.Drawing.Font("宋体", 12F);
ComboBox.ItemHoverColor = System.Drawing.Color.FromArgb(155, 200, 255);
ComboBox.ItemSelectForeColor = System.Drawing.Color.FromArgb(235, 243, 255);
ComboBox.Location = new System.Drawing.Point(29, 92);
@@ -87,7 +89,6 @@
Controls.Add(ComboBox);
Name = "UISelectForm";
Padding = new System.Windows.Forms.Padding(1, 35, 1, 1);
- ShowIcon = false;
Text = "选择";
ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 473, 182);
Controls.SetChildIndex(ComboBox, 0);