diff --git a/SunnyUI.Demo/Bin/SunnyUI.Common.dll b/SunnyUI.Demo/Bin/SunnyUI.Common.dll index ce14dd65..186dee36 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.Common.dll and b/SunnyUI.Demo/Bin/SunnyUI.Common.dll differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe index 8a6d8908..ca107e2b 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.Demo.exe and b/SunnyUI.Demo/Bin/SunnyUI.Demo.exe differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.dll b/SunnyUI.Demo/Bin/SunnyUI.dll index 35b62e9d..f45f9c01 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.dll and b/SunnyUI.Demo/Bin/SunnyUI.dll differ diff --git a/SunnyUI.Demo/FMain.Designer.cs b/SunnyUI.Demo/FMain.Designer.cs index cd0854fc..c7b4dc24 100644 --- a/SunnyUI.Demo/FMain.Designer.cs +++ b/SunnyUI.Demo/FMain.Designer.cs @@ -39,8 +39,13 @@ this.uiPanel1 = new Sunny.UI.UIPanel(); this.uiNavMenu1 = new Sunny.UI.UINavMenu(); this.uiTabControl1 = new Sunny.UI.UITabControl(); + this.uiPanel2 = new Sunny.UI.UIPanel(); + this.uiPanel3 = new Sunny.UI.UIPanel(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.uiPanel4 = new Sunny.UI.UIPanel(); this.uiContextMenuStrip1.SuspendLayout(); this.uiNavBar1.SuspendLayout(); + this.uiPanel1.SuspendLayout(); this.SuspendLayout(); // // uiContextMenuStrip1 @@ -116,6 +121,9 @@ // // uiPanel1 // + this.uiPanel1.Controls.Add(this.uiPanel4); + this.uiPanel1.Controls.Add(this.uiPanel3); + this.uiPanel1.Controls.Add(this.uiPanel2); this.uiPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.uiPanel1.Location = new System.Drawing.Point(2, 734); @@ -162,6 +170,52 @@ this.uiTabControl1.TabVisible = false; this.uiTabControl1.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); // + // uiPanel2 + // + this.uiPanel2.Dock = System.Windows.Forms.DockStyle.Left; + this.uiPanel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.uiPanel2.Location = new System.Drawing.Point(0, 0); + this.uiPanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.uiPanel2.MinimumSize = new System.Drawing.Size(1, 1); + this.uiPanel2.Name = "uiPanel2"; + this.uiPanel2.RadiusSides = Sunny.UI.UICornerRadiusSides.None; + this.uiPanel2.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Top | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right))); + this.uiPanel2.Size = new System.Drawing.Size(286, 32); + this.uiPanel2.TabIndex = 0; + this.uiPanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; + // + // uiPanel3 + // + this.uiPanel3.Dock = System.Windows.Forms.DockStyle.Right; + this.uiPanel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.uiPanel3.Location = new System.Drawing.Point(810, 0); + this.uiPanel3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.uiPanel3.MinimumSize = new System.Drawing.Size(1, 1); + this.uiPanel3.Name = "uiPanel3"; + this.uiPanel3.RadiusSides = Sunny.UI.UICornerRadiusSides.None; + this.uiPanel3.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top))); + this.uiPanel3.Size = new System.Drawing.Size(286, 32); + this.uiPanel3.TabIndex = 1; + this.uiPanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; + // + // timer1 + // + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // uiPanel4 + // + this.uiPanel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.uiPanel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.uiPanel4.Location = new System.Drawing.Point(286, 0); + this.uiPanel4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.uiPanel4.MinimumSize = new System.Drawing.Size(1, 1); + this.uiPanel4.Name = "uiPanel4"; + this.uiPanel4.RadiusSides = Sunny.UI.UICornerRadiusSides.None; + this.uiPanel4.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Top; + this.uiPanel4.Size = new System.Drawing.Size(524, 32); + this.uiPanel4.TabIndex = 2; + this.uiPanel4.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; + // // FMain // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -184,6 +238,7 @@ this.ReceiveParams += new Sunny.UI.OnReceiveParams(this.Form1_ReceiveParams); this.uiContextMenuStrip1.ResumeLayout(false); this.uiNavBar1.ResumeLayout(false); + this.uiPanel1.ResumeLayout(false); this.ResumeLayout(false); } @@ -200,5 +255,9 @@ private UITabControl uiTabControl1; private UILogo uiLogo1; private UIAvatar uiAvatar1; + private UIPanel uiPanel2; + private UIPanel uiPanel3; + private System.Windows.Forms.Timer timer1; + private UIPanel uiPanel4; } } \ No newline at end of file diff --git a/SunnyUI.Demo/FMain.cs b/SunnyUI.Demo/FMain.cs index 75c0dfea..165c1417 100644 --- a/SunnyUI.Demo/FMain.cs +++ b/SunnyUI.Demo/FMain.cs @@ -80,6 +80,7 @@ namespace Sunny.UI.Demo uiNavMenu1.CreateChildNode(parent, AddPage(CreateInstance("Sunny.UI.Demo.FMeter"))); uiNavMenu1.CreateChildNode(parent, AddPage(CreateInstance("Sunny.UI.Demo.FLed"))); uiNavMenu1.CreateChildNode(parent, AddPage(CreateInstance("Sunny.UI.Demo.FLight"))); + uiNavMenu1.CreateChildNode(parent, AddPage(CreateInstance("Sunny.UI.Demo.FSwitch"))); uiNavBar1.SetNodeSymbol(uiNavBar1.Nodes[4], 61502); var styles = UIStyles.PopularStyles(); @@ -99,7 +100,7 @@ namespace Sunny.UI.Demo //选中第一个节点 uiNavMenu1.SelectPage(1002); - Text = Version; + uiPanel2.Text = Text = Version; RegisterHotKey(UI.ModifierKeys.Shift, Keys.F8); //根据页面类型获取页面 @@ -111,6 +112,8 @@ namespace Sunny.UI.Demo UIPage page1 = GetPage(1002); if (page1 != null) page1.Text.WriteConsole(); + + timer1.Start(); } /// @@ -172,5 +175,10 @@ namespace Sunny.UI.Demo Text = e.Value.ToString(); SendParamToPage(1001, "传值给页面"); } + + private void timer1_Tick(object sender, EventArgs e) + { + uiPanel3.Text = DateTime.Now.DateTimeString(); + } } } diff --git a/SunnyUI.Demo/FMain.resx b/SunnyUI.Demo/FMain.resx index e7ad89d4..20807694 100644 --- a/SunnyUI.Demo/FMain.resx +++ b/SunnyUI.Demo/FMain.resx @@ -123,4 +123,7 @@ 506, 17 + + 639, 17 + \ No newline at end of file diff --git a/SunnyUI.Demo/Industrial/FSwitch.Designer.cs b/SunnyUI.Demo/Industrial/FSwitch.Designer.cs new file mode 100644 index 00000000..0e3a3b77 --- /dev/null +++ b/SunnyUI.Demo/Industrial/FSwitch.Designer.cs @@ -0,0 +1,96 @@ +namespace Sunny.UI.Demo +{ + partial class FSwitch + { + /// + /// 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() + { + this.uiLine1 = new Sunny.UI.UILine(); + this.uiTurnSwitch1 = new Sunny.UI.UITurnSwitch(); + this.uiTurnSwitch2 = new Sunny.UI.UITurnSwitch(); + this.SuspendLayout(); + // + // uiLine1 + // + this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiLine1.Location = new System.Drawing.Point(30, 55); + this.uiLine1.MinimumSize = new System.Drawing.Size(16, 16); + this.uiLine1.Name = "uiLine1"; + this.uiLine1.Size = new System.Drawing.Size(670, 20); + this.uiLine1.TabIndex = 78; + this.uiLine1.Text = "UITurnSwitch"; + this.uiLine1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // uiTurnSwitch1 + // + this.uiTurnSwitch1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.uiTurnSwitch1.Location = new System.Drawing.Point(33, 96); + this.uiTurnSwitch1.MinimumSize = new System.Drawing.Size(1, 1); + this.uiTurnSwitch1.Name = "uiTurnSwitch1"; + this.uiTurnSwitch1.Size = new System.Drawing.Size(160, 160); + this.uiTurnSwitch1.TabIndex = 79; + this.uiTurnSwitch1.Text = "uiTurnSwitch1"; + this.uiTurnSwitch1.ValueChanged += new Sunny.UI.UITurnSwitch.OnValueChanged(this.uiTurnSwitch1_ValueChanged); + // + // uiTurnSwitch2 + // + this.uiTurnSwitch2.ActiveAngle = 0; + this.uiTurnSwitch2.BackInnerSize = 60; + this.uiTurnSwitch2.BackSize = 80; + this.uiTurnSwitch2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.uiTurnSwitch2.InActiveAngle = 90; + this.uiTurnSwitch2.InActiveColor = System.Drawing.Color.Fuchsia; + this.uiTurnSwitch2.Location = new System.Drawing.Point(216, 96); + this.uiTurnSwitch2.MinimumSize = new System.Drawing.Size(1, 1); + this.uiTurnSwitch2.Name = "uiTurnSwitch2"; + this.uiTurnSwitch2.Size = new System.Drawing.Size(160, 160); + this.uiTurnSwitch2.TabIndex = 80; + this.uiTurnSwitch2.Text = "uiTurnSwitch2"; + // + // FSwitch + // + this.AllowShowTitle = true; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.uiTurnSwitch2); + this.Controls.Add(this.uiTurnSwitch1); + this.Controls.Add(this.uiLine1); + this.Name = "FSwitch"; + this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0); + this.ShowTitle = true; + this.Symbol = 361956; + this.Text = "Switch"; + this.ResumeLayout(false); + + } + + #endregion + + private UILine uiLine1; + private UITurnSwitch uiTurnSwitch1; + private UITurnSwitch uiTurnSwitch2; + } +} \ No newline at end of file diff --git a/SunnyUI.Demo/Industrial/FSwitch.cs b/SunnyUI.Demo/Industrial/FSwitch.cs new file mode 100644 index 00000000..e7696047 --- /dev/null +++ b/SunnyUI.Demo/Industrial/FSwitch.cs @@ -0,0 +1,15 @@ +namespace Sunny.UI.Demo +{ + public partial class FSwitch : UIPage + { + public FSwitch() + { + InitializeComponent(); + } + + private void uiTurnSwitch1_ValueChanged(object sender, bool value) + { + ShowInfoTip(value.ToString()); + } + } +} diff --git a/SunnyUI.Demo/Industrial/FSwitch.resx b/SunnyUI.Demo/Industrial/FSwitch.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/SunnyUI.Demo/Industrial/FSwitch.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/SunnyUI.Demo/SunnyUI.Demo.csproj b/SunnyUI.Demo/SunnyUI.Demo.csproj index 6b7d0afd..d4c65616 100644 --- a/SunnyUI.Demo/SunnyUI.Demo.csproj +++ b/SunnyUI.Demo/SunnyUI.Demo.csproj @@ -41,11 +41,11 @@ app.manifest - - ..\packages\SunnyUI.3.3.9\lib\net472\SunnyUI.dll + + ..\packages\SunnyUI.3.4.0\lib\net472\SunnyUI.dll - - ..\packages\SunnyUI.Common.3.3.9\lib\net472\SunnyUI.Common.dll + + ..\packages\SunnyUI.Common.3.4.0\lib\net472\SunnyUI.Common.dll @@ -139,6 +139,12 @@ FCustomMain.cs + + Form + + + FSwitch.cs + Form @@ -526,6 +532,9 @@ FOther.cs + + FSwitch.cs + ResXFileCodeGenerator Resources.Designer.cs diff --git a/SunnyUI.Demo/packages.config b/SunnyUI.Demo/packages.config index 67cb293a..f9c8c98a 100644 --- a/SunnyUI.Demo/packages.config +++ b/SunnyUI.Demo/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/SunnyUI/SunnyUI.csproj b/SunnyUI/SunnyUI.csproj index 86fed700..69ac33f0 100644 --- a/SunnyUI/SunnyUI.csproj +++ b/SunnyUI/SunnyUI.csproj @@ -9,7 +9,7 @@ SunnyUI.Net 是基于.Net Framework 4.0~4.8、.Net6、.Net7 框架的 C# WinForm 开源控件库、工具类库、扩展类库、多页面开发框架。 CopyRight © SunnyUI.Net 2012-2023 GPL-3.0-only - 3.3.9.0 + 3.4.0.0 ShenYonghua SunnyUI.Net SunnyUI @@ -77,7 +77,7 @@ - +