完成除了Virtualpanel所有的demo

This commit is contained in:
czz_y 2024-09-06 16:35:13 +08:00
parent 57f35e207a
commit cdb177356e
14 changed files with 761 additions and 26 deletions

View File

@ -10,7 +10,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>assets\icon.ico</ApplicationIcon>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>latest</LangVersion>
<LangVersion>12</LangVersion>
<Copyright>Copyright © 2024 czz_y</Copyright>
<FileVersion>$(Version)</FileVersion>
<AssemblyVersion>$(Version)</AssemblyVersion>

View File

@ -46,6 +46,7 @@
this.titlebar.Controls.Add(this.buttonSZ);
this.titlebar.Dock = System.Windows.Forms.DockStyle.Top;
this.titlebar.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.titlebar.IsMax = false;
this.titlebar.Location = new System.Drawing.Point(6, 0);
this.titlebar.MaximizeBox = false;
this.titlebar.Name = "titlebar";
@ -60,6 +61,7 @@
this.button_color.Ghost = true;
this.button_color.IconRatio = 0.6F;
this.button_color.IconSvg = resources.GetString("button_color.IconSvg");
this.button_color.Location = new System.Drawing.Point(796, 0);
this.button_color.Name = "button_color";
this.button_color.Radius = 0;
this.button_color.Size = new System.Drawing.Size(50, 40);
@ -71,6 +73,7 @@
this.buttonSZ.Dock = System.Windows.Forms.DockStyle.Right;
this.buttonSZ.Ghost = true;
this.buttonSZ.IconSvg = resources.GetString("buttonSZ.IconSvg");
this.buttonSZ.Location = new System.Drawing.Point(846, 0);
this.buttonSZ.Name = "buttonSZ";
this.buttonSZ.Radius = 0;
this.buttonSZ.Size = new System.Drawing.Size(50, 40);
@ -130,7 +133,7 @@
this.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "MainWindow";
this.Opacity = 0.96D;
this.Opacity = 0.99D;
this.Padding = new System.Windows.Forms.Padding(6, 0, 0, 6);
this.Resizable = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

View File

@ -303,6 +303,12 @@ namespace AntdUIDemo
case "ContextMenuStrip":
control = new ContextMenuStripDemo(this);
break;
case "Image3D":
control = new Image3DDemo();
break;
case "WindowBar":
control = new WindowBarDemo();
break;
default:
break;
}

View File

@ -120,15 +120,9 @@
<data name="button_color.IconSvg" xml:space="preserve">
<value>&lt;svg t="1724123315714" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4689" width="200" height="200"&gt;&lt;path d="M512 0C227.84 0 0 227.84 0 512s227.84 512 512 512 512-227.84 512-512S796.16 0 512 0z m0 977.408V46.592c256 0 465.408 209.408 465.408 465.408S768 977.408 512 977.408z" p-id="4690"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="button_color.ImageSvg" xml:space="preserve">
<value>&lt;svg t="1724123315714" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4689" width="200" height="200"&gt;&lt;path d="M512 0C227.84 0 0 227.84 0 512s227.84 512 512 512 512-227.84 512-512S796.16 0 512 0z m0 977.408V46.592c256 0 465.408 209.408 465.408 465.408S768 977.408 512 977.408z" p-id="4690"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="buttonSZ.IconSvg" xml:space="preserve">
<value>&lt;svg t="1724122928419" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2893" width="200" height="200"&gt;&lt;path d="M920.5 435.9c-7.6-40.3-36.1-66.8-69.8-66.2h-3.4c-36.6 0-66.3-29.7-66.3-66.3 0-7.8 3.6-19.1 6-24.9 15.4-35.1 3.3-78.1-28.9-100.6l-102-56.9-4.2-2c-31.7-13.7-72.7-5.4-96.4 19.2-15.1 15.6-42.2 33.7-54.6 33.7-12.5 0-39.8-18.5-54.9-34.3-23.6-24.9-62.2-34.4-97.4-19.5l-105.4 57.7-4.2 2.7c-31.7 22-43.8 65.3-28.3 100.1 1.9 4.6 6 16.7 6 24.9 0 36.6-29.7 66.3-66.3 66.3h-2.6c-34.9-0.6-63.1 25.8-70.7 66.2-0.9 4.8-8.9 48.2-8.9 84s8 79.2 8.9 84c7.5 39.6 35.3 66.2 69.2 66.2h4.1c36.6 0 66.3 29.7 66.3 66.3 0 8.2-4 20.3-5.8 24.5-15.6 35.2-3.6 78.4 28.9 101.2l99.8 56 4.1 2c10.5 4.6 21.8 6.9 33.6 6.9 24.5 0 47.8-9.9 63.7-27.3 14.8-16.1 43.5-35.8 55.8-35.8 12.8 0 40.8 19.7 56.1 36.5 15.8 17.4 39.8 27.8 64.2 27.8 11.6 0 22.6-2.2 34.3-7.3l103.2-56.9 4.2-2.7c31.6-22 43.7-65.2 28.1-100.4-1.9-4.6-5.9-16.5-5.9-24.6 0-36.6 29.7-66.3 66.3-66.3h4c34 0 61.7-26.4 69.2-65.9 0.1-0.5 9-46.3 9-84.4-0.1-35.9-8.1-79.1-9-83.9z m-71.3 154.6c-0.6 3.3-1.5 5.6-2.2 7.1-76.4 0.1-138.6 62.4-138.6 138.8 0 23 8.4 45.7 12.1 53.9 1.6 3.5 0.4 8.4-3.3 11.5l-96.4 53.3c-4.7 1.6-11.9-0.9-14.3-3.5-5.6-6.2-56.5-60.3-109.8-60.3-54 0-106.9 56.8-109.1 59.2-2.2 2.4-7.4 5.7-14.6 3.1l-93.1-52.1c-3.1-2.5-4.5-7.7-2.8-11.6 1.2-2.8 12-28.1 12-53.7 0-76.5-62.1-138.7-138.6-138.8-0.7-1.5-1.6-3.8-2.3-7.1-0.3-1.6-7.6-40.9-7.6-70.6 0-29.7 7.3-69 7.6-70.6 0.6-3.3 1.5-5.7 2.3-7.1 76.4-0.1 138.6-62.3 138.6-138.8 0-25-9.9-49.1-12.1-54-1.5-3.5-0.4-8.3 3.2-11.4l98.2-53.9c4.8-1.7 12.5 0.8 15 3.4 5.5 5.8 55.7 56.8 107.4 56.8 51.2 0 101.2-50 106.7-55.8 2.4-2.4 8.3-5.6 15.1-3.1l94.9 52.7c3.2 2.5 4.5 7.7 2.9 11.3l-0.7 1.8c-3.1 7.6-11.3 29.8-11.3 52.2 0 76.5 62.1 138.7 138.6 138.8 0.7 1.5 1.6 3.8 2.3 7.1 0.1 0.4 7.6 40.6 7.6 70.6-0.1 25.6-5.7 60.4-7.7 70.8z" p-id="2894"&gt;&lt;/path&gt;&lt;path d="M498.7 355.9c-90.3 0-163.8 73.5-163.8 163.8 0 90.3 73.5 163.8 163.8 163.8 90.3 0 163.8-73.5 163.8-163.8 0-90.4-73.5-163.8-163.8-163.8z m0 273.1c-60.3 0-109.4-49.1-109.4-109.4 0-60.3 49.1-109.4 109.4-109.4 60.3 0 109.4 49.1 109.4 109.4 0 60.3-49.1 109.4-109.4 109.4z" p-id="2895"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<data name="buttonSZ.ImageSvg" xml:space="preserve">
<value>&lt;svg t="1724122928419" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2893" width="200" height="200"&gt;&lt;path d="M920.5 435.9c-7.6-40.3-36.1-66.8-69.8-66.2h-3.4c-36.6 0-66.3-29.7-66.3-66.3 0-7.8 3.6-19.1 6-24.9 15.4-35.1 3.3-78.1-28.9-100.6l-102-56.9-4.2-2c-31.7-13.7-72.7-5.4-96.4 19.2-15.1 15.6-42.2 33.7-54.6 33.7-12.5 0-39.8-18.5-54.9-34.3-23.6-24.9-62.2-34.4-97.4-19.5l-105.4 57.7-4.2 2.7c-31.7 22-43.8 65.3-28.3 100.1 1.9 4.6 6 16.7 6 24.9 0 36.6-29.7 66.3-66.3 66.3h-2.6c-34.9-0.6-63.1 25.8-70.7 66.2-0.9 4.8-8.9 48.2-8.9 84s8 79.2 8.9 84c7.5 39.6 35.3 66.2 69.2 66.2h4.1c36.6 0 66.3 29.7 66.3 66.3 0 8.2-4 20.3-5.8 24.5-15.6 35.2-3.6 78.4 28.9 101.2l99.8 56 4.1 2c10.5 4.6 21.8 6.9 33.6 6.9 24.5 0 47.8-9.9 63.7-27.3 14.8-16.1 43.5-35.8 55.8-35.8 12.8 0 40.8 19.7 56.1 36.5 15.8 17.4 39.8 27.8 64.2 27.8 11.6 0 22.6-2.2 34.3-7.3l103.2-56.9 4.2-2.7c31.6-22 43.7-65.2 28.1-100.4-1.9-4.6-5.9-16.5-5.9-24.6 0-36.6 29.7-66.3 66.3-66.3h4c34 0 61.7-26.4 69.2-65.9 0.1-0.5 9-46.3 9-84.4-0.1-35.9-8.1-79.1-9-83.9z m-71.3 154.6c-0.6 3.3-1.5 5.6-2.2 7.1-76.4 0.1-138.6 62.4-138.6 138.8 0 23 8.4 45.7 12.1 53.9 1.6 3.5 0.4 8.4-3.3 11.5l-96.4 53.3c-4.7 1.6-11.9-0.9-14.3-3.5-5.6-6.2-56.5-60.3-109.8-60.3-54 0-106.9 56.8-109.1 59.2-2.2 2.4-7.4 5.7-14.6 3.1l-93.1-52.1c-3.1-2.5-4.5-7.7-2.8-11.6 1.2-2.8 12-28.1 12-53.7 0-76.5-62.1-138.7-138.6-138.8-0.7-1.5-1.6-3.8-2.3-7.1-0.3-1.6-7.6-40.9-7.6-70.6 0-29.7 7.3-69 7.6-70.6 0.6-3.3 1.5-5.7 2.3-7.1 76.4-0.1 138.6-62.3 138.6-138.8 0-25-9.9-49.1-12.1-54-1.5-3.5-0.4-8.3 3.2-11.4l98.2-53.9c4.8-1.7 12.5 0.8 15 3.4 5.5 5.8 55.7 56.8 107.4 56.8 51.2 0 101.2-50 106.7-55.8 2.4-2.4 8.3-5.6 15.1-3.1l94.9 52.7c3.2 2.5 4.5 7.7 2.9 11.3l-0.7 1.8c-3.1 7.6-11.3 29.8-11.3 52.2 0 76.5 62.1 138.7 138.6 138.8 0.7 1.5 1.6 3.8 2.3 7.1 0.1 0.4 7.6 40.6 7.6 70.6-0.1 25.6-5.7 60.4-7.7 70.8z" p-id="2894"&gt;&lt;/path&gt;&lt;path d="M498.7 355.9c-90.3 0-163.8 73.5-163.8 163.8 0 90.3 73.5 163.8 163.8 163.8 90.3 0 163.8-73.5 163.8-163.8 0-90.4-73.5-163.8-163.8-163.8z m0 273.1c-60.3 0-109.4-49.1-109.4-109.4 0-60.3 49.1-109.4 109.4-109.4 60.3 0 109.4 49.1 109.4 109.4 0 60.3-49.1 109.4-109.4 109.4z" p-id="2895"&gt;&lt;/path&gt;&lt;/svg&gt;</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -100,6 +100,16 @@ namespace AntdUIDemo.Properties {
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap logo {
get {
object obj = ResourceManager.GetObject("logo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>

View File

@ -130,6 +130,9 @@
<data name="head" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\head.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\assets\logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="关闭" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\关闭.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

204
Views/Image3DDemo.Designer.cs generated Normal file
View File

@ -0,0 +1,204 @@
namespace AntdUIDemo.Views
{
partial class Image3DDemo
{
/// <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.flowPanel1 = new AntdUI.FlowPanel();
this.image3D = new AntdUI.Image3D();
this.label3 = new AntdUI.Label();
this.flowPanel2 = new AntdUI.FlowPanel();
this.image3D_shadow = new AntdUI.Image3D();
this.image3D_V = new AntdUI.Image3D();
this.image3D_shadowV = new AntdUI.Image3D();
this.stackPanel1.SuspendLayout();
this.flowPanel1.SuspendLayout();
this.flowPanel2.SuspendLayout();
this.SuspendLayout();
//
// stackPanel1
//
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, 554);
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 = 61;
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 = 60;
//
// 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 = 59;
this.label2.Text = "显示3D图片";
//
// 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 = 58;
this.label1.Text = "Image3D 图片3D";
//
// flowPanel1
//
this.flowPanel1.Controls.Add(this.image3D_V);
this.flowPanel1.Controls.Add(this.image3D);
this.flowPanel1.Location = new System.Drawing.Point(3, 127);
this.flowPanel1.Name = "flowPanel1";
this.flowPanel1.Size = new System.Drawing.Size(694, 168);
this.flowPanel1.TabIndex = 62;
this.flowPanel1.Text = "flowPanel1";
//
// image3D
//
this.image3D.Image = global::AntdUIDemo.Properties.Resources.bg1;
this.image3D.Location = new System.Drawing.Point(3, 3);
this.image3D.Name = "image3D";
this.image3D.Radius = 6;
this.image3D.Size = new System.Drawing.Size(320, 162);
this.image3D.TabIndex = 0;
this.image3D.Text = "image3D1";
//
// 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, 301);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(694, 24);
this.label3.TabIndex = 64;
this.label3.Text = "阴影效果";
//
// flowPanel2
//
this.flowPanel2.Controls.Add(this.image3D_shadowV);
this.flowPanel2.Controls.Add(this.image3D_shadow);
this.flowPanel2.Location = new System.Drawing.Point(3, 331);
this.flowPanel2.Name = "flowPanel2";
this.flowPanel2.Size = new System.Drawing.Size(694, 168);
this.flowPanel2.TabIndex = 65;
this.flowPanel2.Text = "flowPanel2";
//
// image3D_shadow
//
this.image3D_shadow.Image = global::AntdUIDemo.Properties.Resources.bg1;
this.image3D_shadow.Location = new System.Drawing.Point(3, 3);
this.image3D_shadow.Name = "image3D_shadow";
this.image3D_shadow.Padding = new System.Windows.Forms.Padding(12);
this.image3D_shadow.Radius = 6;
this.image3D_shadow.Shadow = 12;
this.image3D_shadow.Size = new System.Drawing.Size(320, 162);
this.image3D_shadow.TabIndex = 2;
this.image3D_shadow.Text = "image3D2";
//
// image3D_V
//
this.image3D_V.Duration = 200;
this.image3D_V.Image = global::AntdUIDemo.Properties.Resources.bg1;
this.image3D_V.Location = new System.Drawing.Point(329, 3);
this.image3D_V.Name = "image3D_V";
this.image3D_V.Radius = 6;
this.image3D_V.Size = new System.Drawing.Size(320, 162);
this.image3D_V.TabIndex = 1;
this.image3D_V.Text = "image3D1";
this.image3D_V.Vertical = true;
//
// image3D_shadowV
//
this.image3D_shadowV.Duration = 200;
this.image3D_shadowV.Image = global::AntdUIDemo.Properties.Resources.bg1;
this.image3D_shadowV.Location = new System.Drawing.Point(329, 3);
this.image3D_shadowV.Name = "image3D_shadowV";
this.image3D_shadowV.Padding = new System.Windows.Forms.Padding(12);
this.image3D_shadowV.Radius = 6;
this.image3D_shadowV.Shadow = 12;
this.image3D_shadowV.Size = new System.Drawing.Size(320, 162);
this.image3D_shadowV.TabIndex = 3;
this.image3D_shadowV.Text = "image3D2";
this.image3D_shadowV.Vertical = true;
//
// Image3DDemo
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.stackPanel1);
this.Name = "Image3DDemo";
this.Size = new System.Drawing.Size(700, 554);
this.stackPanel1.ResumeLayout(false);
this.flowPanel1.ResumeLayout(false);
this.flowPanel2.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.FlowPanel flowPanel1;
private AntdUI.Image3D image3D;
private AntdUI.FlowPanel flowPanel2;
private AntdUI.Image3D image3D_shadow;
private AntdUI.Label label3;
private AntdUI.Image3D image3D_shadowV;
private AntdUI.Image3D image3D_V;
}
}

50
Views/Image3DDemo.cs Normal file
View File

@ -0,0 +1,50 @@
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 Image3DDemo : UserControl
{
Random random = new Random();
public Image3DDemo()
{
InitializeComponent();
BindEventHandler();
}
private void BindEventHandler()
{
image3D.Click += Image3D_Click;
image3D_shadow.Click += Image3D_Click;
image3D_V.Click += Image3D_Click;
image3D_shadowV.Click += Image3D_Click;
}
private void Image3D_Click(object sender, EventArgs e)
{
var image = (AntdUI.Image3D)sender;
var num = random.Next(1, 4);
switch (num)
{
case 1:
image.Image = Properties.Resources.bg1;
break;
case 2:
image.Image = Properties.Resources.bg2;
break;
case 3:
image.Image = Properties.Resources.bg3;
break;
default:
break;
}
}
}
}

120
Views/Image3DDemo.resx Normal file
View 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>

View File

@ -30,10 +30,10 @@
{
this.stackPanel1 = new AntdUI.StackPanel();
this.panel1 = new AntdUI.Panel();
this.msgList = new AntdUI.Chat.MsgList();
this.divider1 = new AntdUI.Divider();
this.label2 = new AntdUI.Label();
this.label1 = new AntdUI.Label();
this.msgList = new AntdUI.Chat.MsgList();
this.stackPanel1.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
@ -62,6 +62,15 @@
this.panel1.TabIndex = 32;
this.panel1.Text = "panel1";
//
// msgList
//
this.msgList.Dock = System.Windows.Forms.DockStyle.Left;
this.msgList.Location = new System.Drawing.Point(12, 12);
this.msgList.Name = "msgList";
this.msgList.Size = new System.Drawing.Size(220, 347);
this.msgList.TabIndex = 0;
this.msgList.Text = "msgList1";
//
// divider1
//
this.divider1.Location = new System.Drawing.Point(3, 79);
@ -76,7 +85,7 @@
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(694, 24);
this.label2.TabIndex = 30;
this.label2.Text = "气泡聊天列表。";
this.label2.Text = "好友消息列表。";
//
// label1
//
@ -85,16 +94,7 @@
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(694, 40);
this.label1.TabIndex = 29;
this.label1.Text = "ChatList 气泡聊天列表";
//
// msgList
//
this.msgList.Dock = System.Windows.Forms.DockStyle.Left;
this.msgList.Location = new System.Drawing.Point(12, 12);
this.msgList.Name = "msgList";
this.msgList.Size = new System.Drawing.Size(220, 347);
this.msgList.TabIndex = 0;
this.msgList.Text = "msgList1";
this.label1.Text = "MsgList 好友消息列表";
//
// MsgListDemo
//

View File

@ -89,27 +89,27 @@ namespace AntdUIDemo.Views
{
case "TL":
align = TAlignFrom.TL;
AntdUI.Notification.open(window, $"Notification {align}", "Hello AntdUI Demo!", autoClose: 3, align: align);
AntdUI.Notification.info(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);
AntdUI.Notification.info(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);
AntdUI.Notification.info(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);
AntdUI.Notification.info(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);
AntdUI.Notification.info(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);
AntdUI.Notification.info(window, $"Notification {align}", "Hello AntdUI Demo!", autoClose: 3, align: align);
break;
}
}

205
Views/WindowBarDemo.Designer.cs generated Normal file
View File

@ -0,0 +1,205 @@
namespace AntdUIDemo.Views
{
partial class WindowBarDemo
{
/// <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.windowBar1 = new AntdUI.WindowBar();
this.label3 = new AntdUI.Label();
this.windowBar2 = new AntdUI.WindowBar();
this.label5 = new AntdUI.Label();
this.windowBar3 = new AntdUI.WindowBar();
this.label6 = new AntdUI.Label();
this.windowBar4 = new AntdUI.WindowBar();
this.stackPanel1.SuspendLayout();
this.SuspendLayout();
//
// stackPanel1
//
this.stackPanel1.Controls.Add(this.windowBar4);
this.stackPanel1.Controls.Add(this.label6);
this.stackPanel1.Controls.Add(this.windowBar3);
this.stackPanel1.Controls.Add(this.label5);
this.stackPanel1.Controls.Add(this.windowBar2);
this.stackPanel1.Controls.Add(this.label3);
this.stackPanel1.Controls.Add(this.windowBar1);
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, 527);
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 = 65;
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 = 64;
//
// 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 = 63;
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 = 62;
this.label1.Text = "WindowBar 窗口栏";
//
// windowBar1
//
this.windowBar1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.windowBar1.Icon = global::AntdUIDemo.Properties.Resources.logo;
this.windowBar1.IsMax = false;
this.windowBar1.Location = new System.Drawing.Point(3, 127);
this.windowBar1.Name = "windowBar1";
this.windowBar1.Size = new System.Drawing.Size(694, 32);
this.windowBar1.SubText = "Demo";
this.windowBar1.TabIndex = 66;
this.windowBar1.Text = "WindowBar";
//
// 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, 165);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(694, 24);
this.label3.TabIndex = 68;
this.label3.Text = "加载状态";
//
// windowBar2
//
this.windowBar2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.windowBar2.Icon = global::AntdUIDemo.Properties.Resources.logo;
this.windowBar2.IsMax = false;
this.windowBar2.Loading = true;
this.windowBar2.Location = new System.Drawing.Point(3, 195);
this.windowBar2.Name = "windowBar2";
this.windowBar2.Size = new System.Drawing.Size(694, 32);
this.windowBar2.TabIndex = 69;
this.windowBar2.Text = "WindowBar";
//
// 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, 233);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(694, 24);
this.label5.TabIndex = 70;
this.label5.Text = "禁用最大/小化";
//
// windowBar3
//
this.windowBar3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.windowBar3.Icon = global::AntdUIDemo.Properties.Resources.logo;
this.windowBar3.IsMax = false;
this.windowBar3.Location = new System.Drawing.Point(3, 263);
this.windowBar3.MaximizeBox = false;
this.windowBar3.MinimizeBox = false;
this.windowBar3.Name = "windowBar3";
this.windowBar3.Size = new System.Drawing.Size(694, 32);
this.windowBar3.TabIndex = 71;
this.windowBar3.Text = "WindowBar";
//
// 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, 301);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(694, 24);
this.label6.TabIndex = 72;
this.label6.Text = "线条样式";
//
// windowBar4
//
this.windowBar4.DividerColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34)))));
this.windowBar4.DividerMargin = 120;
this.windowBar4.DividerShow = true;
this.windowBar4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.windowBar4.Icon = global::AntdUIDemo.Properties.Resources.logo;
this.windowBar4.IsMax = false;
this.windowBar4.Location = new System.Drawing.Point(3, 331);
this.windowBar4.Name = "windowBar4";
this.windowBar4.Size = new System.Drawing.Size(694, 32);
this.windowBar4.TabIndex = 73;
this.windowBar4.Text = "WindowBar";
//
// WindowBarDemo
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.stackPanel1);
this.Name = "WindowBarDemo";
this.Size = new System.Drawing.Size(700, 527);
this.stackPanel1.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.WindowBar windowBar1;
private AntdUI.Label label6;
private AntdUI.WindowBar windowBar3;
private AntdUI.Label label5;
private AntdUI.WindowBar windowBar2;
private AntdUI.Label label3;
private AntdUI.WindowBar windowBar4;
}
}

20
Views/WindowBarDemo.cs Normal file
View 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 WindowBarDemo : UserControl
{
public WindowBarDemo()
{
InitializeComponent();
}
}
}

120
Views/WindowBarDemo.resx Normal file
View 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>