添加Notification Progress
This commit is contained in:
parent
dd6e8daa51
commit
839e85a44c
@ -14,7 +14,7 @@
|
|||||||
<Copyright>Copyright © 2024 czz_y</Copyright>
|
<Copyright>Copyright © 2024 czz_y</Copyright>
|
||||||
<FileVersion>$(Version)</FileVersion>
|
<FileVersion>$(Version)</FileVersion>
|
||||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||||
<Version>1.5.7</Version>
|
<Version>1.5.8</Version>
|
||||||
<Authors>czz_y</Authors>
|
<Authors>czz_y</Authors>
|
||||||
<Description>基于 Winform UI框架 AntdUI 设计的Demo</Description>
|
<Description>基于 Winform UI框架 AntdUI 设计的Demo</Description>
|
||||||
<PackageProjectUrl>https://gitee.com/mubaiyanghua/antd-uidemo</PackageProjectUrl>
|
<PackageProjectUrl>https://gitee.com/mubaiyanghua/antd-uidemo</PackageProjectUrl>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AntdUI" Version="1.5.7" />
|
<PackageReference Include="AntdUI" Version="1.5.8" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="NLog" Version="5.3.3" />
|
<PackageReference Include="NLog" Version="5.3.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@ -280,6 +280,14 @@ namespace AntdUIDemo
|
|||||||
case "Modal":
|
case "Modal":
|
||||||
control = new ModalDemo(this);
|
control = new ModalDemo(this);
|
||||||
break;
|
break;
|
||||||
|
case "Notification":
|
||||||
|
control = new NotificationDemo(this);
|
||||||
|
break;
|
||||||
|
case "Progress":
|
||||||
|
control = new ProgressDemo();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (control != null)
|
if (control != null)
|
||||||
{
|
{
|
||||||
|
|||||||
101
README.md
101
README.md
@ -1,14 +1,12 @@
|
|||||||
# AntdUIDemo
|
# AntdUIDemo
|
||||||
|
|
||||||
本项目基于 Winform .NET Framework 4.8 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.5.7`
|
本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.5.8`
|
||||||
|
|
||||||
## ✅ 快速开始
|
## ✅ 快速开始
|
||||||
```
|
```
|
||||||
1. git clone 或者直接下载本项目
|
1. git clone 或者直接下载本项目
|
||||||
|
|
||||||
2. 若电脑屏幕分辨率不是 1920×1080(1080P) 或者缩放不是 100%
|
2. 使用 Visual Studio 打开本项目
|
||||||
使用 Visual Studio 在 100% 缩放模式下(使用 devenv /noScale 命令启动 Visual Studio)打开项目,
|
|
||||||
或者在项目窗口选择使用 100% 缩放比例重新启动 Visual Studio
|
|
||||||
|
|
||||||
3. 若电脑没有安装 .NET Framework 4.8,编辑项目文件设置 TargetFramework 属性为自己安装的目标框架,兼容框架参照 AntdUI 项目
|
3. 若电脑没有安装 .NET Framework 4.8,编辑项目文件设置 TargetFramework 属性为自己安装的目标框架,兼容框架参照 AntdUI 项目
|
||||||
|
|
||||||
@ -16,11 +14,12 @@
|
|||||||
```
|
```
|
||||||
## ⚠️ 注意事项
|
## ⚠️ 注意事项
|
||||||
- 电脑屏幕分辨率低于 1920×1080(1080P) 请使用大于等于 1080P 分辨率的屏幕开发
|
- 电脑屏幕分辨率低于 1920×1080(1080P) 请使用大于等于 1080P 分辨率的屏幕开发
|
||||||
- 电脑屏幕分辨率大于 1080P 或者缩放不是 100% 的,务必选择以下 **任一方式** 运行项目
|
- 电脑屏幕分辨率大于 1080P 或者缩放不是 100% 的,务必选择以下任一方式打开项目:
|
||||||
1. 按照上述 **快速开始** 的第二条打开项目,详细原因见 [解决 Visual Studio 中 Windows 窗体设计器的 HDPI/缩放问题](https://learn.microsoft.com/zh-cn/visualstudio/designers/disable-dpi-awareness?view=vs-2022) ,如下所示
|
1. 使用 `devenv /noScale` 命令启动 Visual Studio并点击`文件-打开-项目/解决方案`,详细原因见 [解决 Visual Studio 中 Windows 窗体设计器的 HDPI/缩放问题](https://learn.microsoft.com/zh-cn/visualstudio/designers/disable-dpi-awareness?view=vs-2022) ,如下所示
|
||||||

|

|
||||||
|

|
||||||
2. 直接打开项目,在窗口页面提示点击 **使用 100% 缩放比例重新启动 Visual Studio**,如下所示
|
2. 直接打开项目,在窗口页面提示点击 **使用 100% 缩放比例重新启动 Visual Studio**,如下所示
|
||||||

|

|
||||||
|
|
||||||
## 系统设置
|
## 系统设置
|
||||||
- ✅ 支持浅色/深色模式,并且随系统自动切换
|
- ✅ 支持浅色/深色模式,并且随系统自动切换
|
||||||
@ -29,106 +28,108 @@
|
|||||||
- ✅ 支持显示/隐藏滚动条
|
- ✅ 支持显示/隐藏滚动条
|
||||||
- ✅ 支持设置 Message/Notification 消息显示位置
|
- ✅ 支持设置 Message/Notification 消息显示位置
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 控件演示
|
## 控件演示
|
||||||
|
|
||||||
### 通用
|
### 通用
|
||||||
#### Button 按钮
|
#### Button 按钮
|
||||||

|

|
||||||
#### FloatButton 悬浮按钮
|
#### FloatButton 悬浮按钮
|
||||||

|

|
||||||
|
|
||||||
### 布局
|
### 布局
|
||||||
#### FlowPanel 流动布局
|
#### FlowPanel 流动布局
|
||||||

|

|
||||||
#### GridPanel 网格布局
|
#### GridPanel 网格布局
|
||||||

|

|
||||||
#### Panel 面板
|
#### Panel 面板
|
||||||

|

|
||||||
#### StackPanel 堆叠布局
|
#### StackPanel 堆叠布局
|
||||||

|

|
||||||
#### VirtualPanel 虚拟布局
|
#### VirtualPanel 虚拟布局
|
||||||
|
|
||||||
### 导航
|
### 导航
|
||||||
#### Dropdown 下拉菜单
|
#### Dropdown 下拉菜单
|
||||||

|

|
||||||
#### Menu 导航菜单
|
#### Menu 导航菜单
|
||||||

|

|
||||||
#### Pagination 分页
|
#### Pagination 分页
|
||||||

|

|
||||||
#### Steps 步骤条
|
#### Steps 步骤条
|
||||||

|

|
||||||
|
|
||||||
### 数据录入
|
### 数据录入
|
||||||
#### Checkbox 多选框
|
#### Checkbox 多选框
|
||||||

|

|
||||||
#### ColorPicker 颜色选择器
|
#### ColorPicker 颜色选择器
|
||||||

|

|
||||||
#### DatePicker 日期选择器
|
#### DatePicker 日期选择器
|
||||||

|

|
||||||
#### DatePickerRange 日期范围选择器
|
#### DatePickerRange 日期范围选择器
|
||||||

|

|
||||||
#### Input 输入框
|
#### Input 输入框
|
||||||

|

|
||||||
#### InputNumber 数字输入框
|
#### InputNumber 数字输入框
|
||||||

|

|
||||||
#### Radio 单选框
|
#### Radio 单选框
|
||||||

|

|
||||||
#### Rate 评分
|
#### Rate 评分
|
||||||

|

|
||||||
#### Select 选择器
|
#### Select 选择器
|
||||||

|

|
||||||
#### SelectMultiple 多选选择器
|
#### SelectMultiple 多选选择器
|
||||||

|

|
||||||
#### Slider 滑动输入条
|
#### Slider 滑动输入条
|
||||||

|

|
||||||
#### Switch 开关
|
#### Switch 开关
|
||||||

|

|
||||||
#### TimePicker 时间选择框
|
#### TimePicker 时间选择框
|
||||||

|

|
||||||
|
|
||||||
### 数据展示
|
### 数据展示
|
||||||
#### Avatar 头像
|
#### Avatar 头像
|
||||||

|

|
||||||
#### Badge 徽标数
|
#### Badge 徽标数
|
||||||

|

|
||||||
#### Calendar 日历
|
#### Calendar 日历
|
||||||

|

|
||||||
#### Carousel 走马灯
|
#### Carousel 走马灯
|
||||||

|

|
||||||
#### Label 标签
|
#### Label 标签
|
||||||

|

|
||||||
#### Popover 气泡卡片
|
#### Popover 气泡卡片
|
||||||

|

|
||||||
#### Preview 图片预览
|
#### Preview 图片预览
|
||||||

|

|
||||||
#### Segmented 分段控制器
|
#### Segmented 分段控制器
|
||||||

|

|
||||||
#### Table 表格
|
#### Table 表格
|
||||||

|

|
||||||
#### Tabs 标签页
|
#### Tabs 标签页
|
||||||

|

|
||||||
#### Tag 标签
|
#### Tag 标签
|
||||||

|

|
||||||
#### Timeline 时间轴
|
#### Timeline 时间轴
|
||||||

|

|
||||||
#### Tooltip 文字提示
|
#### Tooltip 文字提示
|
||||||

|

|
||||||
#### Tree 树形控件
|
#### Tree 树形控件
|
||||||

|

|
||||||
|
|
||||||
### 反馈
|
### 反馈
|
||||||
#### Alert 警告提示
|
#### Alert 警告提示
|
||||||

|

|
||||||
#### Drawer 抽屉
|
#### Drawer 抽屉
|
||||||

|

|
||||||
#### Message 全局提示
|
#### Message 全局提示
|
||||||

|

|
||||||
#### Modal 对话框
|
#### Modal 对话框
|
||||||

|

|
||||||
#### Notification 通知提醒框
|
#### Notification 通知提醒框
|
||||||
|

|
||||||
#### Progress 进度条
|
#### Progress 进度条
|
||||||
|

|
||||||
#### Spin 加载中
|
#### Spin 加载中
|
||||||
|
|
||||||
### 聊天
|
### 聊天
|
||||||
|
|||||||
@ -104,16 +104,16 @@ namespace AntdUIDemo.Views
|
|||||||
{
|
{
|
||||||
//autoClose: 0 不自动关闭, 单位为秒
|
//autoClose: 0 不自动关闭, 单位为秒
|
||||||
case "Success":
|
case "Success":
|
||||||
AntdUI.Message.success(window, "This is a success message", autoClose: 1);
|
AntdUI.Message.success(window, "This is a success message", autoClose: 3);
|
||||||
break;
|
break;
|
||||||
case "Error":
|
case "Error":
|
||||||
AntdUI.Message.error(window, "This is an error message", autoClose: 1);
|
AntdUI.Message.error(window, "This is an error message", autoClose: 3);
|
||||||
break;
|
break;
|
||||||
case "Info":
|
case "Info":
|
||||||
AntdUI.Message.info(window, "This is an info message", autoClose: 1);
|
AntdUI.Message.info(window, "This is an info message", autoClose: 3);
|
||||||
break;
|
break;
|
||||||
case "Warn":
|
case "Warn":
|
||||||
AntdUI.Message.warn(window, "This is a warn message", autoClose: 1);
|
AntdUI.Message.warn(window, "This is a warn message", autoClose: 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
362
Views/NotificationDemo.Designer.cs
generated
Normal file
362
Views/NotificationDemo.Designer.cs
generated
Normal file
@ -0,0 +1,362 @@
|
|||||||
|
namespace AntdUIDemo.Views
|
||||||
|
{
|
||||||
|
partial class NotificationDemo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.stackPanel1 = new AntdUI.StackPanel();
|
||||||
|
this.divider1 = new AntdUI.Divider();
|
||||||
|
this.label2 = new AntdUI.Label();
|
||||||
|
this.label1 = new AntdUI.Label();
|
||||||
|
this.label4 = new AntdUI.Label();
|
||||||
|
this.flowPanel1 = new AntdUI.FlowPanel();
|
||||||
|
this.button_warn = new AntdUI.Button();
|
||||||
|
this.button_error = new AntdUI.Button();
|
||||||
|
this.button_success = new AntdUI.Button();
|
||||||
|
this.flowPanel2 = new AntdUI.FlowPanel();
|
||||||
|
this.button_BL = new AntdUI.Button();
|
||||||
|
this.button_Bottom = new AntdUI.Button();
|
||||||
|
this.button_BR = new AntdUI.Button();
|
||||||
|
this.button_TR = new AntdUI.Button();
|
||||||
|
this.button_Top = new AntdUI.Button();
|
||||||
|
this.button_TL = new AntdUI.Button();
|
||||||
|
this.label3 = new AntdUI.Label();
|
||||||
|
this.label5 = new AntdUI.Label();
|
||||||
|
this.flowPanel3 = new AntdUI.FlowPanel();
|
||||||
|
this.button_info = new AntdUI.Button();
|
||||||
|
this.button_close = new AntdUI.Button();
|
||||||
|
this.label6 = new AntdUI.Label();
|
||||||
|
this.flowPanel4 = new AntdUI.FlowPanel();
|
||||||
|
this.button_link = new AntdUI.Button();
|
||||||
|
this.stackPanel1.SuspendLayout();
|
||||||
|
this.flowPanel1.SuspendLayout();
|
||||||
|
this.flowPanel2.SuspendLayout();
|
||||||
|
this.flowPanel3.SuspendLayout();
|
||||||
|
this.flowPanel4.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// stackPanel1
|
||||||
|
//
|
||||||
|
this.stackPanel1.Controls.Add(this.flowPanel4);
|
||||||
|
this.stackPanel1.Controls.Add(this.label6);
|
||||||
|
this.stackPanel1.Controls.Add(this.flowPanel3);
|
||||||
|
this.stackPanel1.Controls.Add(this.label5);
|
||||||
|
this.stackPanel1.Controls.Add(this.flowPanel2);
|
||||||
|
this.stackPanel1.Controls.Add(this.label3);
|
||||||
|
this.stackPanel1.Controls.Add(this.flowPanel1);
|
||||||
|
this.stackPanel1.Controls.Add(this.label4);
|
||||||
|
this.stackPanel1.Controls.Add(this.divider1);
|
||||||
|
this.stackPanel1.Controls.Add(this.label2);
|
||||||
|
this.stackPanel1.Controls.Add(this.label1);
|
||||||
|
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(700, 505);
|
||||||
|
this.stackPanel1.TabIndex = 0;
|
||||||
|
this.stackPanel1.Text = "stackPanel1";
|
||||||
|
this.stackPanel1.Vertical = true;
|
||||||
|
//
|
||||||
|
// divider1
|
||||||
|
//
|
||||||
|
this.divider1.Location = new System.Drawing.Point(3, 79);
|
||||||
|
this.divider1.Name = "divider1";
|
||||||
|
this.divider1.Size = new System.Drawing.Size(694, 12);
|
||||||
|
this.divider1.TabIndex = 28;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label2.Location = new System.Drawing.Point(3, 49);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label2.TabIndex = 27;
|
||||||
|
this.label2.Text = "全局展示通知提醒信息。";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(694, 40);
|
||||||
|
this.label1.TabIndex = 26;
|
||||||
|
this.label1.Text = "Notification 通知提醒框";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label4.Location = new System.Drawing.Point(3, 97);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label4.TabIndex = 42;
|
||||||
|
this.label4.Text = "基本用法";
|
||||||
|
//
|
||||||
|
// flowPanel1
|
||||||
|
//
|
||||||
|
this.flowPanel1.Controls.Add(this.button_info);
|
||||||
|
this.flowPanel1.Controls.Add(this.button_warn);
|
||||||
|
this.flowPanel1.Controls.Add(this.button_error);
|
||||||
|
this.flowPanel1.Controls.Add(this.button_success);
|
||||||
|
this.flowPanel1.Location = new System.Drawing.Point(3, 127);
|
||||||
|
this.flowPanel1.Name = "flowPanel1";
|
||||||
|
this.flowPanel1.Size = new System.Drawing.Size(694, 38);
|
||||||
|
this.flowPanel1.TabIndex = 43;
|
||||||
|
this.flowPanel1.Text = "flowPanel1";
|
||||||
|
//
|
||||||
|
// button_warn
|
||||||
|
//
|
||||||
|
this.button_warn.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_warn.Location = new System.Drawing.Point(175, 3);
|
||||||
|
this.button_warn.Name = "button_warn";
|
||||||
|
this.button_warn.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_warn.TabIndex = 4;
|
||||||
|
this.button_warn.Text = "Warn";
|
||||||
|
this.button_warn.Type = AntdUI.TTypeMini.Warn;
|
||||||
|
this.button_warn.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// button_error
|
||||||
|
//
|
||||||
|
this.button_error.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_error.Location = new System.Drawing.Point(89, 3);
|
||||||
|
this.button_error.Name = "button_error";
|
||||||
|
this.button_error.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_error.TabIndex = 3;
|
||||||
|
this.button_error.Text = "Error";
|
||||||
|
this.button_error.Type = AntdUI.TTypeMini.Error;
|
||||||
|
this.button_error.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// button_success
|
||||||
|
//
|
||||||
|
this.button_success.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_success.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.button_success.Name = "button_success";
|
||||||
|
this.button_success.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_success.TabIndex = 2;
|
||||||
|
this.button_success.Text = "Success";
|
||||||
|
this.button_success.Type = AntdUI.TTypeMini.Success;
|
||||||
|
this.button_success.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// flowPanel2
|
||||||
|
//
|
||||||
|
this.flowPanel2.Controls.Add(this.button_BL);
|
||||||
|
this.flowPanel2.Controls.Add(this.button_Bottom);
|
||||||
|
this.flowPanel2.Controls.Add(this.button_BR);
|
||||||
|
this.flowPanel2.Controls.Add(this.button_TR);
|
||||||
|
this.flowPanel2.Controls.Add(this.button_Top);
|
||||||
|
this.flowPanel2.Controls.Add(this.button_TL);
|
||||||
|
this.flowPanel2.Location = new System.Drawing.Point(3, 201);
|
||||||
|
this.flowPanel2.Name = "flowPanel2";
|
||||||
|
this.flowPanel2.Size = new System.Drawing.Size(694, 38);
|
||||||
|
this.flowPanel2.TabIndex = 45;
|
||||||
|
this.flowPanel2.Text = "flowPanel2";
|
||||||
|
//
|
||||||
|
// button_BL
|
||||||
|
//
|
||||||
|
this.button_BL.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_BL.Location = new System.Drawing.Point(433, 3);
|
||||||
|
this.button_BL.Name = "button_BL";
|
||||||
|
this.button_BL.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_BL.TabIndex = 7;
|
||||||
|
this.button_BL.Text = "BL";
|
||||||
|
this.button_BL.Type = AntdUI.TTypeMini.Primary;
|
||||||
|
this.button_BL.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// button_Bottom
|
||||||
|
//
|
||||||
|
this.button_Bottom.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_Bottom.Location = new System.Drawing.Point(347, 3);
|
||||||
|
this.button_Bottom.Name = "button_Bottom";
|
||||||
|
this.button_Bottom.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_Bottom.TabIndex = 6;
|
||||||
|
this.button_Bottom.Text = "Bottom";
|
||||||
|
this.button_Bottom.Type = AntdUI.TTypeMini.Primary;
|
||||||
|
this.button_Bottom.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// button_BR
|
||||||
|
//
|
||||||
|
this.button_BR.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_BR.Location = new System.Drawing.Point(261, 3);
|
||||||
|
this.button_BR.Name = "button_BR";
|
||||||
|
this.button_BR.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_BR.TabIndex = 5;
|
||||||
|
this.button_BR.Text = "BR";
|
||||||
|
this.button_BR.Type = AntdUI.TTypeMini.Primary;
|
||||||
|
this.button_BR.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// button_TR
|
||||||
|
//
|
||||||
|
this.button_TR.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_TR.Location = new System.Drawing.Point(175, 3);
|
||||||
|
this.button_TR.Name = "button_TR";
|
||||||
|
this.button_TR.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_TR.TabIndex = 4;
|
||||||
|
this.button_TR.Text = "TR";
|
||||||
|
this.button_TR.Type = AntdUI.TTypeMini.Primary;
|
||||||
|
this.button_TR.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// button_Top
|
||||||
|
//
|
||||||
|
this.button_Top.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_Top.Location = new System.Drawing.Point(89, 3);
|
||||||
|
this.button_Top.Name = "button_Top";
|
||||||
|
this.button_Top.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_Top.TabIndex = 3;
|
||||||
|
this.button_Top.Text = "Top";
|
||||||
|
this.button_Top.Type = AntdUI.TTypeMini.Primary;
|
||||||
|
this.button_Top.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// button_TL
|
||||||
|
//
|
||||||
|
this.button_TL.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_TL.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.button_TL.Name = "button_TL";
|
||||||
|
this.button_TL.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_TL.TabIndex = 2;
|
||||||
|
this.button_TL.Text = "TL";
|
||||||
|
this.button_TL.Type = AntdUI.TTypeMini.Primary;
|
||||||
|
this.button_TL.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label3.Location = new System.Drawing.Point(3, 171);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label3.TabIndex = 44;
|
||||||
|
this.label3.Text = "弹出位置";
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label5.Location = new System.Drawing.Point(3, 245);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label5.TabIndex = 46;
|
||||||
|
this.label5.Text = "取消关闭图标";
|
||||||
|
//
|
||||||
|
// flowPanel3
|
||||||
|
//
|
||||||
|
this.flowPanel3.Controls.Add(this.button_close);
|
||||||
|
this.flowPanel3.Location = new System.Drawing.Point(3, 275);
|
||||||
|
this.flowPanel3.Name = "flowPanel3";
|
||||||
|
this.flowPanel3.Size = new System.Drawing.Size(694, 38);
|
||||||
|
this.flowPanel3.TabIndex = 47;
|
||||||
|
this.flowPanel3.Text = "flowPanel3";
|
||||||
|
//
|
||||||
|
// button_info
|
||||||
|
//
|
||||||
|
this.button_info.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_info.Location = new System.Drawing.Point(261, 3);
|
||||||
|
this.button_info.Name = "button_info";
|
||||||
|
this.button_info.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_info.TabIndex = 5;
|
||||||
|
this.button_info.Text = "Info";
|
||||||
|
this.button_info.Type = AntdUI.TTypeMini.Info;
|
||||||
|
this.button_info.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// button_close
|
||||||
|
//
|
||||||
|
this.button_close.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_close.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.button_close.Name = "button_close";
|
||||||
|
this.button_close.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_close.TabIndex = 6;
|
||||||
|
this.button_close.Text = "Icon";
|
||||||
|
this.button_close.Type = AntdUI.TTypeMini.Info;
|
||||||
|
this.button_close.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label6.Location = new System.Drawing.Point(3, 319);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label6.TabIndex = 48;
|
||||||
|
this.label6.Text = "超链接";
|
||||||
|
//
|
||||||
|
// flowPanel4
|
||||||
|
//
|
||||||
|
this.flowPanel4.Controls.Add(this.button_link);
|
||||||
|
this.flowPanel4.Location = new System.Drawing.Point(3, 349);
|
||||||
|
this.flowPanel4.Name = "flowPanel4";
|
||||||
|
this.flowPanel4.Size = new System.Drawing.Size(694, 38);
|
||||||
|
this.flowPanel4.TabIndex = 49;
|
||||||
|
this.flowPanel4.Text = "flowPanel4";
|
||||||
|
//
|
||||||
|
// button_link
|
||||||
|
//
|
||||||
|
this.button_link.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button_link.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.button_link.Name = "button_link";
|
||||||
|
this.button_link.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button_link.TabIndex = 6;
|
||||||
|
this.button_link.Text = "Link";
|
||||||
|
this.button_link.Type = AntdUI.TTypeMini.Info;
|
||||||
|
this.button_link.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// NotificationDemo
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||||
|
this.Controls.Add(this.stackPanel1);
|
||||||
|
this.Name = "NotificationDemo";
|
||||||
|
this.Size = new System.Drawing.Size(700, 505);
|
||||||
|
this.stackPanel1.ResumeLayout(false);
|
||||||
|
this.flowPanel1.ResumeLayout(false);
|
||||||
|
this.flowPanel2.ResumeLayout(false);
|
||||||
|
this.flowPanel3.ResumeLayout(false);
|
||||||
|
this.flowPanel4.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private AntdUI.StackPanel stackPanel1;
|
||||||
|
private AntdUI.Divider divider1;
|
||||||
|
private AntdUI.Label label2;
|
||||||
|
private AntdUI.Label label1;
|
||||||
|
private AntdUI.Label label4;
|
||||||
|
private AntdUI.FlowPanel flowPanel2;
|
||||||
|
private AntdUI.Button button_BL;
|
||||||
|
private AntdUI.Button button_Bottom;
|
||||||
|
private AntdUI.Button button_BR;
|
||||||
|
private AntdUI.Button button_TR;
|
||||||
|
private AntdUI.Button button_Top;
|
||||||
|
private AntdUI.Button button_TL;
|
||||||
|
private AntdUI.Label label3;
|
||||||
|
private AntdUI.FlowPanel flowPanel1;
|
||||||
|
private AntdUI.Button button_warn;
|
||||||
|
private AntdUI.Button button_error;
|
||||||
|
private AntdUI.Button button_success;
|
||||||
|
private AntdUI.FlowPanel flowPanel3;
|
||||||
|
private AntdUI.Button button_close;
|
||||||
|
private AntdUI.Label label5;
|
||||||
|
private AntdUI.Button button_info;
|
||||||
|
private AntdUI.Label label6;
|
||||||
|
private AntdUI.FlowPanel flowPanel4;
|
||||||
|
private AntdUI.Button button_link;
|
||||||
|
}
|
||||||
|
}
|
||||||
119
Views/NotificationDemo.cs
Normal file
119
Views/NotificationDemo.cs
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
using AntdUI;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace AntdUIDemo.Views
|
||||||
|
{
|
||||||
|
public partial class NotificationDemo : UserControl
|
||||||
|
{
|
||||||
|
private AntdUI.Window window;
|
||||||
|
public NotificationDemo(AntdUI.Window _window)
|
||||||
|
{
|
||||||
|
window = _window;
|
||||||
|
InitializeComponent();
|
||||||
|
BindEventHandler();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void BindEventHandler()
|
||||||
|
{
|
||||||
|
button_TR.Click += Button_Click;
|
||||||
|
button_TL.Click += Button_Click;
|
||||||
|
button_Top.Click += Button_Click;
|
||||||
|
button_BR.Click += Button_Click;
|
||||||
|
button_BL.Click += Button_Click;
|
||||||
|
button_Bottom.Click += Button_Click;
|
||||||
|
|
||||||
|
button_error.Click += Button_error_Click;
|
||||||
|
button_info.Click += Button_info_Click;
|
||||||
|
button_success.Click += Button_success_Click;
|
||||||
|
button_warn.Click += Button_warn_Click;
|
||||||
|
|
||||||
|
button_close.Click += Button_close_Click;
|
||||||
|
|
||||||
|
button_link.Click += Button_link_Click;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_link_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AntdUI.Notification.open(new AntdUI.Notification.Config(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", TType.Info, TAlignFrom.TR)
|
||||||
|
{
|
||||||
|
CloseIcon = false,
|
||||||
|
Link = new Notification.ConfigLink("Link to...", new Action(() =>
|
||||||
|
{
|
||||||
|
AntdUI.Message.info(window, "Welcome!");
|
||||||
|
}))
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_close_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AntdUI.Notification.open(new AntdUI.Notification.Config(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", TType.Info, TAlignFrom.TR)
|
||||||
|
{
|
||||||
|
CloseIcon = false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_warn_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AntdUI.Notification.warn(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", autoClose: 3, align: TAlignFrom.TR);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_success_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AntdUI.Notification.success(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", autoClose: 3, align: TAlignFrom.TR);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_info_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AntdUI.Notification.info(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", autoClose: 3, align: TAlignFrom.TR);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_error_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
AntdUI.Notification.error(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", autoClose: 3, align: TAlignFrom.TR);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var button = (AntdUI.Button)sender;
|
||||||
|
var text = button.Text;
|
||||||
|
var align = TAlignFrom.TR;
|
||||||
|
switch (text)
|
||||||
|
{
|
||||||
|
case "TL":
|
||||||
|
align = TAlignFrom.TL;
|
||||||
|
AntdUI.Notification.open(window, $"Notification {align}", "Hello AntdUI Demo!", autoClose: 3, align: align);
|
||||||
|
break;
|
||||||
|
case "TR":
|
||||||
|
align = TAlignFrom.TR;
|
||||||
|
AntdUI.Notification.open(window, $"Notification {align}", "Hello AntdUI Demo!", autoClose: 3, align: align);
|
||||||
|
break;
|
||||||
|
case "Top":
|
||||||
|
align = TAlignFrom.Top;
|
||||||
|
AntdUI.Notification.open(window, $"Notification {align}", "Hello AntdUI Demo!", autoClose: 3, align: align);
|
||||||
|
break;
|
||||||
|
case "BR":
|
||||||
|
align = TAlignFrom.BR;
|
||||||
|
AntdUI.Notification.open(window, $"Notification {align}", "Hello AntdUI Demo!", autoClose: 3, align: align);
|
||||||
|
break;
|
||||||
|
case "BL":
|
||||||
|
align = TAlignFrom.BL;
|
||||||
|
AntdUI.Notification.open(window, $"Notification {align}", "Hello AntdUI Demo!", autoClose: 3, align: align);
|
||||||
|
break;
|
||||||
|
case "Bottom":
|
||||||
|
align = TAlignFrom.Bottom;
|
||||||
|
AntdUI.Notification.open(window, $"Notification {align}", "Hello AntdUI Demo!", autoClose: 3, align: align);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Views/NotificationDemo.resx
Normal file
120
Views/NotificationDemo.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
337
Views/ProgressDemo.Designer.cs
generated
Normal file
337
Views/ProgressDemo.Designer.cs
generated
Normal file
@ -0,0 +1,337 @@
|
|||||||
|
namespace AntdUIDemo.Views
|
||||||
|
{
|
||||||
|
partial class ProgressDemo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.stackPanel1 = new AntdUI.StackPanel();
|
||||||
|
this.label4 = new AntdUI.Label();
|
||||||
|
this.divider1 = new AntdUI.Divider();
|
||||||
|
this.label2 = new AntdUI.Label();
|
||||||
|
this.label1 = new AntdUI.Label();
|
||||||
|
this.progress1 = new AntdUI.Progress();
|
||||||
|
this.progress2 = new AntdUI.Progress();
|
||||||
|
this.progress3 = new AntdUI.Progress();
|
||||||
|
this.progress4 = new AntdUI.Progress();
|
||||||
|
this.progress5 = new AntdUI.Progress();
|
||||||
|
this.label3 = new AntdUI.Label();
|
||||||
|
this.flowPanel4 = new AntdUI.FlowPanel();
|
||||||
|
this.progress6 = new AntdUI.Progress();
|
||||||
|
this.progress7 = new AntdUI.Progress();
|
||||||
|
this.progress8 = new AntdUI.Progress();
|
||||||
|
this.label5 = new AntdUI.Label();
|
||||||
|
this.flowPanel1 = new AntdUI.FlowPanel();
|
||||||
|
this.progress11 = new AntdUI.Progress();
|
||||||
|
this.progress9 = new AntdUI.Progress();
|
||||||
|
this.progress10 = new AntdUI.Progress();
|
||||||
|
this.stackPanel1.SuspendLayout();
|
||||||
|
this.flowPanel4.SuspendLayout();
|
||||||
|
this.flowPanel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// stackPanel1
|
||||||
|
//
|
||||||
|
this.stackPanel1.Controls.Add(this.flowPanel1);
|
||||||
|
this.stackPanel1.Controls.Add(this.label5);
|
||||||
|
this.stackPanel1.Controls.Add(this.flowPanel4);
|
||||||
|
this.stackPanel1.Controls.Add(this.label3);
|
||||||
|
this.stackPanel1.Controls.Add(this.progress5);
|
||||||
|
this.stackPanel1.Controls.Add(this.progress4);
|
||||||
|
this.stackPanel1.Controls.Add(this.progress3);
|
||||||
|
this.stackPanel1.Controls.Add(this.progress2);
|
||||||
|
this.stackPanel1.Controls.Add(this.progress1);
|
||||||
|
this.stackPanel1.Controls.Add(this.label4);
|
||||||
|
this.stackPanel1.Controls.Add(this.divider1);
|
||||||
|
this.stackPanel1.Controls.Add(this.label2);
|
||||||
|
this.stackPanel1.Controls.Add(this.label1);
|
||||||
|
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(700, 515);
|
||||||
|
this.stackPanel1.TabIndex = 0;
|
||||||
|
this.stackPanel1.Text = "stackPanel1";
|
||||||
|
this.stackPanel1.Vertical = true;
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label4.Location = new System.Drawing.Point(3, 97);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label4.TabIndex = 46;
|
||||||
|
this.label4.Text = "进度条";
|
||||||
|
//
|
||||||
|
// divider1
|
||||||
|
//
|
||||||
|
this.divider1.Location = new System.Drawing.Point(3, 79);
|
||||||
|
this.divider1.Name = "divider1";
|
||||||
|
this.divider1.Size = new System.Drawing.Size(694, 12);
|
||||||
|
this.divider1.TabIndex = 45;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label2.Location = new System.Drawing.Point(3, 49);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label2.TabIndex = 44;
|
||||||
|
this.label2.Text = "展示操作的当前进度。";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(694, 40);
|
||||||
|
this.label1.TabIndex = 43;
|
||||||
|
this.label1.Text = "Progress 进度条";
|
||||||
|
//
|
||||||
|
// progress1
|
||||||
|
//
|
||||||
|
this.progress1.ContainerControl = this;
|
||||||
|
this.progress1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress1.Location = new System.Drawing.Point(3, 127);
|
||||||
|
this.progress1.Name = "progress1";
|
||||||
|
this.progress1.ShowText = true;
|
||||||
|
this.progress1.Size = new System.Drawing.Size(694, 20);
|
||||||
|
this.progress1.TabIndex = 47;
|
||||||
|
this.progress1.Text = "%";
|
||||||
|
this.progress1.Value = 0.3F;
|
||||||
|
//
|
||||||
|
// progress2
|
||||||
|
//
|
||||||
|
this.progress2.ContainerControl = this;
|
||||||
|
this.progress2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress2.Loading = true;
|
||||||
|
this.progress2.Location = new System.Drawing.Point(3, 153);
|
||||||
|
this.progress2.Name = "progress2";
|
||||||
|
this.progress2.ShowText = true;
|
||||||
|
this.progress2.Size = new System.Drawing.Size(694, 20);
|
||||||
|
this.progress2.TabIndex = 48;
|
||||||
|
this.progress2.Text = "%";
|
||||||
|
this.progress2.Value = 0.5F;
|
||||||
|
//
|
||||||
|
// progress3
|
||||||
|
//
|
||||||
|
this.progress3.ContainerControl = this;
|
||||||
|
this.progress3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress3.Location = new System.Drawing.Point(3, 179);
|
||||||
|
this.progress3.Name = "progress3";
|
||||||
|
this.progress3.ShowText = true;
|
||||||
|
this.progress3.Size = new System.Drawing.Size(694, 20);
|
||||||
|
this.progress3.State = AntdUI.TType.Error;
|
||||||
|
this.progress3.TabIndex = 49;
|
||||||
|
this.progress3.Text = "";
|
||||||
|
this.progress3.Value = 0.7F;
|
||||||
|
//
|
||||||
|
// progress4
|
||||||
|
//
|
||||||
|
this.progress4.ContainerControl = this;
|
||||||
|
this.progress4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress4.Location = new System.Drawing.Point(3, 205);
|
||||||
|
this.progress4.Name = "progress4";
|
||||||
|
this.progress4.ShowText = true;
|
||||||
|
this.progress4.Size = new System.Drawing.Size(694, 20);
|
||||||
|
this.progress4.State = AntdUI.TType.Success;
|
||||||
|
this.progress4.TabIndex = 50;
|
||||||
|
this.progress4.Text = "";
|
||||||
|
this.progress4.Value = 1F;
|
||||||
|
//
|
||||||
|
// progress5
|
||||||
|
//
|
||||||
|
this.progress5.ContainerControl = this;
|
||||||
|
this.progress5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress5.Loading = true;
|
||||||
|
this.progress5.Location = new System.Drawing.Point(3, 231);
|
||||||
|
this.progress5.Name = "progress5";
|
||||||
|
this.progress5.ShowInfo = false;
|
||||||
|
this.progress5.ShowText = true;
|
||||||
|
this.progress5.Size = new System.Drawing.Size(694, 10);
|
||||||
|
this.progress5.State = AntdUI.TType.Warn;
|
||||||
|
this.progress5.TabIndex = 51;
|
||||||
|
this.progress5.Text = "%";
|
||||||
|
this.progress5.Value = 0.3F;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label3.Location = new System.Drawing.Point(3, 247);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label3.TabIndex = 52;
|
||||||
|
this.label3.Text = "进度圈";
|
||||||
|
//
|
||||||
|
// flowPanel4
|
||||||
|
//
|
||||||
|
this.flowPanel4.Controls.Add(this.progress8);
|
||||||
|
this.flowPanel4.Controls.Add(this.progress7);
|
||||||
|
this.flowPanel4.Controls.Add(this.progress6);
|
||||||
|
this.flowPanel4.Gap = 6;
|
||||||
|
this.flowPanel4.Location = new System.Drawing.Point(3, 277);
|
||||||
|
this.flowPanel4.Name = "flowPanel4";
|
||||||
|
this.flowPanel4.Size = new System.Drawing.Size(694, 76);
|
||||||
|
this.flowPanel4.TabIndex = 53;
|
||||||
|
this.flowPanel4.Text = "flowPanel4";
|
||||||
|
//
|
||||||
|
// progress6
|
||||||
|
//
|
||||||
|
this.progress6.ContainerControl = this;
|
||||||
|
this.progress6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress6.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.progress6.Name = "progress6";
|
||||||
|
this.progress6.Shape = AntdUI.TShape.Circle;
|
||||||
|
this.progress6.ShowText = true;
|
||||||
|
this.progress6.Size = new System.Drawing.Size(76, 70);
|
||||||
|
this.progress6.TabIndex = 48;
|
||||||
|
this.progress6.Text = "%";
|
||||||
|
this.progress6.Value = 0.75F;
|
||||||
|
//
|
||||||
|
// progress7
|
||||||
|
//
|
||||||
|
this.progress7.ContainerControl = this;
|
||||||
|
this.progress7.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress7.Location = new System.Drawing.Point(91, 3);
|
||||||
|
this.progress7.Name = "progress7";
|
||||||
|
this.progress7.Shape = AntdUI.TShape.Circle;
|
||||||
|
this.progress7.ShowText = true;
|
||||||
|
this.progress7.Size = new System.Drawing.Size(76, 70);
|
||||||
|
this.progress7.State = AntdUI.TType.Error;
|
||||||
|
this.progress7.TabIndex = 49;
|
||||||
|
this.progress7.Text = "%";
|
||||||
|
this.progress7.Value = 0.75F;
|
||||||
|
//
|
||||||
|
// progress8
|
||||||
|
//
|
||||||
|
this.progress8.ContainerControl = this;
|
||||||
|
this.progress8.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress8.Location = new System.Drawing.Point(179, 3);
|
||||||
|
this.progress8.Name = "progress8";
|
||||||
|
this.progress8.Shape = AntdUI.TShape.Circle;
|
||||||
|
this.progress8.ShowText = true;
|
||||||
|
this.progress8.Size = new System.Drawing.Size(76, 70);
|
||||||
|
this.progress8.State = AntdUI.TType.Success;
|
||||||
|
this.progress8.TabIndex = 50;
|
||||||
|
this.progress8.Text = "%";
|
||||||
|
this.progress8.Value = 1F;
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label5.Location = new System.Drawing.Point(3, 359);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label5.TabIndex = 54;
|
||||||
|
this.label5.Text = "mini模式";
|
||||||
|
//
|
||||||
|
// flowPanel1
|
||||||
|
//
|
||||||
|
this.flowPanel1.Controls.Add(this.progress10);
|
||||||
|
this.flowPanel1.Controls.Add(this.progress9);
|
||||||
|
this.flowPanel1.Controls.Add(this.progress11);
|
||||||
|
this.flowPanel1.Gap = 6;
|
||||||
|
this.flowPanel1.Location = new System.Drawing.Point(3, 389);
|
||||||
|
this.flowPanel1.Name = "flowPanel1";
|
||||||
|
this.flowPanel1.Size = new System.Drawing.Size(694, 38);
|
||||||
|
this.flowPanel1.TabIndex = 55;
|
||||||
|
this.flowPanel1.Text = "flowPanel1";
|
||||||
|
//
|
||||||
|
// progress11
|
||||||
|
//
|
||||||
|
this.progress11.ContainerControl = this;
|
||||||
|
this.progress11.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress11.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.progress11.Mini = true;
|
||||||
|
this.progress11.Name = "progress11";
|
||||||
|
this.progress11.ShowText = true;
|
||||||
|
this.progress11.Size = new System.Drawing.Size(76, 31);
|
||||||
|
this.progress11.TabIndex = 48;
|
||||||
|
this.progress11.Text = "%";
|
||||||
|
this.progress11.Value = 0.75F;
|
||||||
|
//
|
||||||
|
// progress9
|
||||||
|
//
|
||||||
|
this.progress9.ContainerControl = this;
|
||||||
|
this.progress9.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress9.Location = new System.Drawing.Point(91, 3);
|
||||||
|
this.progress9.Mini = true;
|
||||||
|
this.progress9.Name = "progress9";
|
||||||
|
this.progress9.Size = new System.Drawing.Size(76, 31);
|
||||||
|
this.progress9.State = AntdUI.TType.Error;
|
||||||
|
this.progress9.TabIndex = 49;
|
||||||
|
this.progress9.Text = "Error";
|
||||||
|
this.progress9.Value = 0.75F;
|
||||||
|
//
|
||||||
|
// progress10
|
||||||
|
//
|
||||||
|
this.progress10.ContainerControl = this;
|
||||||
|
this.progress10.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.progress10.Location = new System.Drawing.Point(179, 3);
|
||||||
|
this.progress10.Mini = true;
|
||||||
|
this.progress10.Name = "progress10";
|
||||||
|
this.progress10.Size = new System.Drawing.Size(76, 31);
|
||||||
|
this.progress10.State = AntdUI.TType.Success;
|
||||||
|
this.progress10.TabIndex = 50;
|
||||||
|
this.progress10.Text = "Success";
|
||||||
|
this.progress10.Value = 1F;
|
||||||
|
//
|
||||||
|
// ProgressDemo
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||||
|
this.Controls.Add(this.stackPanel1);
|
||||||
|
this.Name = "ProgressDemo";
|
||||||
|
this.Size = new System.Drawing.Size(700, 515);
|
||||||
|
this.stackPanel1.ResumeLayout(false);
|
||||||
|
this.flowPanel4.ResumeLayout(false);
|
||||||
|
this.flowPanel1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private AntdUI.StackPanel stackPanel1;
|
||||||
|
private AntdUI.Label label4;
|
||||||
|
private AntdUI.Divider divider1;
|
||||||
|
private AntdUI.Label label2;
|
||||||
|
private AntdUI.Label label1;
|
||||||
|
private AntdUI.Progress progress1;
|
||||||
|
private AntdUI.Progress progress3;
|
||||||
|
private AntdUI.Progress progress2;
|
||||||
|
private AntdUI.Progress progress5;
|
||||||
|
private AntdUI.Progress progress4;
|
||||||
|
private AntdUI.Label label3;
|
||||||
|
private AntdUI.FlowPanel flowPanel4;
|
||||||
|
private AntdUI.Progress progress6;
|
||||||
|
private AntdUI.Progress progress8;
|
||||||
|
private AntdUI.Progress progress7;
|
||||||
|
private AntdUI.Label label5;
|
||||||
|
private AntdUI.FlowPanel flowPanel1;
|
||||||
|
private AntdUI.Progress progress10;
|
||||||
|
private AntdUI.Progress progress9;
|
||||||
|
private AntdUI.Progress progress11;
|
||||||
|
}
|
||||||
|
}
|
||||||
20
Views/ProgressDemo.cs
Normal file
20
Views/ProgressDemo.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace AntdUIDemo.Views
|
||||||
|
{
|
||||||
|
public partial class ProgressDemo : UserControl
|
||||||
|
{
|
||||||
|
public ProgressDemo()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Views/ProgressDemo.resx
Normal file
120
Views/ProgressDemo.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
133
Views/SpinDemo.Designer.cs
generated
Normal file
133
Views/SpinDemo.Designer.cs
generated
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
namespace AntdUIDemo.Views
|
||||||
|
{
|
||||||
|
partial class SpinDemo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.stackPanel1 = new AntdUI.StackPanel();
|
||||||
|
this.divider1 = new AntdUI.Divider();
|
||||||
|
this.label2 = new AntdUI.Label();
|
||||||
|
this.label1 = new AntdUI.Label();
|
||||||
|
this.label4 = new AntdUI.Label();
|
||||||
|
this.flowPanel = new AntdUI.FlowPanel();
|
||||||
|
this.button2 = new AntdUI.Button();
|
||||||
|
this.stackPanel1.SuspendLayout();
|
||||||
|
this.flowPanel.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// stackPanel1
|
||||||
|
//
|
||||||
|
this.stackPanel1.Controls.Add(this.flowPanel);
|
||||||
|
this.stackPanel1.Controls.Add(this.label4);
|
||||||
|
this.stackPanel1.Controls.Add(this.divider1);
|
||||||
|
this.stackPanel1.Controls.Add(this.label2);
|
||||||
|
this.stackPanel1.Controls.Add(this.label1);
|
||||||
|
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(700, 469);
|
||||||
|
this.stackPanel1.TabIndex = 0;
|
||||||
|
this.stackPanel1.Text = "stackPanel1";
|
||||||
|
this.stackPanel1.Vertical = true;
|
||||||
|
//
|
||||||
|
// divider1
|
||||||
|
//
|
||||||
|
this.divider1.Location = new System.Drawing.Point(3, 79);
|
||||||
|
this.divider1.Name = "divider1";
|
||||||
|
this.divider1.Size = new System.Drawing.Size(694, 12);
|
||||||
|
this.divider1.TabIndex = 48;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label2.Location = new System.Drawing.Point(3, 49);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label2.TabIndex = 47;
|
||||||
|
this.label2.Text = "用于页面和区块的加载中状态。";
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label1.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(694, 40);
|
||||||
|
this.label1.TabIndex = 46;
|
||||||
|
this.label1.Text = "Spin 加载中";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.label4.Location = new System.Drawing.Point(3, 97);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(694, 24);
|
||||||
|
this.label4.TabIndex = 49;
|
||||||
|
this.label4.Text = "基本用法";
|
||||||
|
//
|
||||||
|
// flowPanel
|
||||||
|
//
|
||||||
|
this.flowPanel.Controls.Add(this.button2);
|
||||||
|
this.flowPanel.Location = new System.Drawing.Point(3, 127);
|
||||||
|
this.flowPanel.Name = "flowPanel";
|
||||||
|
this.flowPanel.Size = new System.Drawing.Size(694, 38);
|
||||||
|
this.flowPanel.TabIndex = 50;
|
||||||
|
this.flowPanel.Text = "flowPanel1";
|
||||||
|
//
|
||||||
|
// button2
|
||||||
|
//
|
||||||
|
this.button2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.button2.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.button2.Name = "button2";
|
||||||
|
this.button2.Size = new System.Drawing.Size(80, 32);
|
||||||
|
this.button2.TabIndex = 2;
|
||||||
|
this.button2.Text = "Primary";
|
||||||
|
this.button2.Type = AntdUI.TTypeMini.Primary;
|
||||||
|
this.button2.WaveSize = 0;
|
||||||
|
//
|
||||||
|
// SpinDemo
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||||
|
this.Controls.Add(this.stackPanel1);
|
||||||
|
this.Name = "SpinDemo";
|
||||||
|
this.Size = new System.Drawing.Size(700, 469);
|
||||||
|
this.stackPanel1.ResumeLayout(false);
|
||||||
|
this.flowPanel.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private AntdUI.StackPanel stackPanel1;
|
||||||
|
private AntdUI.Divider divider1;
|
||||||
|
private AntdUI.Label label2;
|
||||||
|
private AntdUI.Label label1;
|
||||||
|
private AntdUI.Label label4;
|
||||||
|
private AntdUI.FlowPanel flowPanel;
|
||||||
|
private AntdUI.Button button2;
|
||||||
|
}
|
||||||
|
}
|
||||||
20
Views/SpinDemo.cs
Normal file
20
Views/SpinDemo.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace AntdUIDemo.Views
|
||||||
|
{
|
||||||
|
public partial class SpinDemo : UserControl
|
||||||
|
{
|
||||||
|
public SpinDemo()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Views/SpinDemo.resx
Normal file
120
Views/SpinDemo.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
BIN
assets/screenshots/vsopen.png
Normal file
BIN
assets/screenshots/vsopen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 122 KiB |
Loading…
x
Reference in New Issue
Block a user