升级1.8.9,新增Tour
This commit is contained in:
Generated
+14
-15
@@ -29,8 +29,8 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.panel1 = new AntdUI.Panel();
|
||||
this.pageHeader = new AntdUI.PageHeader();
|
||||
this.button_close = new AntdUI.Button();
|
||||
this.pageHeader = new AntdUI.PageHeader();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -46,19 +46,6 @@
|
||||
this.panel1.TabIndex = 0;
|
||||
this.panel1.Text = "panel1";
|
||||
//
|
||||
// pageHeader
|
||||
//
|
||||
this.pageHeader.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pageHeader.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
this.pageHeader.Location = new System.Drawing.Point(6, 6);
|
||||
this.pageHeader.MaximizeBox = false;
|
||||
this.pageHeader.MinimizeBox = false;
|
||||
this.pageHeader.Name = "pageHeader";
|
||||
this.pageHeader.ShowIcon = false;
|
||||
this.pageHeader.Size = new System.Drawing.Size(488, 32);
|
||||
this.pageHeader.TabIndex = 1;
|
||||
this.pageHeader.Text = "DrawerDemo";
|
||||
//
|
||||
// button_close
|
||||
//
|
||||
this.button_close.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
@@ -69,9 +56,21 @@
|
||||
this.button_close.Text = "关闭";
|
||||
this.button_close.Type = AntdUI.TTypeMini.Error;
|
||||
//
|
||||
// pageHeader
|
||||
//
|
||||
this.pageHeader.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pageHeader.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
|
||||
this.pageHeader.Location = new System.Drawing.Point(6, 6);
|
||||
this.pageHeader.MaximizeBox = false;
|
||||
this.pageHeader.MinimizeBox = false;
|
||||
this.pageHeader.Name = "pageHeader";
|
||||
this.pageHeader.ShowButton = true;
|
||||
this.pageHeader.Size = new System.Drawing.Size(488, 32);
|
||||
this.pageHeader.TabIndex = 1;
|
||||
this.pageHeader.Text = "DrawerDemo";
|
||||
//
|
||||
// Demo
|
||||
//
|
||||
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "Demo";
|
||||
this.Size = new System.Drawing.Size(500, 420);
|
||||
|
||||
Generated
+124
@@ -0,0 +1,124 @@
|
||||
namespace AntdUIDemo.Views.SubView
|
||||
{
|
||||
partial class TourTest
|
||||
{
|
||||
/// <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.label1 = new AntdUI.Label();
|
||||
this.panel1 = new AntdUI.Panel();
|
||||
this.button_previous = new AntdUI.Button();
|
||||
this.button_next = new AntdUI.Button();
|
||||
this.label2 = new AntdUI.Label();
|
||||
this.label3 = new AntdUI.Label();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(220, 36);
|
||||
this.label1.TabIndex = 0;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Controls.Add(this.button_previous);
|
||||
this.panel1.Controls.Add(this.button_next);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 110);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(220, 40);
|
||||
this.panel1.TabIndex = 5;
|
||||
this.panel1.Text = "panel1";
|
||||
//
|
||||
// button_previous
|
||||
//
|
||||
this.button_previous.BorderWidth = 1F;
|
||||
this.button_previous.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.button_previous.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button_previous.Location = new System.Drawing.Point(70, 0);
|
||||
this.button_previous.Name = "button_previous";
|
||||
this.button_previous.Size = new System.Drawing.Size(75, 40);
|
||||
this.button_previous.TabIndex = 7;
|
||||
this.button_previous.Text = "上一步";
|
||||
//
|
||||
// button_next
|
||||
//
|
||||
this.button_next.BorderWidth = 1F;
|
||||
this.button_next.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.button_next.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.button_next.Location = new System.Drawing.Point(145, 0);
|
||||
this.button_next.Name = "button_next";
|
||||
this.button_next.Size = new System.Drawing.Size(75, 40);
|
||||
this.button_next.TabIndex = 6;
|
||||
this.button_next.Text = "下一步";
|
||||
this.button_next.Type = AntdUI.TTypeMini.Primary;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label2.Location = new System.Drawing.Point(0, 36);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(220, 74);
|
||||
this.label2.TabIndex = 6;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label3.Location = new System.Drawing.Point(0, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(70, 40);
|
||||
this.label3.TabIndex = 8;
|
||||
//
|
||||
// TourTest
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "TourTest";
|
||||
this.Size = new System.Drawing.Size(220, 150);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private AntdUI.Label label1;
|
||||
private AntdUI.Panel panel1;
|
||||
private AntdUI.Label label3;
|
||||
private AntdUI.Button button_previous;
|
||||
private AntdUI.Button button_next;
|
||||
private AntdUI.Label label2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
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;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace AntdUIDemo.Views.SubView
|
||||
{
|
||||
public partial class TourTest : UserControl
|
||||
{
|
||||
AntdUI.Tour.Popover popover;
|
||||
public TourTest(AntdUI.Tour.Popover _popover, string title, string text, int step, int max)
|
||||
{
|
||||
popover = _popover;
|
||||
InitializeComponent();
|
||||
InitData(title, text, step ,max);
|
||||
BindEventHandler();
|
||||
|
||||
}
|
||||
|
||||
private void InitData(string title,string text,int step ,int max)
|
||||
{
|
||||
label1.Text = title;
|
||||
label2.Text = text;
|
||||
label3.Text = step + " / " + max;
|
||||
if (step == max)
|
||||
{
|
||||
button_next.LocalizationText = "Finish";
|
||||
button_next.Text = "完成";
|
||||
}
|
||||
button_previous.Visible = step > 1;
|
||||
if (button_previous.Visible)
|
||||
{
|
||||
int w1 = (int)(label1.PSize.Width / AntdUI.Config.Dpi), w = (int)((label2.PSize.Width + button_previous.PSize.Width + button_next.PSize.Width) / AntdUI.Config.Dpi);
|
||||
Width = w1 > w ? w1 : w;
|
||||
}
|
||||
}
|
||||
|
||||
private void BindEventHandler()
|
||||
{
|
||||
button_previous.Click += Button_previous_Click;
|
||||
button_next.Click += Button_next_Click;
|
||||
}
|
||||
|
||||
private void Button_next_Click(object sender, EventArgs e)
|
||||
{
|
||||
popover.Tour.Next();
|
||||
}
|
||||
|
||||
private void Button_previous_Click(object sender, EventArgs e)
|
||||
{
|
||||
popover.Tour.Previous();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user