mirror of
https://gitee.com/AntdUI/AntdUI.git
synced 2026-03-19 12:10:44 +08:00
🦄 Beautiful AntdUI
This commit is contained in:
2
example/ChatUI/Main.Designer.cs
generated
2
example/ChatUI/Main.Designer.cs
generated
@@ -101,7 +101,7 @@
|
||||
Margin = new Padding(2);
|
||||
Name = "Main";
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "Form1";
|
||||
Text = "ChatUI";
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace ChatUI
|
||||
static void Main()
|
||||
{
|
||||
AntdUI.Config.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
||||
Application.Run(new Main());
|
||||
}
|
||||
|
||||
251
example/Demo/Controls/Tour.Designer.cs
generated
Normal file
251
example/Demo/Controls/Tour.Designer.cs
generated
Normal file
@@ -0,0 +1,251 @@
|
||||
// COPYRIGHT (C) Tom. ALL RIGHTS RESERVED.
|
||||
// THE AntdUI PROJECT IS AN WINFORM LIBRARY LICENSED UNDER THE Apache-2.0 License.
|
||||
// LICENSED UNDER THE Apache License, VERSION 2.0 (THE "License")
|
||||
// YOU MAY NOT USE THIS FILE EXCEPT IN COMPLIANCE WITH THE License.
|
||||
// YOU MAY OBTAIN A COPY OF THE LICENSE AT
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
|
||||
// DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
// SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
|
||||
// LIMITATIONS UNDER THE License.
|
||||
// GITEE: https://gitee.com/antdui/AntdUI
|
||||
// GITHUB: https://github.com/AntdUI/AntdUI
|
||||
// CSDN: https://blog.csdn.net/v_132
|
||||
// QQ: 17379620
|
||||
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Demo.Controls
|
||||
{
|
||||
partial class Tour
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
header1 = new AntdUI.PageHeader();
|
||||
panel_main = new System.Windows.Forms.Panel();
|
||||
panel5 = new System.Windows.Forms.Panel();
|
||||
button1 = new AntdUI.Button();
|
||||
button2 = new AntdUI.Button();
|
||||
button7 = new AntdUI.Button();
|
||||
button8 = new AntdUI.Button();
|
||||
button3 = new AntdUI.Button();
|
||||
button4 = new AntdUI.Button();
|
||||
button5 = new AntdUI.Button();
|
||||
button6 = new AntdUI.Button();
|
||||
panel_main.SuspendLayout();
|
||||
panel5.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// header1
|
||||
//
|
||||
header1.Description = "用于分步引导用户了解产品功能的气泡组件。";
|
||||
header1.Dock = DockStyle.Top;
|
||||
header1.Font = new Font("Microsoft YaHei UI", 12F);
|
||||
header1.LocalizationDescription = "Tour.Description";
|
||||
header1.LocalizationText = "Tour.Text";
|
||||
header1.Location = new Point(0, 0);
|
||||
header1.Name = "header1";
|
||||
header1.Padding = new Padding(0, 0, 0, 10);
|
||||
header1.Size = new Size(845, 74);
|
||||
header1.TabIndex = 0;
|
||||
header1.Text = "Tour 漫游式引导";
|
||||
header1.UseTitleFont = true;
|
||||
//
|
||||
// panel_main
|
||||
//
|
||||
panel_main.AutoScroll = true;
|
||||
panel_main.Controls.Add(panel5);
|
||||
panel_main.Dock = DockStyle.Fill;
|
||||
panel_main.Location = new Point(0, 74);
|
||||
panel_main.Name = "panel_main";
|
||||
panel_main.Size = new Size(845, 687);
|
||||
panel_main.TabIndex = 6;
|
||||
//
|
||||
// panel5
|
||||
//
|
||||
panel5.Controls.Add(button1);
|
||||
panel5.Controls.Add(button2);
|
||||
panel5.Controls.Add(button7);
|
||||
panel5.Controls.Add(button8);
|
||||
panel5.Controls.Add(button3);
|
||||
panel5.Controls.Add(button4);
|
||||
panel5.Controls.Add(button5);
|
||||
panel5.Controls.Add(button6);
|
||||
panel5.Dock = DockStyle.Top;
|
||||
panel5.Location = new Point(0, 0);
|
||||
panel5.Name = "panel5";
|
||||
panel5.Size = new Size(845, 111);
|
||||
panel5.TabIndex = 4;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
button1.AutoSizeMode = AntdUI.TAutoSize.Auto;
|
||||
button1.BorderWidth = 1F;
|
||||
button1.IconSvg = "SearchOutlined";
|
||||
button1.Location = new Point(3, 3);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new Size(115, 47);
|
||||
button1.TabIndex = 0;
|
||||
button1.Text = "Button";
|
||||
button1.Type = AntdUI.TTypeMini.Primary;
|
||||
button1.Click += Btn;
|
||||
//
|
||||
// button2
|
||||
//
|
||||
button2.AutoSizeMode = AntdUI.TAutoSize.Auto;
|
||||
button2.BorderWidth = 1F;
|
||||
button2.IconPosition = AntdUI.TAlignMini.Right;
|
||||
button2.Location = new Point(124, 3);
|
||||
button2.Name = "button2";
|
||||
button2.Size = new Size(87, 47);
|
||||
button2.TabIndex = 1;
|
||||
button2.Text = "Button";
|
||||
button2.Type = AntdUI.TTypeMini.Primary;
|
||||
button2.Click += Btn;
|
||||
//
|
||||
// button7
|
||||
//
|
||||
button7.AutoSizeMode = AntdUI.TAutoSize.Auto;
|
||||
button7.BorderWidth = 1F;
|
||||
button7.IconSvg = "SearchOutlined";
|
||||
button7.Location = new Point(3, 56);
|
||||
button7.Name = "button7";
|
||||
button7.Size = new Size(115, 47);
|
||||
button7.TabIndex = 6;
|
||||
button7.Text = "Button";
|
||||
button7.Click += Btn;
|
||||
//
|
||||
// button8
|
||||
//
|
||||
button8.AutoSizeMode = AntdUI.TAutoSize.Auto;
|
||||
button8.BorderWidth = 1F;
|
||||
button8.IconPosition = AntdUI.TAlignMini.Right;
|
||||
button8.Location = new Point(124, 56);
|
||||
button8.Name = "button8";
|
||||
button8.Size = new Size(87, 47);
|
||||
button8.TabIndex = 7;
|
||||
button8.Text = "Button";
|
||||
button8.Click += Btn;
|
||||
//
|
||||
// button3
|
||||
//
|
||||
button3.AutoSizeMode = AntdUI.TAutoSize.Auto;
|
||||
button3.BorderWidth = 1F;
|
||||
button3.IconPosition = AntdUI.TAlignMini.Top;
|
||||
button3.IconSvg = "SearchOutlined";
|
||||
button3.LoadingWaveCount = 4;
|
||||
button3.LoadingWaveSize = 6;
|
||||
button3.LoadingWaveVertical = true;
|
||||
button3.Location = new Point(245, 3);
|
||||
button3.Name = "button3";
|
||||
button3.Size = new Size(115, 75);
|
||||
button3.TabIndex = 2;
|
||||
button3.Text = "Button";
|
||||
button3.Type = AntdUI.TTypeMini.Primary;
|
||||
button3.Click += Btn;
|
||||
//
|
||||
// button4
|
||||
//
|
||||
button4.AutoSizeMode = AntdUI.TAutoSize.Auto;
|
||||
button4.BorderWidth = 1F;
|
||||
button4.IconPosition = AntdUI.TAlignMini.Bottom;
|
||||
button4.IconSvg = "SearchOutlined";
|
||||
button4.LoadingWaveCount = 4;
|
||||
button4.LoadingWaveSize = 6;
|
||||
button4.LoadingWaveVertical = true;
|
||||
button4.Location = new Point(366, 3);
|
||||
button4.Name = "button4";
|
||||
button4.Size = new Size(115, 75);
|
||||
button4.TabIndex = 3;
|
||||
button4.Text = "Button";
|
||||
button4.Type = AntdUI.TTypeMini.Primary;
|
||||
button4.Click += Btn;
|
||||
//
|
||||
// button5
|
||||
//
|
||||
button5.AutoSizeMode = AntdUI.TAutoSize.Auto;
|
||||
button5.BorderWidth = 1F;
|
||||
button5.IconPosition = AntdUI.TAlignMini.Top;
|
||||
button5.IconSvg = "SearchOutlined";
|
||||
button5.LoadingWaveCount = 4;
|
||||
button5.LoadingWaveSize = 6;
|
||||
button5.LoadingWaveVertical = true;
|
||||
button5.Location = new Point(487, 3);
|
||||
button5.Name = "button5";
|
||||
button5.Size = new Size(115, 75);
|
||||
button5.TabIndex = 4;
|
||||
button5.Text = "Button";
|
||||
button5.Click += Btn;
|
||||
//
|
||||
// button6
|
||||
//
|
||||
button6.AutoSizeMode = AntdUI.TAutoSize.Auto;
|
||||
button6.BorderWidth = 1F;
|
||||
button6.IconPosition = AntdUI.TAlignMini.Bottom;
|
||||
button6.IconSvg = "SearchOutlined";
|
||||
button6.LoadingWaveCount = 4;
|
||||
button6.LoadingWaveSize = 6;
|
||||
button6.LoadingWaveVertical = true;
|
||||
button6.Location = new Point(608, 3);
|
||||
button6.Name = "button6";
|
||||
button6.Size = new Size(115, 75);
|
||||
button6.TabIndex = 5;
|
||||
button6.Text = "Button";
|
||||
button6.Click += Btn;
|
||||
//
|
||||
// Tour
|
||||
//
|
||||
Controls.Add(panel_main);
|
||||
Controls.Add(header1);
|
||||
Font = new Font("Microsoft YaHei UI", 12F);
|
||||
Name = "Tour";
|
||||
Size = new Size(845, 761);
|
||||
panel_main.ResumeLayout(false);
|
||||
panel5.ResumeLayout(false);
|
||||
panel5.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private AntdUI.PageHeader header1;
|
||||
private System.Windows.Forms.Panel panel_main;
|
||||
private System.Windows.Forms.Panel panel5;
|
||||
private AntdUI.Button button1;
|
||||
private AntdUI.Button button2;
|
||||
private AntdUI.Button button3;
|
||||
private AntdUI.Button button4;
|
||||
private AntdUI.Button button7;
|
||||
private AntdUI.Button button8;
|
||||
private AntdUI.Button button5;
|
||||
private AntdUI.Button button6;
|
||||
}
|
||||
}
|
||||
132
example/Demo/Controls/Tour.cs
Normal file
132
example/Demo/Controls/Tour.cs
Normal file
@@ -0,0 +1,132 @@
|
||||
// COPYRIGHT (C) Tom. ALL RIGHTS RESERVED.
|
||||
// THE AntdUI PROJECT IS AN WINFORM LIBRARY LICENSED UNDER THE Apache-2.0 License.
|
||||
// LICENSED UNDER THE Apache License, VERSION 2.0 (THE "License")
|
||||
// YOU MAY NOT USE THIS FILE EXCEPT IN COMPLIANCE WITH THE License.
|
||||
// YOU MAY OBTAIN A COPY OF THE LICENSE AT
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
|
||||
// DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
// SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
|
||||
// LIMITATIONS UNDER THE License.
|
||||
// GITEE: https://gitee.com/antdui/AntdUI
|
||||
// GITHUB: https://github.com/AntdUI/AntdUI
|
||||
// CSDN: https://blog.csdn.net/v_132
|
||||
// QQ: 17379620
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Demo.Controls
|
||||
{
|
||||
public partial class Tour : UserControl
|
||||
{
|
||||
Form form;
|
||||
public Tour(Form _form)
|
||||
{
|
||||
form = _form;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
Random random = new Random();
|
||||
AntdUI.TourForm tourForm;
|
||||
private void Btn(object sender, EventArgs e)
|
||||
{
|
||||
if (sender == button3)
|
||||
{
|
||||
OpenTour(button1);
|
||||
return;
|
||||
}
|
||||
AntdUI.Button btn = (AntdUI.Button)sender;
|
||||
if (tourForm == null) OpenTour(btn);
|
||||
else
|
||||
{
|
||||
btn.LoadingWaveValue = 0;
|
||||
if (random.Next(0, 10) > 3)
|
||||
{
|
||||
btn.Loading = true;
|
||||
AntdUI.ITask.Run(() =>
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
for (int i = 0; i < 101; i++)
|
||||
{
|
||||
btn.LoadingWaveValue = i / 100F;
|
||||
Thread.Sleep(20);
|
||||
}
|
||||
Thread.Sleep(2000);
|
||||
}, () =>
|
||||
{
|
||||
if (btn.IsDisposed) return;
|
||||
btn.Loading = false;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
btn.Loading = true;
|
||||
AntdUI.ITask.Run(() =>
|
||||
{
|
||||
Thread.Sleep(2000);
|
||||
if (btn.IsDisposed) return;
|
||||
btn.Loading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OpenTour(AntdUI.Button btn)
|
||||
{
|
||||
if (tourForm == null)
|
||||
{
|
||||
Form popover = null;
|
||||
tourForm = AntdUI.Tour.open(new AntdUI.Tour.Config(form, item =>
|
||||
{
|
||||
switch (item.Index)
|
||||
{
|
||||
case 0:
|
||||
item.Set(btn);
|
||||
break;
|
||||
case 1:
|
||||
item.Set(button2);
|
||||
break;
|
||||
case 2:
|
||||
item.Set(button7);
|
||||
break;
|
||||
case 3:
|
||||
item.Set(button8);
|
||||
break;
|
||||
case 4:
|
||||
item.Set(button3);
|
||||
break;
|
||||
case 5:
|
||||
item.Set(button4);
|
||||
break;
|
||||
case 6:
|
||||
item.Set(button5);
|
||||
break;
|
||||
case 7:
|
||||
item.Set(button6);
|
||||
break;
|
||||
case 8:
|
||||
var rect = form.ClientRectangle;
|
||||
item.Set(new Rectangle(rect.X + (rect.Width - 200) / 2, rect.Y + (rect.Height - 200) / 2, 200, 200));
|
||||
break;
|
||||
default:
|
||||
item.Close();
|
||||
tourForm = null;
|
||||
break;
|
||||
}
|
||||
}, info =>
|
||||
{
|
||||
popover?.Close();
|
||||
popover = null;
|
||||
if (info.Rect.HasValue) popover = AntdUI.Popover.open(new AntdUI.Popover.Config(info.Form, new TourPopover(info, info.Index == 8 ? "DIV Rectangle" : "Button " + (info.Index + 1), "Tour Step " + (info.Index + 1), (info.Index + 1), 9)) { Offset = info.Rect.Value, Focus = false });
|
||||
}));
|
||||
}
|
||||
else tourForm.Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
example/Demo/Controls/Tour.resx
Normal file
120
example/Demo/Controls/Tour.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>
|
||||
148
example/Demo/Controls/TourPopover.Designer.cs
generated
Normal file
148
example/Demo/Controls/TourPopover.Designer.cs
generated
Normal file
@@ -0,0 +1,148 @@
|
||||
// COPYRIGHT (C) Tom. ALL RIGHTS RESERVED.
|
||||
// THE AntdUI PROJECT IS AN WINFORM LIBRARY LICENSED UNDER THE Apache-2.0 License.
|
||||
// LICENSED UNDER THE Apache License, VERSION 2.0 (THE "License")
|
||||
// YOU MAY NOT USE THIS FILE EXCEPT IN COMPLIANCE WITH THE License.
|
||||
// YOU MAY OBTAIN A COPY OF THE LICENSE AT
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
|
||||
// DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
// SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
|
||||
// LIMITATIONS UNDER THE License.
|
||||
// GITEE: https://gitee.com/antdui/AntdUI
|
||||
// GITHUB: https://github.com/AntdUI/AntdUI
|
||||
// CSDN: https://blog.csdn.net/v_132
|
||||
// QQ: 17379620
|
||||
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Demo.Controls
|
||||
{
|
||||
partial class TourPopover
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
label1 = new AntdUI.Label();
|
||||
label2 = new AntdUI.Label();
|
||||
label3 = new AntdUI.Label();
|
||||
btn_previous = new AntdUI.Button();
|
||||
btn_next = new AntdUI.Button();
|
||||
panel1 = new AntdUI.Panel();
|
||||
panel1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.Dock = DockStyle.Top;
|
||||
label1.Font = new Font("Microsoft YaHei UI", 16F, FontStyle.Bold);
|
||||
label1.Location = new Point(0, 0);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new Size(168, 36);
|
||||
label1.TabIndex = 0;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.BackColor = Color.Transparent;
|
||||
label2.Dock = DockStyle.Fill;
|
||||
label2.Location = new Point(0, 0);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new Size(28, 39);
|
||||
label2.TabIndex = 0;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.Dock = DockStyle.Fill;
|
||||
label3.Font = new Font("Microsoft YaHei UI", 12F);
|
||||
label3.Location = new Point(0, 36);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new Size(168, 71);
|
||||
label3.TabIndex = 0;
|
||||
//
|
||||
// btn_previous
|
||||
//
|
||||
btn_previous.AutoSizeMode = AntdUI.TAutoSize.Width;
|
||||
btn_previous.BorderWidth = 1F;
|
||||
btn_previous.Dock = DockStyle.Right;
|
||||
btn_previous.LocalizationText = "Previous";
|
||||
btn_previous.Location = new Point(28, 0);
|
||||
btn_previous.Name = "btn_previous";
|
||||
btn_previous.Size = new Size(70, 39);
|
||||
btn_previous.TabIndex = 2;
|
||||
btn_previous.Text = "上一页";
|
||||
btn_previous.Click += btn_previous_Click;
|
||||
//
|
||||
// btn_next
|
||||
//
|
||||
btn_next.AutoSizeMode = AntdUI.TAutoSize.Width;
|
||||
btn_next.BorderWidth = 1F;
|
||||
btn_next.Dock = DockStyle.Right;
|
||||
btn_next.LocalizationText = "Next";
|
||||
btn_next.Location = new Point(98, 0);
|
||||
btn_next.Name = "btn_next";
|
||||
btn_next.Size = new Size(70, 39);
|
||||
btn_next.TabIndex = 1;
|
||||
btn_next.Text = "下一页";
|
||||
btn_next.Type = AntdUI.TTypeMini.Primary;
|
||||
btn_next.Click += btn_next_Click;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
panel1.Controls.Add(label2);
|
||||
panel1.Controls.Add(btn_previous);
|
||||
panel1.Controls.Add(btn_next);
|
||||
panel1.Dock = DockStyle.Bottom;
|
||||
panel1.Location = new Point(0, 107);
|
||||
panel1.Name = "panel1";
|
||||
panel1.Radius = 0;
|
||||
panel1.Size = new Size(168, 39);
|
||||
panel1.TabIndex = 2;
|
||||
//
|
||||
// TourPopover
|
||||
//
|
||||
Controls.Add(label3);
|
||||
Controls.Add(panel1);
|
||||
Controls.Add(label1);
|
||||
Name = "TourPopover";
|
||||
Size = new Size(168, 146);
|
||||
panel1.ResumeLayout(false);
|
||||
panel1.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private AntdUI.Label label1;
|
||||
private AntdUI.Label label2;
|
||||
private AntdUI.Label label3;
|
||||
private AntdUI.Button btn_previous;
|
||||
private AntdUI.Button btn_next;
|
||||
private AntdUI.Panel panel1;
|
||||
}
|
||||
}
|
||||
51
example/Demo/Controls/TourPopover.cs
Normal file
51
example/Demo/Controls/TourPopover.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
// COPYRIGHT (C) Tom. ALL RIGHTS RESERVED.
|
||||
// THE AntdUI PROJECT IS AN WINFORM LIBRARY LICENSED UNDER THE Apache-2.0 License.
|
||||
// LICENSED UNDER THE Apache License, VERSION 2.0 (THE "License")
|
||||
// YOU MAY NOT USE THIS FILE EXCEPT IN COMPLIANCE WITH THE License.
|
||||
// YOU MAY OBTAIN A COPY OF THE LICENSE AT
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
|
||||
// DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
// SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
|
||||
// LIMITATIONS UNDER THE License.
|
||||
// GITEE: https://gitee.com/antdui/AntdUI
|
||||
// GITHUB: https://github.com/AntdUI/AntdUI
|
||||
// CSDN: https://blog.csdn.net/v_132
|
||||
// QQ: 17379620
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Demo.Controls
|
||||
{
|
||||
public partial class TourPopover : UserControl
|
||||
{
|
||||
AntdUI.Tour.Popover popover;
|
||||
public TourPopover(AntdUI.Tour.Popover _popover, string title, string text, int step, int max)
|
||||
{
|
||||
popover = _popover;
|
||||
InitializeComponent();
|
||||
label1.Text = title;
|
||||
label3.Text = text;
|
||||
label2.Text = step + " / " + max;
|
||||
if (step == max)
|
||||
{
|
||||
btn_next.LocalizationText = "Finish";
|
||||
btn_next.Text = "<22><><EFBFBD><EFBFBD>";
|
||||
}
|
||||
btn_previous.Visible = step > 1;
|
||||
if (btn_previous.Visible)
|
||||
{
|
||||
int w1 = (int)(label1.PSize.Width / AntdUI.Config.Dpi), w = (int)((label2.PSize.Width + btn_previous.PSize.Width + btn_next.PSize.Width) / AntdUI.Config.Dpi);
|
||||
Width = w1 > w ? w1 : w;
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_previous_Click(object sender, EventArgs e) => popover.Tour.Previous();
|
||||
|
||||
private void btn_next_Click(object sender, EventArgs e) => popover.Tour.Next();
|
||||
}
|
||||
}
|
||||
@@ -74,6 +74,13 @@ namespace Demo
|
||||
case "ScrollBarHidden":
|
||||
return "ScrollBar Hidden Style";
|
||||
|
||||
case "Previous":
|
||||
return "Previous";
|
||||
case "Next":
|
||||
return "Next";
|
||||
case "Finish":
|
||||
return "Finish";
|
||||
|
||||
//Alert ----------------------------
|
||||
case "Alert.Text":
|
||||
return "Alert";
|
||||
@@ -549,6 +556,12 @@ namespace Demo
|
||||
case "Tooltip.label4":
|
||||
return "Simplest usage";
|
||||
|
||||
//Tour ----------------------------
|
||||
case "Tour.Text":
|
||||
return "Tour";
|
||||
case "Tour.Description":
|
||||
return "A popup component for guiding users through a product.";
|
||||
|
||||
//Tree ----------------------------
|
||||
case "Tree.Text":
|
||||
return "Tree";
|
||||
|
||||
Binary file not shown.
9
example/Demo/res_dark.Designer.cs
generated
9
example/Demo/res_dark.Designer.cs
generated
@@ -447,6 +447,15 @@ namespace Demo {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 <svg viewBox="0 0 173 102" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="组件骨架图更新_202311" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="🎉-5.0-新版---黑" transform="translate(-897.000000, -3969.000000)"><g id="cc3fcbfa-bf5b-4c8c-8a3d-c3f8388c75e8" transform="translate(897.000000, 3969.000000)"><path d="M27.3015827,0.481523055 C27.3793404,0.54817244 27.4518638,0.620695897 27.5185132,0.698453513 L30.0476259,3.64908497 C30.1294246,3.74451681 30.2137064,3.8372747 30.3003347,3.92729583 L1 [字符串的其余部分被截断]"; 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Tour {
|
||||
get {
|
||||
return ResourceManager.GetString("Tour", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 <svg viewBox="0 0 96 92" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="组件骨架图更新" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="🎉-5.0-新版---黑" transform="translate(-1302.000000, -3974.000000)"><g id="Tree" transform="translate(1302.000000, 3974.000000)"><g id="编组-15"><g id="编组-12" transform="translate(0.000000, 4.556962)"><rect id="矩形" x="0" y="0" width="9.11392405" height="6.07594937"></rect><path d="M7.36230459,4.76344426 L4.61669573,1.58717625 C4.53810644,1.49625892 4.38678025,1 [字符串的其余部分被截断]"; 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
File diff suppressed because one or more lines are too long
9
example/Demo/res_light.Designer.cs
generated
9
example/Demo/res_light.Designer.cs
generated
@@ -447,6 +447,15 @@ namespace Demo {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 <svg viewBox="0 0 175 104" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="组件骨架图更新_202311" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="🎉-5.0-新版---白" transform="translate(-896.000000, -3968.000000)" fill-rule="nonzero"><g id="cc3fcbfa-bf5b-4c8c-8a3d-c3f8388c75e8" transform="translate(897.000000, 3969.000000)"><path d="M27.3015827,0.481523055 C27.3793404,0.54817244 27.4518638,0.620695897 27.5185132,0.698453513 L30.0476259,3.64908497 C30.1294246,3.74451681 30.2137064,3.8372747 30.3 [字符串的其余部分被截断]"; 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string Tour {
|
||||
get {
|
||||
return ResourceManager.GetString("Tour", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 <svg viewBox="0 0 91 92" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="组件骨架图更新" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="🎉-5.0-新版" transform="translate(-1302.000000, -3974.000000)"><g id="Tree" transform="translate(1302.000000, 3974.000000)"><g id="编组-15"><g id="编组-12" transform="translate(0.000000, 4.556962)"><rect id="矩形" x="0" y="0" width="9.11392405" height="6.07594937"></rect><path d="M7.36230459,4.76344426 L4.61669573,1.58717625 C4.53810644,1.49625892 4.38678025,1.496 [字符串的其余部分被截断]"; 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user