diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe index 17164944..d8d91ad8 100644 Binary files a/Bin/net40/SunnyUI.Demo.exe and b/Bin/net40/SunnyUI.Demo.exe differ diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index caf6c5bb..1122a972 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 67eb9186..86c826cf 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 b24ebf7b..40536ed1 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 f808463e..b227cfed 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 9a688804..5f0ea6d8 100644 Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ diff --git a/SunnyUI.Demo/Controls/FCombobox.Designer.cs b/SunnyUI.Demo/Controls/FCombobox.Designer.cs index 453e20f0..b7120493 100644 --- a/SunnyUI.Demo/Controls/FCombobox.Designer.cs +++ b/SunnyUI.Demo/Controls/FCombobox.Designer.cs @@ -184,6 +184,7 @@ 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.NodesSelected += new Sunny.UI.UIComboTreeView.OnNodesSelected(this.uiComboTreeView3_NodesSelected); // // uiComboTreeView4 // @@ -256,6 +257,7 @@ 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.NodesSelected += new Sunny.UI.UIComboTreeView.OnNodesSelected(this.uiComboTreeView2_NodesSelected); // // uiLine1 // diff --git a/SunnyUI.Demo/Controls/FCombobox.cs b/SunnyUI.Demo/Controls/FCombobox.cs index 5462d0c2..3c546f82 100644 --- a/SunnyUI.Demo/Controls/FCombobox.cs +++ b/SunnyUI.Demo/Controls/FCombobox.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Windows.Forms; namespace Sunny.UI.Demo { @@ -65,5 +66,20 @@ namespace Sunny.UI.Demo { Console.WriteLine(value.ToString()); } + + private void uiComboTreeView2_NodesSelected(object sender, System.Windows.Forms.TreeNodeCollection nodes) + { + //返回的nodes为TreeView的所有节点,需循环判断 + foreach (TreeNode item in nodes) + { + if (item.Checked) + Console.WriteLine(item.ToString()); + } + } + + private void uiComboTreeView3_NodesSelected(object sender, TreeNodeCollection nodes) + { + + } } } diff --git a/SunnyUI/Controls/DropItem/UIColorItem.cs b/SunnyUI/Controls/DropItem/UIColorItem.cs index c9986e3b..f08662ff 100644 --- a/SunnyUI/Controls/DropItem/UIColorItem.cs +++ b/SunnyUI/Controls/DropItem/UIColorItem.cs @@ -3,12 +3,16 @@ using System.Drawing; namespace Sunny.UI { - public sealed class UIColorItem : UIDropDownItem + public sealed class UIColorItem : UIDropDownItem, ITranslate { public UIColorItem() { InitializeComponent(); + Translate(); + } + public void Translate() + { btnOK.Text = UILocalize.OK; btnCancel.Text = UILocalize.Cancel; } diff --git a/SunnyUI/Controls/DropItem/UIComboTreeViewItem.cs b/SunnyUI/Controls/DropItem/UIComboTreeViewItem.cs index f704cccb..7e60a130 100644 --- a/SunnyUI/Controls/DropItem/UIComboTreeViewItem.cs +++ b/SunnyUI/Controls/DropItem/UIComboTreeViewItem.cs @@ -2,7 +2,7 @@ namespace Sunny.UI { - public class UIComboTreeViewItem : UIDropDownItem + public class UIComboTreeViewItem : UIDropDownItem, ITranslate { private UIPanel panel; private UISymbolButton btnCancel; @@ -27,6 +27,13 @@ namespace Sunny.UI public UIComboTreeViewItem() { InitializeComponent(); + Translate(); + } + + public void Translate() + { + btnOK.Text = UILocalize.OK; + btnCancel.Text = UILocalize.Cancel; } private void InitializeComponent() diff --git a/SunnyUI/Controls/DropItem/UIDateItem.cs b/SunnyUI/Controls/DropItem/UIDateItem.cs index 1ed61d11..44cfa9e5 100644 --- a/SunnyUI/Controls/DropItem/UIDateItem.cs +++ b/SunnyUI/Controls/DropItem/UIDateItem.cs @@ -27,7 +27,7 @@ using System.Drawing; namespace Sunny.UI { - public sealed class UIDateItem : UIDropDownItem + public sealed class UIDateItem : UIDropDownItem, ITranslate { #region InitializeComponent @@ -313,19 +313,24 @@ namespace Sunny.UI Width = 284; Height = 200; TabControl.TabVisible = false; + Translate(); + } - months.Add("一月"); - months.Add("二月"); - months.Add("三月"); - months.Add("四月"); - months.Add("五月"); - months.Add("六月"); - months.Add("七月"); - months.Add("八月"); - months.Add("九月"); - months.Add("十月"); - months.Add("十一月"); - months.Add("十二月"); + public void Translate() + { + months.Clear(); + months.Add(UILocalize.January); + months.Add(UILocalize.February); + months.Add(UILocalize.March); + months.Add(UILocalize.April); + months.Add(UILocalize.May); + months.Add(UILocalize.June); + months.Add(UILocalize.July); + months.Add(UILocalize.August); + months.Add(UILocalize.September); + months.Add(UILocalize.October); + months.Add(UILocalize.November); + months.Add(UILocalize.December); } private void TopPanel_Click(object sender, EventArgs e) @@ -400,7 +405,7 @@ namespace Sunny.UI } p3.Invalidate(); - TopPanel.Text = Year + "年" + Month + "月"; + TopPanel.Text = Year + " - " + Month.ToString("D2"); } private void TabControl_SelectedIndexChanged(object sender, EventArgs e) @@ -414,18 +419,18 @@ namespace Sunny.UI break; case 1: - TopPanel.Text = Year + "年"; + TopPanel.Text = Year.ToString(); break; case 2: - TopPanel.Text = Year + "年" + Month + "月"; + TopPanel.Text = Year + " - " + Month.ToString("D2"); break; } } private void SetYears(int iy) { - TopPanel.Text = iy + "年 - " + (iy + 9) + "年"; + TopPanel.Text = iy + " - " + (iy + 9); years.Clear(); years.Add(iy - 1); @@ -451,7 +456,7 @@ namespace Sunny.UI case 1: Year -= 1; - TopPanel.Text = Year + "年"; + TopPanel.Text = Year.ToString(); break; case 2: @@ -494,7 +499,7 @@ namespace Sunny.UI case 1: if (Year == DateTime.MaxValue.Year) return; Year += 1; - TopPanel.Text = Year + "年"; + TopPanel.Text = Year.ToString(); break; case 2: @@ -611,14 +616,20 @@ namespace Sunny.UI int width = p3.Width / 7; int height = (p3.Height - 30) / 6; - SizeF sf = e.Graphics.MeasureString("日", Font); - e.Graphics.DrawString("日", Font, ForeColor, width * 0 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("一", Font, ForeColor, width * 1 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("二", Font, ForeColor, width * 2 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("三", Font, ForeColor, width * 3 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("四", Font, ForeColor, width * 4 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("五", Font, ForeColor, width * 5 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("六", Font, ForeColor, width * 6 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + SizeF sf = e.Graphics.MeasureString(UILocalize.Sunday, Font); + e.Graphics.DrawString(UILocalize.Sunday, Font, ForeColor, width * 0 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Monday, Font); + e.Graphics.DrawString(UILocalize.Monday, Font, ForeColor, width * 1 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Tuesday, Font); + e.Graphics.DrawString(UILocalize.Tuesday, Font, ForeColor, width * 2 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Wednesday, Font); + e.Graphics.DrawString(UILocalize.Wednesday, Font, ForeColor, width * 3 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Thursday, Font); + e.Graphics.DrawString(UILocalize.Thursday, Font, ForeColor, width * 4 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Friday, Font); + e.Graphics.DrawString(UILocalize.Friday, Font, ForeColor, width * 5 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Saturday, Font); + e.Graphics.DrawString(UILocalize.Saturday, Font, ForeColor, width * 6 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); e.Graphics.DrawLine(Color.DarkGray, 8, 26, 268, 26); @@ -650,11 +661,11 @@ namespace Sunny.UI e.Graphics.FillRectangle(p3.FillColor, p3.Width - width * 4 + 1, p3.Height - height + 1, width * 4 - 2, height - 2); e.Graphics.FillRoundRectangle(PrimaryColor, new Rectangle((int)(p3.Width - width * 4 + 6), p3.Height - height + 3, 8, height - 10), 3); - sf = e.Graphics.MeasureString("今天:" + DateTime.Now.DateString(), SubFont); - e.Graphics.DrawString("今天 :", SubFont, isToday ? PrimaryColor : Color.DarkGray, p3.Width - width * 4 + 17, p3.Height - height - 1 + (height - sf.Height) / 2.0f); + sf = e.Graphics.MeasureString(UILocalize.Today + ": " + DateTime.Now.DateString(), SubFont); + e.Graphics.DrawString(UILocalize.Today + ": " + DateTime.Now.DateString(), SubFont, isToday ? PrimaryColor : Color.DarkGray, p3.Width - width * 4 + 17, p3.Height - height - 1 + (height - sf.Height) / 2.0f); - sf = e.Graphics.MeasureString(DateTime.Now.DateString(), Font); - e.Graphics.DrawString(DateTime.Now.DateString(), Font, isToday ? PrimaryColor : Color.DarkGray, p3.Width - width * 4 + 55, p3.Height - height - 1 + (height - sf.Height) / 2.0f); + //sf = e.Graphics.MeasureString(DateTime.Now.DateString(), Font); + //e.Graphics.DrawString(DateTime.Now.DateString(), Font, isToday ? PrimaryColor : Color.DarkGray, p3.Width - width * 4 + 55, p3.Height - height - 1 + (height - sf.Height) / 2.0f); } } } diff --git a/SunnyUI/Controls/DropItem/UIDateTimeItem.cs b/SunnyUI/Controls/DropItem/UIDateTimeItem.cs index 6653322f..5f61d941 100644 --- a/SunnyUI/Controls/DropItem/UIDateTimeItem.cs +++ b/SunnyUI/Controls/DropItem/UIDateTimeItem.cs @@ -27,7 +27,7 @@ using System.Drawing; namespace Sunny.UI { - public sealed class UIDateTimeItem : UIDropDownItem + public sealed class UIDateTimeItem : UIDropDownItem, ITranslate { #region InitializeComponent @@ -114,18 +114,20 @@ namespace Sunny.UI this.TopPanel.Controls.Add(this.b1); this.TopPanel.Dock = System.Windows.Forms.DockStyle.Top; this.TopPanel.FillColor = System.Drawing.Color.White; - this.TopPanel.Font = new System.Drawing.Font("微软雅黑", 12F); + this.TopPanel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.TopPanel.Location = new System.Drawing.Point(0, 0); this.TopPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.TopPanel.MinimumSize = new System.Drawing.Size(1, 1); this.TopPanel.Name = "TopPanel"; this.TopPanel.RadiusSides = Sunny.UI.UICornerRadiusSides.None; - this.TopPanel.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)(((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) + this.TopPanel.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)(((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top) | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); this.TopPanel.Size = new System.Drawing.Size(284, 31); this.TopPanel.Style = Sunny.UI.UIStyle.Custom; this.TopPanel.StyleCustomMode = true; this.TopPanel.TabIndex = 0; this.TopPanel.Text = "2020-05-05"; + this.TopPanel.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.TopPanel.Click += new System.EventHandler(this.TopPanel_Click); // // b4 @@ -135,10 +137,11 @@ namespace Sunny.UI this.b4.Cursor = System.Windows.Forms.Cursors.Hand; this.b4.FillColor = System.Drawing.Color.White; this.b4.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.b4.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.b4.ImageInterval = 0; this.b4.Location = new System.Drawing.Point(250, 4); + this.b4.MinimumSize = new System.Drawing.Size(1, 1); this.b4.Name = "b4"; this.b4.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.b4.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -158,10 +161,11 @@ namespace Sunny.UI this.b3.Cursor = System.Windows.Forms.Cursors.Hand; this.b3.FillColor = System.Drawing.Color.White; this.b3.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.b3.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.b3.ImageInterval = 0; this.b3.Location = new System.Drawing.Point(214, 4); + this.b3.MinimumSize = new System.Drawing.Size(1, 1); this.b3.Name = "b3"; this.b3.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.b3.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -180,10 +184,11 @@ namespace Sunny.UI this.b2.Cursor = System.Windows.Forms.Cursors.Hand; this.b2.FillColor = System.Drawing.Color.White; this.b2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.b2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.b2.ImageInterval = 0; this.b2.Location = new System.Drawing.Point(40, 4); + this.b2.MinimumSize = new System.Drawing.Size(1, 1); this.b2.Name = "b2"; this.b2.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.b2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -202,10 +207,11 @@ namespace Sunny.UI this.b1.Cursor = System.Windows.Forms.Cursors.Hand; this.b1.FillColor = System.Drawing.Color.White; this.b1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.b1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.b1.ImageInterval = 0; this.b1.Location = new System.Drawing.Point(4, 4); + this.b1.MinimumSize = new System.Drawing.Size(1, 1); this.b1.Name = "b1"; this.b1.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.b1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -225,15 +231,18 @@ namespace Sunny.UI this.TabControl.Controls.Add(this.tabPage3); this.TabControl.Dock = System.Windows.Forms.DockStyle.Fill; this.TabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed; - this.TabControl.Font = new System.Drawing.Font("微软雅黑", 12F); + this.TabControl.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.TabControl.ItemSize = new System.Drawing.Size(150, 40); this.TabControl.Location = new System.Drawing.Point(0, 31); + this.TabControl.MainPage = ""; + this.TabControl.MenuStyle = Sunny.UI.UIMenuStyle.Custom; this.TabControl.Name = "TabControl"; this.TabControl.SelectedIndex = 0; this.TabControl.Size = new System.Drawing.Size(284, 204); this.TabControl.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; this.TabControl.Style = Sunny.UI.UIStyle.Custom; this.TabControl.TabIndex = 1; + this.TabControl.TabUnSelectedForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); this.TabControl.SelectedIndexChanged += new System.EventHandler(this.TabControl_SelectedIndexChanged); // // tabPage1 @@ -250,15 +259,17 @@ namespace Sunny.UI // this.p1.Dock = System.Windows.Forms.DockStyle.Fill; this.p1.FillColor = System.Drawing.Color.White; - this.p1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.p1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.p1.Location = new System.Drawing.Point(0, 0); this.p1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.p1.MinimumSize = new System.Drawing.Size(1, 1); this.p1.Name = "p1"; this.p1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.p1.Size = new System.Drawing.Size(284, 164); this.p1.Style = Sunny.UI.UIStyle.Custom; this.p1.TabIndex = 0; this.p1.Text = null; + this.p1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.p1.Paint += new System.Windows.Forms.PaintEventHandler(this.p1_Paint); this.p1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.p1_MouseClick); this.p1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.p1_MouseMove); @@ -277,15 +288,17 @@ namespace Sunny.UI // this.p2.Dock = System.Windows.Forms.DockStyle.Fill; this.p2.FillColor = System.Drawing.Color.White; - this.p2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.p2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.p2.Location = new System.Drawing.Point(0, 0); this.p2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.p2.MinimumSize = new System.Drawing.Size(1, 1); this.p2.Name = "p2"; this.p2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.p2.Size = new System.Drawing.Size(450, 230); this.p2.Style = Sunny.UI.UIStyle.Custom; this.p2.TabIndex = 1; this.p2.Text = null; + this.p2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.p2.Paint += new System.Windows.Forms.PaintEventHandler(this.p2_Paint); this.p2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.p2_MouseClick); this.p2.MouseMove += new System.Windows.Forms.MouseEventHandler(this.p2_MouseMove); @@ -304,15 +317,17 @@ namespace Sunny.UI // this.p3.Dock = System.Windows.Forms.DockStyle.Fill; this.p3.FillColor = System.Drawing.Color.White; - this.p3.Font = new System.Drawing.Font("微软雅黑", 12F); + this.p3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.p3.Location = new System.Drawing.Point(0, 0); this.p3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.p3.MinimumSize = new System.Drawing.Size(1, 1); this.p3.Name = "p3"; this.p3.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.p3.Size = new System.Drawing.Size(450, 230); this.p3.Style = Sunny.UI.UIStyle.Custom; this.p3.TabIndex = 2; this.p3.Text = null; + this.p3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.p3.Paint += new System.Windows.Forms.PaintEventHandler(this.p3_Paint); this.p3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.p3_MouseClick); this.p3.MouseMove += new System.Windows.Forms.MouseEventHandler(this.p3_MouseMove); @@ -320,7 +335,7 @@ namespace Sunny.UI // sb // this.sb.BackColor = System.Drawing.Color.Transparent; - this.sb.Font = new System.Drawing.Font("微软雅黑", 12F); + this.sb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.sb.ForeColor = System.Drawing.Color.DarkGray; this.sb.Location = new System.Drawing.Point(398, 103); this.sb.Name = "sb"; @@ -333,7 +348,7 @@ namespace Sunny.UI // mb // this.mb.BackColor = System.Drawing.Color.Transparent; - this.mb.Font = new System.Drawing.Font("微软雅黑", 12F); + this.mb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.mb.ForeColor = System.Drawing.Color.DarkGray; this.mb.Location = new System.Drawing.Point(345, 103); this.mb.Name = "mb"; @@ -346,7 +361,7 @@ namespace Sunny.UI // hb // this.hb.BackColor = System.Drawing.Color.Transparent; - this.hb.Font = new System.Drawing.Font("微软雅黑", 12F); + this.hb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.hb.ForeColor = System.Drawing.Color.DarkGray; this.hb.Location = new System.Drawing.Point(292, 103); this.hb.Name = "hb"; @@ -359,7 +374,7 @@ namespace Sunny.UI // st // this.st.BackColor = System.Drawing.Color.Transparent; - this.st.Font = new System.Drawing.Font("微软雅黑", 12F); + this.st.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.st.ForeColor = System.Drawing.Color.DarkGray; this.st.Location = new System.Drawing.Point(398, 31); this.st.Name = "st"; @@ -372,7 +387,7 @@ namespace Sunny.UI // mt // this.mt.BackColor = System.Drawing.Color.Transparent; - this.mt.Font = new System.Drawing.Font("微软雅黑", 12F); + this.mt.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.mt.ForeColor = System.Drawing.Color.DarkGray; this.mt.Location = new System.Drawing.Point(345, 31); this.mt.Name = "mt"; @@ -385,7 +400,7 @@ namespace Sunny.UI // ht // this.ht.BackColor = System.Drawing.Color.Transparent; - this.ht.Font = new System.Drawing.Font("微软雅黑", 12F); + this.ht.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.ht.ForeColor = System.Drawing.Color.DarkGray; this.ht.Location = new System.Drawing.Point(292, 31); this.ht.Name = "ht"; @@ -398,7 +413,7 @@ namespace Sunny.UI // sc // this.sc.BackColor = System.Drawing.Color.Transparent; - this.sc.Font = new System.Drawing.Font("微软雅黑", 12F); + this.sc.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.sc.Location = new System.Drawing.Point(398, 65); this.sc.Name = "sc"; this.sc.Size = new System.Drawing.Size(46, 27); @@ -411,7 +426,7 @@ namespace Sunny.UI // mc // this.mc.BackColor = System.Drawing.Color.Transparent; - this.mc.Font = new System.Drawing.Font("微软雅黑", 12F); + this.mc.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.mc.Location = new System.Drawing.Point(345, 65); this.mc.Name = "mc"; this.mc.Size = new System.Drawing.Size(46, 27); @@ -424,7 +439,7 @@ namespace Sunny.UI // hc // this.hc.BackColor = System.Drawing.Color.Transparent; - this.hc.Font = new System.Drawing.Font("微软雅黑", 12F); + this.hc.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.hc.Location = new System.Drawing.Point(292, 65); this.hc.Name = "hc"; this.hc.Size = new System.Drawing.Size(46, 27); @@ -437,13 +452,14 @@ namespace Sunny.UI // btnCancel // this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.btnCancel.Location = new System.Drawing.Point(370, 162); + 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.Size = new System.Drawing.Size(74, 27); this.btnCancel.Style = Sunny.UI.UIStyle.Custom; - this.btnCancel.Symbol = 61453; + this.btnCancel.Symbol = 0; this.btnCancel.TabIndex = 30; this.btnCancel.Text = "取消"; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); @@ -451,12 +467,14 @@ namespace Sunny.UI // btnOK // this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnOK.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnOK.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.btnOK.Location = new System.Drawing.Point(291, 162); + 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.Size = new System.Drawing.Size(74, 27); this.btnOK.Style = Sunny.UI.UIStyle.Custom; + this.btnOK.Symbol = 0; this.btnOK.TabIndex = 29; this.btnOK.Text = "确定"; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); @@ -467,10 +485,11 @@ namespace Sunny.UI this.s2.Cursor = System.Windows.Forms.Cursors.Hand; this.s2.FillColor = System.Drawing.Color.White; this.s2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.s2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.s2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.s2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.s2.ImageInterval = 0; this.s2.Location = new System.Drawing.Point(405, 129); + this.s2.MinimumSize = new System.Drawing.Size(1, 1); this.s2.Name = "s2"; this.s2.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.s2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -490,10 +509,11 @@ namespace Sunny.UI this.mm2.Cursor = System.Windows.Forms.Cursors.Hand; this.mm2.FillColor = System.Drawing.Color.White; this.mm2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.mm2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.mm2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.mm2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.mm2.ImageInterval = 0; this.mm2.Location = new System.Drawing.Point(352, 129); + this.mm2.MinimumSize = new System.Drawing.Size(1, 1); this.mm2.Name = "mm2"; this.mm2.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.mm2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -513,10 +533,11 @@ namespace Sunny.UI this.h2.Cursor = System.Windows.Forms.Cursors.Hand; this.h2.FillColor = System.Drawing.Color.White; this.h2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.h2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.h2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.h2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.h2.ImageInterval = 0; this.h2.Location = new System.Drawing.Point(299, 128); + this.h2.MinimumSize = new System.Drawing.Size(1, 1); this.h2.Name = "h2"; this.h2.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.h2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -536,10 +557,11 @@ namespace Sunny.UI this.s1.Cursor = System.Windows.Forms.Cursors.Hand; this.s1.FillColor = System.Drawing.Color.White; this.s1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.s1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.s1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.s1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.s1.ImageInterval = 0; this.s1.Location = new System.Drawing.Point(405, 4); + this.s1.MinimumSize = new System.Drawing.Size(1, 1); this.s1.Name = "s1"; this.s1.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.s1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -559,10 +581,11 @@ namespace Sunny.UI this.mm1.Cursor = System.Windows.Forms.Cursors.Hand; this.mm1.FillColor = System.Drawing.Color.White; this.mm1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.mm1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.mm1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.mm1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.mm1.ImageInterval = 0; this.mm1.Location = new System.Drawing.Point(352, 4); + this.mm1.MinimumSize = new System.Drawing.Size(1, 1); this.mm1.Name = "mm1"; this.mm1.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.mm1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -582,10 +605,11 @@ namespace Sunny.UI this.h1.Cursor = System.Windows.Forms.Cursors.Hand; this.h1.FillColor = System.Drawing.Color.White; this.h1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.h1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.h1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.h1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.h1.ImageInterval = 0; this.h1.Location = new System.Drawing.Point(299, 4); + this.h1.MinimumSize = new System.Drawing.Size(1, 1); this.h1.Name = "h1"; this.h1.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.h1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -602,7 +626,7 @@ namespace Sunny.UI // uiLine2 // this.uiLine2.FillColor = System.Drawing.Color.White; - this.uiLine2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiLine2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiLine2.LineColor = System.Drawing.Color.Silver; this.uiLine2.Location = new System.Drawing.Point(289, 88); this.uiLine2.MinimumSize = new System.Drawing.Size(16, 16); @@ -615,7 +639,7 @@ namespace Sunny.UI // uiLine3 // this.uiLine3.FillColor = System.Drawing.Color.White; - this.uiLine3.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiLine3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiLine3.LineColor = System.Drawing.Color.Silver; this.uiLine3.Location = new System.Drawing.Point(289, 54); this.uiLine3.MinimumSize = new System.Drawing.Size(16, 16); @@ -632,9 +656,10 @@ namespace Sunny.UI this.uiPanel1.Controls.Add(this.TopPanel); this.uiPanel1.Dock = System.Windows.Forms.DockStyle.Left; this.uiPanel1.FillColor = System.Drawing.Color.White; - this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiPanel1.Location = new System.Drawing.Point(0, 0); this.uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.uiPanel1.MinimumSize = new System.Drawing.Size(1, 1); this.uiPanel1.Name = "uiPanel1"; this.uiPanel1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.uiPanel1.Size = new System.Drawing.Size(284, 235); @@ -642,6 +667,7 @@ namespace Sunny.UI this.uiPanel1.StyleCustomMode = true; this.uiPanel1.TabIndex = 3; this.uiPanel1.Text = null; + this.uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; // // UIDateTimeItem // @@ -694,19 +720,24 @@ namespace Sunny.UI Width = 452; Height = 200; TabControl.TabVisible = false; + Translate(); + } - months.Add("一月"); - months.Add("二月"); - months.Add("三月"); - months.Add("四月"); - months.Add("五月"); - months.Add("六月"); - months.Add("七月"); - months.Add("八月"); - months.Add("九月"); - months.Add("十月"); - months.Add("十一月"); - months.Add("十二月"); + public void Translate() + { + months.Clear(); + months.Add(UILocalize.January); + months.Add(UILocalize.February); + months.Add(UILocalize.March); + months.Add(UILocalize.April); + months.Add(UILocalize.May); + months.Add(UILocalize.June); + months.Add(UILocalize.July); + months.Add(UILocalize.August); + months.Add(UILocalize.September); + months.Add(UILocalize.October); + months.Add(UILocalize.November); + months.Add(UILocalize.December); btnOK.Text = UILocalize.OK; btnCancel.Text = UILocalize.Cancel; @@ -724,7 +755,7 @@ namespace Sunny.UI private void SetYears(int iy) { - TopPanel.Text = iy + "年 - " + (iy + 9) + "年"; + TopPanel.Text = iy + " - " + (iy + 9); years.Clear(); years.Add(iy - 1); @@ -808,7 +839,7 @@ namespace Sunny.UI } p3.Invalidate(); - TopPanel.Text = Year + "年" + Month + "月"; + TopPanel.Text = Year + " - " + Month.ToString("D2"); ; } private void TabControl_SelectedIndexChanged(object sender, EventArgs e) @@ -822,11 +853,11 @@ namespace Sunny.UI break; case 1: - TopPanel.Text = Year + "年"; + TopPanel.Text = Year.ToString(); break; case 2: - TopPanel.Text = Year + "年" + Month + "月"; + TopPanel.Text = Year + " - " + Month.ToString("D2"); ; break; } } @@ -843,7 +874,7 @@ namespace Sunny.UI case 1: Year -= 1; - TopPanel.Text = Year + "年"; + TopPanel.Text = Year.ToString(); break; case 2: @@ -886,7 +917,7 @@ namespace Sunny.UI case 1: if (Year == DateTime.MaxValue.Year) return; Year += 1; - TopPanel.Text = Year + "年"; + TopPanel.Text = Year.ToString(); break; case 2: @@ -1151,14 +1182,20 @@ namespace Sunny.UI int width = p3.Width / 7; int height = (p3.Height - 30) / 6; - SizeF sf = e.Graphics.MeasureString("日", Font); - e.Graphics.DrawString("日", Font, ForeColor, width * 0 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("一", Font, ForeColor, width * 1 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("二", Font, ForeColor, width * 2 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("三", Font, ForeColor, width * 3 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("四", Font, ForeColor, width * 4 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("五", Font, ForeColor, width * 5 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); - e.Graphics.DrawString("六", Font, ForeColor, width * 6 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + SizeF sf = e.Graphics.MeasureString(UILocalize.Sunday, Font); + e.Graphics.DrawString(UILocalize.Sunday, Font, ForeColor, width * 0 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Monday, Font); + e.Graphics.DrawString(UILocalize.Monday, Font, ForeColor, width * 1 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Tuesday, Font); + e.Graphics.DrawString(UILocalize.Tuesday, Font, ForeColor, width * 2 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Wednesday, Font); + e.Graphics.DrawString(UILocalize.Wednesday, Font, ForeColor, width * 3 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Thursday, Font); + e.Graphics.DrawString(UILocalize.Thursday, Font, ForeColor, width * 4 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Friday, Font); + e.Graphics.DrawString(UILocalize.Friday, Font, ForeColor, width * 5 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); + sf = e.Graphics.MeasureString(UILocalize.Saturday, Font); + e.Graphics.DrawString(UILocalize.Saturday, Font, ForeColor, width * 6 + (width - sf.Width) / 2, 4 + (19 - sf.Height) / 2); e.Graphics.DrawLine(Color.DarkGray, 8, 26, 268, 26); @@ -1190,11 +1227,11 @@ namespace Sunny.UI e.Graphics.FillRectangle(p3.FillColor, p3.Width - width * 4 + 1, p3.Height - height + 1, width * 4 - 2, height - 2); e.Graphics.FillRoundRectangle(PrimaryColor, new Rectangle((int)(p3.Width - width * 4 + 6), p3.Height - height + 3, 8, height - 10), 3); - sf = e.Graphics.MeasureString("今天:" + DateTime.Now.DateString(), SubFont); - e.Graphics.DrawString("今天 :", SubFont, isToday ? PrimaryColor : Color.DarkGray, p3.Width - width * 4 + 17, p3.Height - height - 1 + (height - sf.Height) / 2.0f); + sf = e.Graphics.MeasureString(UILocalize.Today + ": " + DateTime.Now.DateString(), SubFont); + e.Graphics.DrawString(UILocalize.Today + ": " + DateTime.Now.DateString(), SubFont, isToday ? PrimaryColor : Color.DarkGray, p3.Width - width * 4 + 17, p3.Height - height - 1 + (height - sf.Height) / 2.0f); - sf = e.Graphics.MeasureString(DateTime.Now.DateString(), Font); - e.Graphics.DrawString(DateTime.Now.DateString(), Font, isToday ? PrimaryColor : Color.DarkGray, p3.Width - width * 4 + 55, p3.Height - height - 1 + (height - sf.Height) / 2.0f); + //sf = e.Graphics.MeasureString(DateTime.Now.DateString(), Font); + //e.Graphics.DrawString(DateTime.Now.DateString(), Font, isToday ? PrimaryColor : Color.DarkGray, p3.Width - width * 4 + 55, p3.Height - height - 1 + (height - sf.Height) / 2.0f); } } } diff --git a/SunnyUI/Controls/DropItem/UIDateTimeItem.resx b/SunnyUI/Controls/DropItem/UIDateTimeItem.resx index 1af7de15..f298a7be 100644 --- a/SunnyUI/Controls/DropItem/UIDateTimeItem.resx +++ b/SunnyUI/Controls/DropItem/UIDateTimeItem.resx @@ -1,64 +1,4 @@ - - - + diff --git a/SunnyUI/Controls/DropItem/UITimeItem.cs b/SunnyUI/Controls/DropItem/UITimeItem.cs index d3478f5a..2236eff5 100644 --- a/SunnyUI/Controls/DropItem/UITimeItem.cs +++ b/SunnyUI/Controls/DropItem/UITimeItem.cs @@ -24,7 +24,7 @@ using System.Drawing; namespace Sunny.UI { - public sealed class UITimeItem : UIDropDownItem + public sealed class UITimeItem : UIDropDownItem, ITranslate { #region InitializeComponent @@ -74,7 +74,7 @@ namespace Sunny.UI // uiLine1 // this.uiLine1.FillColor = System.Drawing.Color.White; - this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiLine1.LineColor = System.Drawing.Color.Silver; this.uiLine1.Location = new System.Drawing.Point(6, 54); this.uiLine1.MinimumSize = new System.Drawing.Size(16, 16); @@ -87,7 +87,7 @@ namespace Sunny.UI // uiLine2 // this.uiLine2.FillColor = System.Drawing.Color.White; - this.uiLine2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiLine2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiLine2.LineColor = System.Drawing.Color.Silver; this.uiLine2.Location = new System.Drawing.Point(6, 88); this.uiLine2.MinimumSize = new System.Drawing.Size(16, 16); @@ -103,10 +103,11 @@ namespace Sunny.UI this.s1.Cursor = System.Windows.Forms.Cursors.Hand; this.s1.FillColor = System.Drawing.Color.White; this.s1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.s1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.s1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.s1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.s1.ImageInterval = 0; this.s1.Location = new System.Drawing.Point(122, 4); + this.s1.MinimumSize = new System.Drawing.Size(1, 1); this.s1.Name = "s1"; this.s1.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.s1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -126,10 +127,11 @@ namespace Sunny.UI this.m1.Cursor = System.Windows.Forms.Cursors.Hand; this.m1.FillColor = System.Drawing.Color.White; this.m1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.m1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.m1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.m1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.m1.ImageInterval = 0; this.m1.Location = new System.Drawing.Point(69, 4); + this.m1.MinimumSize = new System.Drawing.Size(1, 1); this.m1.Name = "m1"; this.m1.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.m1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -149,10 +151,11 @@ namespace Sunny.UI this.h1.Cursor = System.Windows.Forms.Cursors.Hand; this.h1.FillColor = System.Drawing.Color.White; this.h1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.h1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.h1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.h1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.h1.ImageInterval = 0; this.h1.Location = new System.Drawing.Point(16, 4); + this.h1.MinimumSize = new System.Drawing.Size(1, 1); this.h1.Name = "h1"; this.h1.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.h1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -172,10 +175,11 @@ namespace Sunny.UI this.s2.Cursor = System.Windows.Forms.Cursors.Hand; this.s2.FillColor = System.Drawing.Color.White; this.s2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.s2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.s2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.s2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.s2.ImageInterval = 0; this.s2.Location = new System.Drawing.Point(122, 129); + this.s2.MinimumSize = new System.Drawing.Size(1, 1); this.s2.Name = "s2"; this.s2.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.s2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -195,10 +199,11 @@ namespace Sunny.UI this.m2.Cursor = System.Windows.Forms.Cursors.Hand; this.m2.FillColor = System.Drawing.Color.White; this.m2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.m2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.m2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.m2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.m2.ImageInterval = 0; this.m2.Location = new System.Drawing.Point(69, 129); + this.m2.MinimumSize = new System.Drawing.Size(1, 1); this.m2.Name = "m2"; this.m2.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.m2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -218,10 +223,11 @@ namespace Sunny.UI this.h2.Cursor = System.Windows.Forms.Cursors.Hand; this.h2.FillColor = System.Drawing.Color.White; this.h2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.h2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.h2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.h2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.h2.ImageInterval = 0; this.h2.Location = new System.Drawing.Point(16, 128); + this.h2.MinimumSize = new System.Drawing.Size(1, 1); this.h2.Name = "h2"; this.h2.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0); this.h2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; @@ -238,12 +244,14 @@ namespace Sunny.UI // btnOK // this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnOK.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnOK.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.btnOK.Location = new System.Drawing.Point(8, 162); + 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.Size = new System.Drawing.Size(74, 27); this.btnOK.Style = Sunny.UI.UIStyle.Custom; + this.btnOK.Symbol = 0; this.btnOK.TabIndex = 10; this.btnOK.Text = "确定"; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); @@ -251,13 +259,14 @@ namespace Sunny.UI // btnCancel // this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.btnCancel.Location = new System.Drawing.Point(87, 162); + 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.Size = new System.Drawing.Size(74, 27); this.btnCancel.Style = Sunny.UI.UIStyle.Custom; - this.btnCancel.Symbol = 61453; + this.btnCancel.Symbol = 0; this.btnCancel.TabIndex = 11; this.btnCancel.Text = "取消"; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); @@ -265,7 +274,7 @@ namespace Sunny.UI // hc // this.hc.BackColor = System.Drawing.Color.Transparent; - this.hc.Font = new System.Drawing.Font("微软雅黑", 12F); + this.hc.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.hc.Location = new System.Drawing.Point(9, 65); this.hc.Name = "hc"; this.hc.Size = new System.Drawing.Size(46, 27); @@ -278,7 +287,7 @@ namespace Sunny.UI // mc // this.mc.BackColor = System.Drawing.Color.Transparent; - this.mc.Font = new System.Drawing.Font("微软雅黑", 12F); + this.mc.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.mc.Location = new System.Drawing.Point(62, 65); this.mc.Name = "mc"; this.mc.Size = new System.Drawing.Size(46, 27); @@ -291,7 +300,7 @@ namespace Sunny.UI // sc // this.sc.BackColor = System.Drawing.Color.Transparent; - this.sc.Font = new System.Drawing.Font("微软雅黑", 12F); + this.sc.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.sc.Location = new System.Drawing.Point(115, 65); this.sc.Name = "sc"; this.sc.Size = new System.Drawing.Size(46, 27); @@ -304,7 +313,7 @@ namespace Sunny.UI // st // this.st.BackColor = System.Drawing.Color.Transparent; - this.st.Font = new System.Drawing.Font("微软雅黑", 12F); + this.st.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.st.ForeColor = System.Drawing.Color.DarkGray; this.st.Location = new System.Drawing.Point(115, 31); this.st.Name = "st"; @@ -317,7 +326,7 @@ namespace Sunny.UI // mt // this.mt.BackColor = System.Drawing.Color.Transparent; - this.mt.Font = new System.Drawing.Font("微软雅黑", 12F); + this.mt.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.mt.ForeColor = System.Drawing.Color.DarkGray; this.mt.Location = new System.Drawing.Point(62, 31); this.mt.Name = "mt"; @@ -330,7 +339,7 @@ namespace Sunny.UI // ht // this.ht.BackColor = System.Drawing.Color.Transparent; - this.ht.Font = new System.Drawing.Font("微软雅黑", 12F); + this.ht.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.ht.ForeColor = System.Drawing.Color.DarkGray; this.ht.Location = new System.Drawing.Point(9, 31); this.ht.Name = "ht"; @@ -343,7 +352,7 @@ namespace Sunny.UI // sb // this.sb.BackColor = System.Drawing.Color.Transparent; - this.sb.Font = new System.Drawing.Font("微软雅黑", 12F); + this.sb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.sb.ForeColor = System.Drawing.Color.DarkGray; this.sb.Location = new System.Drawing.Point(115, 103); this.sb.Name = "sb"; @@ -356,7 +365,7 @@ namespace Sunny.UI // mb // this.mb.BackColor = System.Drawing.Color.Transparent; - this.mb.Font = new System.Drawing.Font("微软雅黑", 12F); + this.mb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.mb.ForeColor = System.Drawing.Color.DarkGray; this.mb.Location = new System.Drawing.Point(62, 103); this.mb.Name = "mb"; @@ -369,7 +378,7 @@ namespace Sunny.UI // hb // this.hb.BackColor = System.Drawing.Color.Transparent; - this.hb.Font = new System.Drawing.Font("微软雅黑", 12F); + this.hb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.hb.ForeColor = System.Drawing.Color.DarkGray; this.hb.Location = new System.Drawing.Point(9, 103); this.hb.Name = "hb"; @@ -414,6 +423,11 @@ namespace Sunny.UI { InitializeComponent(); this.MouseWheel += UITimeItem_MouseWheel; + Translate(); + } + + public void Translate() + { btnOK.Text = UILocalize.OK; btnCancel.Text = UILocalize.Cancel; } diff --git a/SunnyUI/Controls/DropItem/UITimeItem.resx b/SunnyUI/Controls/DropItem/UITimeItem.resx index 1af7de15..f298a7be 100644 --- a/SunnyUI/Controls/DropItem/UITimeItem.resx +++ b/SunnyUI/Controls/DropItem/UITimeItem.resx @@ -1,64 +1,4 @@ - - - + diff --git a/SunnyUI/Controls/UIColorPicker.cs b/SunnyUI/Controls/UIColorPicker.cs index 330da14f..6c453240 100644 --- a/SunnyUI/Controls/UIColorPicker.cs +++ b/SunnyUI/Controls/UIColorPicker.cs @@ -65,6 +65,7 @@ namespace Sunny.UI private void UIColorPicker_ButtonClick(object sender, EventArgs e) { item.SelectedColor = Value; + item.Translate(); ItemForm.Show(this); } diff --git a/SunnyUI/Controls/UIComboTreeView.cs b/SunnyUI/Controls/UIComboTreeView.cs index f61d08c0..c3cbc259 100644 --- a/SunnyUI/Controls/UIComboTreeView.cs +++ b/SunnyUI/Controls/UIComboTreeView.cs @@ -101,7 +101,7 @@ namespace Sunny.UI } public delegate void OnNodeSelected(object sender, TreeNode node); - public delegate void OnNodesSelected(object sender, TreeNodeCollection node); + public delegate void OnNodesSelected(object sender, TreeNodeCollection nodes); public event OnNodeSelected NodeSelected; public event OnNodesSelected NodesSelected; @@ -150,6 +150,7 @@ namespace Sunny.UI ItemForm.Size = ItemSize; item.TreeView.ExpandAll(); item.CanSelectRootNode = CanSelectRootNode; + item.Translate(); ItemForm.Show(this); } diff --git a/SunnyUI/Controls/UIDatePicker.cs b/SunnyUI/Controls/UIDatePicker.cs index 5587f03b..3308c13d 100644 --- a/SunnyUI/Controls/UIDatePicker.cs +++ b/SunnyUI/Controls/UIDatePicker.cs @@ -118,6 +118,7 @@ namespace Sunny.UI item.Date = Value; item.ShowToday = ShowToday; item.PrimaryColor = RectColor; + item.Translate(); ItemForm.Show(this); } diff --git a/SunnyUI/Controls/UIDateTimePicker.cs b/SunnyUI/Controls/UIDateTimePicker.cs index a83a08e5..545cd0d1 100644 --- a/SunnyUI/Controls/UIDateTimePicker.cs +++ b/SunnyUI/Controls/UIDateTimePicker.cs @@ -145,6 +145,7 @@ namespace Sunny.UI item.Date = Value; item.ShowToday = ShowToday; item.PrimaryColor = RectColor; + item.Translate(); ItemForm.Show(this); } diff --git a/SunnyUI/Controls/UIPagination.cs b/SunnyUI/Controls/UIPagination.cs index dfc9f65f..253c1634 100644 --- a/SunnyUI/Controls/UIPagination.cs +++ b/SunnyUI/Controls/UIPagination.cs @@ -26,6 +26,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Drawing; using System.Windows.Forms; namespace Sunny.UI @@ -120,6 +121,22 @@ namespace Sunny.UI b0.Text = UILocalize.Prev; b16.Text = UILocalize.Next; btnSelect.Text = UILocalize.SelectTitle; + + SizeF sf = b0.CreateGraphics().MeasureString(b0.Text, b0.Font); + b0.Width = b0.SymbolSize + (int)sf.Width + 10; + + sf = b16.CreateGraphics().MeasureString(b16.Text, b16.Font); + b16.Width = b16.SymbolSize + (int)sf.Width + 10; + + btnSelect.Width = (int)btnSelect.CreateGraphics().MeasureString(btnSelect.Text, btnSelect.Font).Width + 16; + + uiLabel1.Text = UILocalize.SelectPageLeft; + uiLabel2.Text = UILocalize.SelectPageRight; + edtPage.Left = uiLabel1.Right + 3; + uiLabel2.Left = edtPage.Right + 3; + btnSelect.Left = uiLabel2.Right + 3; + p1.Width = btnSelect.Right + 3; + SetShowButtons(); } private int buttonInterval = 4; @@ -544,7 +561,7 @@ namespace Sunny.UI this.b16.Location = new System.Drawing.Point(561, 3); this.b16.MinimumSize = new System.Drawing.Size(1, 1); this.b16.Name = "b16"; - this.b16.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.b16.Padding = new System.Windows.Forms.Padding(6, 0, 5, 0); this.b16.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.RightTop | Sunny.UI.UICornerRadiusSides.RightBottom))); this.b16.Size = new System.Drawing.Size(75, 29); this.b16.Symbol = 61701; @@ -751,6 +768,8 @@ namespace Sunny.UI { b0.Enabled = true; } + + b1.Left = b0.Right + buttonInterval - 1; edtPage.IntValue = activePage; if (TotalCount == 0) diff --git a/SunnyUI/Controls/UITabControl.cs b/SunnyUI/Controls/UITabControl.cs index 46bcd3e3..4556d0d7 100644 --- a/SunnyUI/Controls/UITabControl.cs +++ b/SunnyUI/Controls/UITabControl.cs @@ -735,7 +735,7 @@ namespace Sunny.UI handler?.Invoke(this, e); } - internal void RenderButton(Graphics g, Rectangle rect, Color arrowColor, ArrowDirection direction) + private static void RenderButton(Graphics g, Rectangle rect, Color arrowColor, ArrowDirection direction) { switch (direction) { @@ -834,7 +834,7 @@ namespace Sunny.UI AssignHandle(owner.UpDownButtonHandle); } - private bool LeftKeyPressed() + private static bool LeftKeyPressed() { if (SystemInformation.MouseButtonsSwapped) { diff --git a/SunnyUI/Controls/UITimePicker.cs b/SunnyUI/Controls/UITimePicker.cs index 5e8c5451..4318c1db 100644 --- a/SunnyUI/Controls/UITimePicker.cs +++ b/SunnyUI/Controls/UITimePicker.cs @@ -142,6 +142,7 @@ namespace Sunny.UI private void UITimePicker_ButtonClick(object sender, EventArgs e) { item.Time = Value; + item.Translate(); ItemForm.Show(this); } } diff --git a/SunnyUI/Forms/UIForm.cs b/SunnyUI/Forms/UIForm.cs index 685c01e6..edb019b4 100644 --- a/SunnyUI/Forms/UIForm.cs +++ b/SunnyUI/Forms/UIForm.cs @@ -367,11 +367,6 @@ namespace Sunny.UI } } - /// - /// 标题栏颜色 - /// - private Color titleColor = UIColor.Blue; - /// /// 标题栏颜色 /// @@ -1104,7 +1099,6 @@ namespace Sunny.UI rectColor = uiColor.RectColor; foreColor = UIFontColor.Primary; BackColor = uiColor.PlainColor; - titleColor = uiColor.TitleColor; titleForeColor = uiColor.TitleForeColor; Invalidate(); } diff --git a/SunnyUI/Units/ULocalize.cs b/SunnyUI/Units/ULocalize.cs index 0baa4ed7..84be13cf 100644 --- a/SunnyUI/Units/ULocalize.cs +++ b/SunnyUI/Units/ULocalize.cs @@ -103,6 +103,23 @@ namespace Sunny.UI public static string Prev = "上一页"; public static string Next = "下一页"; + public static string SelectPageLeft = "第"; + public static string SelectPageRight = "页"; + + public static string January = "一月"; + public static string February = "二月"; + public static string March = "三月"; + public static string April = "四月"; + public static string May = "五月"; + public static string June = "六月"; + public static string July = "七月"; + public static string August = "八月"; + public static string September = "九月"; + public static string October = "十月"; + public static string November = "十一月"; + public static string December = "十二月"; + + public static string Today = "今天"; } public static class UILocalizeHelper @@ -124,16 +141,33 @@ namespace Sunny.UI UILocalize.GridDataSourceException = "The data source must be DataTable or List"; UILocalize.SystemProcessing = "The system is processing, please wait..."; - UILocalize.Monday = "Mon"; - UILocalize.Tuesday = "Tue"; - UILocalize.Wednesday = "Wed"; - UILocalize.Thursday = "Thur"; - UILocalize.Friday = "Fri"; - UILocalize.Saturday = "Sat"; - UILocalize.Sunday = "Sun"; + UILocalize.Monday = "Mon."; + UILocalize.Tuesday = "Tue."; + UILocalize.Wednesday = "Wed."; + UILocalize.Thursday = "Thur."; + UILocalize.Friday = "Fri."; + UILocalize.Saturday = "Sat."; + UILocalize.Sunday = "Sun."; - UILocalize.Prev = "Prev"; + UILocalize.Prev = "Previous"; UILocalize.Next = "Next"; + UILocalize.SelectPageLeft = "Page"; + UILocalize.SelectPageRight = ""; + + UILocalize.January = "Jan."; + UILocalize.February = "Feb."; + UILocalize.March = "Mar."; + UILocalize.April = "Apr."; + UILocalize.May = "May"; + UILocalize.June = "Jun."; + UILocalize.July = "Jul."; + UILocalize.August = "Aug."; + UILocalize.September = "Sep."; + UILocalize.October = "Oct."; + UILocalize.November = "Nov."; + UILocalize.December = "Dec."; + + UILocalize.Today = "Today"; UIStyles.Translate(); } @@ -166,6 +200,24 @@ namespace Sunny.UI UILocalize.Prev = "上一页"; UILocalize.Next = "下一页"; + UILocalize.SelectPageLeft = "第"; + UILocalize.SelectPageRight = "页"; + + UILocalize.January = "一月"; + UILocalize.February = "二月"; + UILocalize.March = "三月"; + UILocalize.April = "四月"; + UILocalize.May = "五月"; + UILocalize.June = "六月"; + UILocalize.July = "七月"; + UILocalize.August = "八月"; + UILocalize.September = "九月"; + UILocalize.October = "十月"; + UILocalize.November = "十一月"; + UILocalize.December = "十二月"; + + UILocalize.Today = "今天"; + UIStyles.Translate(); } }