diff --git a/.gitignore b/.gitignore
index 539c13e..d45590a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,4 +19,4 @@ bin-release/
# Projects
/.vs
/packages
-/Properties/PublishProfiles/FolderProfile.pubxml
\ No newline at end of file
+/Properties/PublishProfiles/
diff --git a/AntdUIDemo.csproj b/AntdUIDemo.csproj
index 4171044..60621ac 100644
--- a/AntdUIDemo.csproj
+++ b/AntdUIDemo.csproj
@@ -7,8 +7,27 @@
true
false
app.manifest
+ assets\icon.ico
+ AnyCPU
+ Copyright © 2024 czz_y
+ $(Version)
+ $(Version)
+ 1.5.2.0
+ czz_y
+ 基于 Winform UI框架 AntdUI 设计的Demo
+ https://gitee.com/mubaiyanghua/antd-uidemo
+ logo.png
+ README.md
+ https://gitee.com/mubaiyanghua/antd-uidemo
+ git
+ AntdUIDemo;Winform;WinformUI;AntDesign;控件演示
+ True
+
+
+
+
diff --git a/App.config b/App.config
deleted file mode 100644
index 193aecc..0000000
--- a/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MainWindow.cs b/MainWindow.cs
index 2a1eaf1..62ef71c 100644
--- a/MainWindow.cs
+++ b/MainWindow.cs
@@ -10,6 +10,7 @@ namespace AntdUIDemo
public MainWindow()
{
InitializeComponent();
+ AntdUI.Config.ShowInWindow = true;
//加载菜单
LoadMenu();
menu.SelectChanged += Menu_SelectChanged;
@@ -58,7 +59,7 @@ namespace AntdUIDemo
control = new FloatButtonDemo(this);
break;
case "FlowPanel":
- control = new FlowPanelDemo();
+ control = new FlowPanelDemo(this);
break;
case "GridPanel":
control = new GridPanelDemo();
diff --git a/README.en.md b/README.en.md
deleted file mode 100644
index 99d1263..0000000
--- a/README.en.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# AntdUIDemo
-
-#### Description
-{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
-
-#### Software Architecture
-Software architecture description
-
-#### Installation
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### Instructions
-
-1. xxxx
-2. xxxx
-3. xxxx
-
-#### Contribution
-
-1. Fork the repository
-2. Create Feat_xxx branch
-3. Commit your code
-4. Create Pull Request
-
-
-#### Gitee Feature
-
-1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
-2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
-3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
-4. The most valuable open source project [GVP](https://gitee.com/gvp)
-5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
-6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
diff --git a/README.md b/README.md
index 5c6663e..098b2c7 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
```
1. git clone 或者直接下载本项目
-2. 使用 Visual Studio打开项目,需按照提示或自行安装 .NET Framework4.8
+2. 若电脑缩放不是100%,使用 Visual Studio 在100%缩放模式下(命令行使用 devenv /noScale 命令启动 Visual Studio)打开项目,并按照提示或自行安装 .NET Framework4.8
3. 编译运行
```
diff --git a/Views/FloatButtonDemo.Designer.cs b/Views/FloatButtonDemo.Designer.cs
index 1626275..d6cf987 100644
--- a/Views/FloatButtonDemo.Designer.cs
+++ b/Views/FloatButtonDemo.Designer.cs
@@ -502,6 +502,7 @@
//
// FloatButtonDemo
//
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.stackPanel1);
this.Name = "FloatButtonDemo";
this.Size = new System.Drawing.Size(710, 372);
diff --git a/Views/FloatButtonDemo.cs b/Views/FloatButtonDemo.cs
index 7b990c8..60795d4 100644
--- a/Views/FloatButtonDemo.cs
+++ b/Views/FloatButtonDemo.cs
@@ -107,16 +107,25 @@ namespace AntdUIDemo.Views
}, btn =>
{
//回调事件
+ AntdUI.Message.info(form, btn.Tooltip, autoClose: 1);
})
+ // 浮动全局配置
{
- // 配置
+ //字体
Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point),
+ //附着控件
Control = null,
+ //位置
Align = (TAlign)select_align.SelectedIndex,
+ //是否垂直方向
Vertical = select_vertical.SelectedIndex == 0,
+ //是否置顶
TopMost = select_topmost.SelectedIndex == 0,
+ //尺寸大小
Size = Convert.ToInt32(input_size.Value),
+ //相对于Align位置X轴偏移
MarginX = Convert.ToInt32(input_mx.Value),
+ //相对于Align位置Y轴偏移
MarginY = Convert.ToInt32(input_my.Value),
});
}
diff --git a/Views/FlowPanelDemo.Designer.cs b/Views/FlowPanelDemo.Designer.cs
index 27a52ee..14aced2 100644
--- a/Views/FlowPanelDemo.Designer.cs
+++ b/Views/FlowPanelDemo.Designer.cs
@@ -445,6 +445,7 @@
//
// FlowPanelDemo
//
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.stackPanel1);
this.Name = "FlowPanelDemo";
this.Size = new System.Drawing.Size(707, 496);
diff --git a/Views/FlowPanelDemo.cs b/Views/FlowPanelDemo.cs
index 77c39d6..3d1413d 100644
--- a/Views/FlowPanelDemo.cs
+++ b/Views/FlowPanelDemo.cs
@@ -7,8 +7,10 @@ namespace AntdUIDemo.Views
{
public partial class FlowPanelDemo : UserControl
{
- public FlowPanelDemo()
+ private AntdUI.Window form;
+ public FlowPanelDemo(Window _form)
{
+ form = _form;
InitializeComponent();
//初始化下拉框
InitSelectItems();
@@ -46,7 +48,7 @@ namespace AntdUIDemo.Views
// 添加按钮
private void buttonADD_Click(object sender, EventArgs e)
{
- flowPanel.Controls.Add(new AntdUI.Button()
+ var control = new AntdUI.Button()
{
Text = "Button",
Type = TTypeMini.Primary,
@@ -54,7 +56,9 @@ namespace AntdUIDemo.Views
Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))),
Size = new Size(90, 42),
- });
+ };
+ form.AutoDpi(control);
+ flowPanel.Controls.Add(control);
}
// 删除按钮
@@ -76,7 +80,7 @@ namespace AntdUIDemo.Views
flowPanel.Controls.Clear();
for (int i = 0; i < 14; i++)
{
- flowPanel.Controls.Add(new AntdUI.Button()
+ var control = new AntdUI.Button()
{
Text = "Button",
Type = TTypeMini.Primary,
@@ -84,7 +88,9 @@ namespace AntdUIDemo.Views
Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))),
Size = new Size(90, 42),
- });
+ };
+ form.AutoDpi(control);
+ flowPanel.Controls.Add(control);
}
}
diff --git a/assets/logo.png b/assets/logo.png
new file mode 100644
index 0000000..627fbfe
Binary files /dev/null and b/assets/logo.png differ