diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index bb4d4cac..caf6c5bb 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 06a23df0..67eb9186 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 3c347e9a..b24ebf7b 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 7112f688..f808463e 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 a2c0ddeb..9a688804 100644 Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ diff --git a/SunnyUI/Controls/UIPagination.cs b/SunnyUI/Controls/UIPagination.cs index e0c7ac13..dfc9f65f 100644 --- a/SunnyUI/Controls/UIPagination.cs +++ b/SunnyUI/Controls/UIPagination.cs @@ -30,7 +30,7 @@ using System.Windows.Forms; namespace Sunny.UI { - public class UIPagination : UIPanel + public class UIPagination : UIPanel, ITranslate { public delegate void OnPageChangeEventHandler(object sender, object pagingSource, int pageIndex, int count); @@ -111,6 +111,15 @@ namespace Sunny.UI buttons[i].MouseLeave += UIDataGridPage_MouseLeave; buttons[i].Click += UIDataGridPage_Click; } + + Translate(); + } + + public void Translate() + { + b0.Text = UILocalize.Prev; + b16.Text = UILocalize.Next; + btnSelect.Text = UILocalize.SelectTitle; } private int buttonInterval = 4; @@ -313,13 +322,14 @@ namespace Sunny.UI this.cb1 = new Sunny.UI.UIComboBox(); this.p1.SuspendLayout(); this.SuspendLayout(); - // + // // b0 - // + // this.b0.Cursor = System.Windows.Forms.Cursors.Hand; - this.b0.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.b0.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b0.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.b0.Location = new System.Drawing.Point(3, 3); + this.b0.MinimumSize = new System.Drawing.Size(1, 1); this.b0.Name = "b0"; this.b0.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0); this.b0.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.LeftTop | Sunny.UI.UICornerRadiusSides.LeftBottom))); @@ -330,193 +340,209 @@ namespace Sunny.UI this.b0.TagString = "<"; this.b0.Text = "上一页"; this.b0.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // + // // b1 - // + // this.b1.Cursor = System.Windows.Forms.Cursors.Hand; - 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.Location = new System.Drawing.Point(81, 3); + this.b1.MinimumSize = new System.Drawing.Size(1, 1); this.b1.Name = "b1"; this.b1.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b1.Size = new System.Drawing.Size(29, 29); this.b1.Symbol = 0; this.b1.TabIndex = 1; this.b1.Text = "0"; - // + // // b3 - // + // this.b3.Cursor = System.Windows.Forms.Cursors.Hand; - 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.Location = new System.Drawing.Point(145, 3); + this.b3.MinimumSize = new System.Drawing.Size(1, 1); this.b3.Name = "b3"; this.b3.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b3.Size = new System.Drawing.Size(29, 29); this.b3.Symbol = 0; this.b3.TabIndex = 3; this.b3.Text = "0"; - // + // // b2 - // + // this.b2.Cursor = System.Windows.Forms.Cursors.Hand; - 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.Location = new System.Drawing.Point(113, 3); + this.b2.MinimumSize = new System.Drawing.Size(1, 1); this.b2.Name = "b2"; this.b2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b2.Size = new System.Drawing.Size(29, 29); this.b2.Symbol = 0; this.b2.TabIndex = 2; this.b2.Text = "0"; - // + // // b7 - // + // this.b7.Cursor = System.Windows.Forms.Cursors.Hand; - this.b7.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b7.Location = new System.Drawing.Point(273, 3); + this.b7.MinimumSize = new System.Drawing.Size(1, 1); this.b7.Name = "b7"; this.b7.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b7.Size = new System.Drawing.Size(29, 29); this.b7.Symbol = 0; this.b7.TabIndex = 7; this.b7.Text = "0"; - // + // // b6 - // + // this.b6.Cursor = System.Windows.Forms.Cursors.Hand; - this.b6.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b6.Location = new System.Drawing.Point(241, 3); + this.b6.MinimumSize = new System.Drawing.Size(1, 1); this.b6.Name = "b6"; this.b6.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b6.Size = new System.Drawing.Size(29, 29); this.b6.Symbol = 0; this.b6.TabIndex = 6; this.b6.Text = "0"; - // + // // b5 - // + // this.b5.Cursor = System.Windows.Forms.Cursors.Hand; - this.b5.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b5.Location = new System.Drawing.Point(209, 3); + this.b5.MinimumSize = new System.Drawing.Size(1, 1); this.b5.Name = "b5"; this.b5.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b5.Size = new System.Drawing.Size(29, 29); this.b5.Symbol = 0; this.b5.TabIndex = 5; this.b5.Text = "0"; - // + // // b4 - // + // this.b4.Cursor = System.Windows.Forms.Cursors.Hand; - 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.Location = new System.Drawing.Point(177, 3); + this.b4.MinimumSize = new System.Drawing.Size(1, 1); this.b4.Name = "b4"; this.b4.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b4.Size = new System.Drawing.Size(29, 29); this.b4.Symbol = 0; this.b4.TabIndex = 4; this.b4.Text = "0"; - // + // // b15 - // + // this.b15.Cursor = System.Windows.Forms.Cursors.Hand; - this.b15.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b15.Location = new System.Drawing.Point(529, 3); + this.b15.MinimumSize = new System.Drawing.Size(1, 1); this.b15.Name = "b15"; this.b15.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b15.Size = new System.Drawing.Size(29, 29); this.b15.Symbol = 0; this.b15.TabIndex = 15; this.b15.Text = "0"; - // + // // b14 - // + // this.b14.Cursor = System.Windows.Forms.Cursors.Hand; - this.b14.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b14.Location = new System.Drawing.Point(497, 3); + this.b14.MinimumSize = new System.Drawing.Size(1, 1); this.b14.Name = "b14"; this.b14.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b14.Size = new System.Drawing.Size(29, 29); this.b14.Symbol = 0; this.b14.TabIndex = 14; this.b14.Text = "0"; - // + // // b13 - // + // this.b13.Cursor = System.Windows.Forms.Cursors.Hand; - this.b13.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b13.Location = new System.Drawing.Point(465, 3); + this.b13.MinimumSize = new System.Drawing.Size(1, 1); this.b13.Name = "b13"; this.b13.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b13.Size = new System.Drawing.Size(29, 29); this.b13.Symbol = 0; this.b13.TabIndex = 13; this.b13.Text = "0"; - // + // // b12 - // + // this.b12.Cursor = System.Windows.Forms.Cursors.Hand; - this.b12.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b12.Location = new System.Drawing.Point(433, 3); + this.b12.MinimumSize = new System.Drawing.Size(1, 1); this.b12.Name = "b12"; this.b12.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b12.Size = new System.Drawing.Size(29, 29); this.b12.Symbol = 0; this.b12.TabIndex = 12; this.b12.Text = "0"; - // + // // b11 - // + // this.b11.Cursor = System.Windows.Forms.Cursors.Hand; - this.b11.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b11.Location = new System.Drawing.Point(401, 3); + this.b11.MinimumSize = new System.Drawing.Size(1, 1); this.b11.Name = "b11"; this.b11.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b11.Size = new System.Drawing.Size(29, 29); this.b11.Symbol = 0; this.b11.TabIndex = 11; this.b11.Text = "0"; - // + // // b10 - // + // this.b10.Cursor = System.Windows.Forms.Cursors.Hand; - this.b10.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b10.Location = new System.Drawing.Point(369, 3); + this.b10.MinimumSize = new System.Drawing.Size(1, 1); this.b10.Name = "b10"; this.b10.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b10.Size = new System.Drawing.Size(29, 29); this.b10.Symbol = 0; this.b10.TabIndex = 10; this.b10.Text = "0"; - // + // // b9 - // + // this.b9.Cursor = System.Windows.Forms.Cursors.Hand; - this.b9.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b9.Location = new System.Drawing.Point(337, 3); + this.b9.MinimumSize = new System.Drawing.Size(1, 1); this.b9.Name = "b9"; this.b9.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b9.Size = new System.Drawing.Size(29, 29); this.b9.Symbol = 0; this.b9.TabIndex = 9; this.b9.Text = "0"; - // + // // b8 - // + // this.b8.Cursor = System.Windows.Forms.Cursors.Hand; - this.b8.Font = new System.Drawing.Font("微软雅黑", 12F); + this.b8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b8.Location = new System.Drawing.Point(305, 3); + this.b8.MinimumSize = new System.Drawing.Size(1, 1); this.b8.Name = "b8"; this.b8.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.b8.Size = new System.Drawing.Size(29, 29); this.b8.Symbol = 0; this.b8.TabIndex = 8; this.b8.Text = "0"; - // + // // b16 - // + // this.b16.Cursor = System.Windows.Forms.Cursors.Hand; - this.b16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.b16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.b16.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; 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.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.RightTop | Sunny.UI.UICornerRadiusSides.RightBottom))); @@ -528,35 +554,39 @@ namespace Sunny.UI this.b16.Text = "下一页"; this.b16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.b16.LocationChanged += new System.EventHandler(this.b16_LocationChanged); - // + // // p1 - // + // this.p1.Controls.Add(this.edtPage); this.p1.Controls.Add(this.btnSelect); this.p1.Controls.Add(this.uiLabel2); this.p1.Controls.Add(this.uiLabel1); - 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(727, 3); 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.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; this.p1.Size = new System.Drawing.Size(176, 29); this.p1.TabIndex = 17; this.p1.Text = null; + this.p1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.p1.LocationChanged += new System.EventHandler(this.p1_LocationChanged); - // + // // edtPage - // + // this.edtPage.Cursor = System.Windows.Forms.Cursors.IBeam; this.edtPage.DoubleValue = 10D; this.edtPage.FillColor = System.Drawing.Color.White; - this.edtPage.Font = new System.Drawing.Font("微软雅黑", 12F); + this.edtPage.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.edtPage.HasMinimum = true; this.edtPage.IntValue = 10; this.edtPage.Location = new System.Drawing.Point(28, 0); this.edtPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.edtPage.Maximum = 2147483647D; this.edtPage.Minimum = 1D; + this.edtPage.MinimumEnabled = true; + this.edtPage.MinimumSize = new System.Drawing.Size(1, 1); this.edtPage.Name = "edtPage"; this.edtPage.Padding = new System.Windows.Forms.Padding(5); this.edtPage.Size = new System.Drawing.Size(53, 29); @@ -564,48 +594,50 @@ namespace Sunny.UI this.edtPage.Text = "10"; this.edtPage.TextAlignment = System.Drawing.ContentAlignment.BottomCenter; this.edtPage.Type = Sunny.UI.UITextBox.UIEditType.Integer; - // + // // btnSelect - // + // this.btnSelect.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSelect.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSelect.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.btnSelect.Location = new System.Drawing.Point(111, 0); + this.btnSelect.MinimumSize = new System.Drawing.Size(1, 1); this.btnSelect.Name = "btnSelect"; this.btnSelect.Size = new System.Drawing.Size(61, 29); this.btnSelect.Symbol = 0; this.btnSelect.TabIndex = 3; this.btnSelect.Text = "确定"; this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click); - // + // // uiLabel2 - // + // this.uiLabel2.AutoSize = true; this.uiLabel2.BackColor = System.Drawing.Color.Transparent; - this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiLabel2.Location = new System.Drawing.Point(81, 4); this.uiLabel2.Name = "uiLabel2"; this.uiLabel2.Size = new System.Drawing.Size(23, 20); this.uiLabel2.TabIndex = 2; this.uiLabel2.Text = "页"; this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // + // // uiLabel1 - // + // this.uiLabel1.AutoSize = true; this.uiLabel1.BackColor = System.Drawing.Color.Transparent; - this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.uiLabel1.Location = new System.Drawing.Point(5, 4); this.uiLabel1.Name = "uiLabel1"; this.uiLabel1.Size = new System.Drawing.Size(23, 20); this.uiLabel1.TabIndex = 0; this.uiLabel1.Text = "第"; this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // + // // cb1 - // + // + this.cb1.DataSource = null; this.cb1.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList; this.cb1.FillColor = System.Drawing.Color.White; - this.cb1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.cb1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); this.cb1.Items.AddRange(new object[] { "20条/页", "50条/页", @@ -615,14 +647,14 @@ namespace Sunny.UI this.cb1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cb1.MinimumSize = new System.Drawing.Size(63, 0); this.cb1.Name = "cb1"; - this.cb1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 0); + this.cb1.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2); this.cb1.Size = new System.Drawing.Size(103, 29); this.cb1.TabIndex = 19; this.cb1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; this.cb1.Visible = false; - // + // // UIPagination - // + // this.Controls.Add(this.cb1); this.Controls.Add(this.p1); this.Controls.Add(this.b16); @@ -648,6 +680,7 @@ namespace Sunny.UI this.p1.ResumeLayout(false); this.p1.PerformLayout(); this.ResumeLayout(false); + } #endregion InitializeComponent diff --git a/SunnyUI/Controls/UIPagination.resx b/SunnyUI/Controls/UIPagination.resx index 1af7de15..f298a7be 100644 --- a/SunnyUI/Controls/UIPagination.resx +++ b/SunnyUI/Controls/UIPagination.resx @@ -1,64 +1,4 @@ - - - + diff --git a/SunnyUI/Forms/UIForm.cs b/SunnyUI/Forms/UIForm.cs index e3ff5702..685c01e6 100644 --- a/SunnyUI/Forms/UIForm.cs +++ b/SunnyUI/Forms/UIForm.cs @@ -36,7 +36,7 @@ using System.Windows.Forms; namespace Sunny.UI { - public partial class UIForm : Form, IStyleInterface + public partial class UIForm : Form, IStyleInterface, ITranslate { private readonly UIButton btn = new UIButton(); @@ -67,6 +67,18 @@ namespace Sunny.UI showTitleIcon = false; } + public void Translate() + { + List controls = this.GetTranslateControls("ITranslate"); + foreach (var control in controls) + { + if (control is ITranslate item) + { + item.Translate(); + } + } + } + [DefaultValue(false)] [Description("允许在标题栏放置控件"), Category("SunnyUI")] public bool AllowAddControlOnTitle diff --git a/SunnyUI/Style/UIStyle.cs b/SunnyUI/Style/UIStyle.cs index 55af6379..e20b3eb4 100644 --- a/SunnyUI/Style/UIStyle.cs +++ b/SunnyUI/Style/UIStyle.cs @@ -505,6 +505,14 @@ namespace Sunny.UI page.Style = style; } } + + public static void Translate() + { + foreach (var form in Forms.Values) + { + form.Translate(); + } + } } /// @@ -798,6 +806,26 @@ namespace Sunny.UI return values; } + public static List GetTranslateControls(this Control ctrl, string interfaceName) + { + List values = new List(); + + foreach (Control obj in ctrl.Controls) + { + if (obj.GetType().GetInterface(interfaceName) != null) + { + values.Add(obj); + } + + if (obj.Controls.Count > 0) + { + values.AddRange(obj.GetTranslateControls(interfaceName)); + } + } + + return values; + } + public static void SetRawControlStyle(ControlEventArgs e, UIStyle style) { if (e.Control is TableLayoutPanel) diff --git a/SunnyUI/SunnyUI.csproj b/SunnyUI/SunnyUI.csproj index afdc59a8..d42527d0 100644 --- a/SunnyUI/SunnyUI.csproj +++ b/SunnyUI/SunnyUI.csproj @@ -43,6 +43,8 @@ + + diff --git a/SunnyUI/Units/ULocalize.cs b/SunnyUI/Units/ULocalize.cs index 7f6d9f80..0baa4ed7 100644 --- a/SunnyUI/Units/ULocalize.cs +++ b/SunnyUI/Units/ULocalize.cs @@ -92,6 +92,17 @@ namespace Sunny.UI /// "系统正在处理中,请稍候..." /// public static string SystemProcessing = "系统正在处理中,请稍候..."; + + public static string Monday = "一"; + public static string Tuesday = "二"; + public static string Wednesday = "三"; + public static string Thursday = "四"; + public static string Friday = "五"; + public static string Saturday = "六"; + public static string Sunday = "日"; + + public static string Prev = "上一页"; + public static string Next = "下一页"; } public static class UILocalizeHelper @@ -112,6 +123,19 @@ namespace Sunny.UI UILocalize.GridDataLoading = "Data loading, please wait..."; 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.Prev = "Prev"; + UILocalize.Next = "Next"; + + UIStyles.Translate(); } public static void SetCH() @@ -130,6 +154,19 @@ namespace Sunny.UI UILocalize.GridDataLoading = "数据加载中,请稍候..."; UILocalize.GridDataSourceException = "数据源必须为DataTable或者List"; UILocalize.SystemProcessing = "系统正在处理中,请稍候..."; + + UILocalize.Monday = "一"; + UILocalize.Tuesday = "二"; + UILocalize.Wednesday = "三"; + UILocalize.Thursday = "四"; + UILocalize.Friday = "五"; + UILocalize.Saturday = "六"; + UILocalize.Sunday = "日"; + + UILocalize.Prev = "上一页"; + UILocalize.Next = "下一页"; + + UIStyles.Translate(); } } } \ No newline at end of file diff --git a/SunnyUI/Units/UTranslate.cs b/SunnyUI/Units/UTranslate.cs new file mode 100644 index 00000000..725de874 --- /dev/null +++ b/SunnyUI/Units/UTranslate.cs @@ -0,0 +1,7 @@ +namespace Sunny.UI +{ + public interface ITranslate + { + void Translate(); + } +}