diff --git a/Controls/SystemSet.Designer.cs b/Controls/SystemSet.Designer.cs index 5a7ac85..b176e25 100644 --- a/Controls/SystemSet.Designer.cs +++ b/Controls/SystemSet.Designer.cs @@ -73,10 +73,11 @@ this.tabs.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); this.tabs.Gap = 12; this.tabs.Location = new System.Drawing.Point(0, 0); + this.tabs.Margin = new System.Windows.Forms.Padding(6); this.tabs.Name = "tabs"; this.tabs.Pages.Add(this.tabPage1); this.tabs.Pages.Add(this.tabPage2); - this.tabs.Size = new System.Drawing.Size(620, 420); + this.tabs.Size = new System.Drawing.Size(598, 396); this.tabs.Style = styleLine1; this.tabs.TabIndex = 0; this.tabs.Text = "tabs1"; @@ -86,9 +87,9 @@ this.tabPage1.Controls.Add(this.stackPanel1); this.tabPage1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabPage1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.tabPage1.Location = new System.Drawing.Point(87, 3); + this.tabPage1.Location = new System.Drawing.Point(90, 6); this.tabPage1.Name = "tabPage1"; - this.tabPage1.Size = new System.Drawing.Size(530, 414); + this.tabPage1.Size = new System.Drawing.Size(502, 384); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "基本设置"; // @@ -101,7 +102,7 @@ this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.stackPanel1.Location = new System.Drawing.Point(0, 0); this.stackPanel1.Name = "stackPanel1"; - this.stackPanel1.Size = new System.Drawing.Size(530, 414); + this.stackPanel1.Size = new System.Drawing.Size(502, 384); this.stackPanel1.TabIndex = 1; this.stackPanel1.Text = "stackPanel1"; this.stackPanel1.Vertical = true; @@ -112,7 +113,7 @@ this.stackPanel5.Controls.Add(this.label4); this.stackPanel5.Location = new System.Drawing.Point(3, 117); this.stackPanel5.Name = "stackPanel5"; - this.stackPanel5.Size = new System.Drawing.Size(524, 32); + this.stackPanel5.Size = new System.Drawing.Size(496, 32); this.stackPanel5.TabIndex = 3; this.stackPanel5.Text = "stackPanel5"; // @@ -144,7 +145,7 @@ this.stackPanel4.Controls.Add(this.label3); this.stackPanel4.Location = new System.Drawing.Point(3, 79); this.stackPanel4.Name = "stackPanel4"; - this.stackPanel4.Size = new System.Drawing.Size(524, 32); + this.stackPanel4.Size = new System.Drawing.Size(496, 32); this.stackPanel4.TabIndex = 2; this.stackPanel4.Text = "stackPanel4"; // @@ -177,7 +178,7 @@ this.stackPanel3.Controls.Add(this.label2); this.stackPanel3.Location = new System.Drawing.Point(3, 41); this.stackPanel3.Name = "stackPanel3"; - this.stackPanel3.Size = new System.Drawing.Size(524, 32); + this.stackPanel3.Size = new System.Drawing.Size(496, 32); this.stackPanel3.TabIndex = 1; this.stackPanel3.Text = "stackPanel3"; // @@ -210,7 +211,7 @@ this.stackPanel2.Controls.Add(this.label1); this.stackPanel2.Location = new System.Drawing.Point(3, 3); this.stackPanel2.Name = "stackPanel2"; - this.stackPanel2.Size = new System.Drawing.Size(524, 32); + this.stackPanel2.Size = new System.Drawing.Size(496, 32); this.stackPanel2.TabIndex = 0; this.stackPanel2.Text = "stackPanel2"; // @@ -324,12 +325,11 @@ // // SystemSet // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; this.Controls.Add(this.tabs); - this.Margin = new System.Windows.Forms.Padding(2); + this.Margin = new System.Windows.Forms.Padding(4); this.Name = "SystemSet"; - this.Size = new System.Drawing.Size(620, 420); + this.Size = new System.Drawing.Size(598, 396); this.tabs.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.stackPanel1.ResumeLayout(false); diff --git a/Controls/SystemSet.cs b/Controls/SystemSet.cs index d292e8c..a7c47c0 100644 --- a/Controls/SystemSet.cs +++ b/Controls/SystemSet.cs @@ -47,6 +47,8 @@ namespace AntdUIDemo.Controls { AppSetting.UpdateAppSetting("ShowInWindow", value ? "True" : "False"); AntdUI.Config.ShowInWindow = value; + AntdUI.Message.success(Window,"切换成功!",autoClose: 1); + AntdUI.Notification.success(Window, "提示","切换成功!", autoClose: 3); } private void switch_scrollbar_CheckedChanged(object sender, bool value) diff --git a/MainWindow.cs b/MainWindow.cs index 7766e8f..7118b05 100644 --- a/MainWindow.cs +++ b/MainWindow.cs @@ -93,6 +93,7 @@ namespace AntdUIDemo { using (var form = new SystemSet(this)) { + //AutoDpi(form); AntdUI.Modal.open(new AntdUI.Modal.Config(this, "系统设置", form, TType.Info) { CloseIcon = true, diff --git a/README.md b/README.md index 75a92f9..c56723e 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,14 @@ 4. 编译运行 ``` +## 系统设置 +- ✅ 支持浅色/深色模式,并且随系统自动切换 +- ✅ 支持启用/关闭动画效果 +- ✅ 支持启用/关闭阴影效果 +- ✅ 支持显示/隐藏滚动条 +- ✅ 支持设置Message/Notification消息显示位置 + +![SystemSet](assets/screenshots/SystemSet.png) ## 控件演示 diff --git a/assets/screenshots/Button.png b/assets/screenshots/Button.png index 6472d59..969c127 100644 Binary files a/assets/screenshots/Button.png and b/assets/screenshots/Button.png differ diff --git a/assets/screenshots/FloatButton.png b/assets/screenshots/FloatButton.png index 3c20a18..aa76e83 100644 Binary files a/assets/screenshots/FloatButton.png and b/assets/screenshots/FloatButton.png differ diff --git a/assets/screenshots/FlowPanel.png b/assets/screenshots/FlowPanel.png index 0695811..cd7cadf 100644 Binary files a/assets/screenshots/FlowPanel.png and b/assets/screenshots/FlowPanel.png differ diff --git a/assets/screenshots/GridPanel.png b/assets/screenshots/GridPanel.png index 152afe7..1ab07fd 100644 Binary files a/assets/screenshots/GridPanel.png and b/assets/screenshots/GridPanel.png differ diff --git a/assets/screenshots/Panel.png b/assets/screenshots/Panel.png index eed8970..12aa160 100644 Binary files a/assets/screenshots/Panel.png and b/assets/screenshots/Panel.png differ diff --git a/assets/screenshots/StackPanel.png b/assets/screenshots/StackPanel.png index 94dbcc6..d4d1a75 100644 Binary files a/assets/screenshots/StackPanel.png and b/assets/screenshots/StackPanel.png differ diff --git a/assets/screenshots/SystemSet.png b/assets/screenshots/SystemSet.png new file mode 100644 index 0000000..4483a12 Binary files /dev/null and b/assets/screenshots/SystemSet.png differ