+ UIBreadcrumb:增加面包屑导航
This commit is contained in:
parent
c242d230e0
commit
fd001063c9
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
194
SunnyUI.Demo/Controls/FOther.Designer.cs
generated
194
SunnyUI.Demo/Controls/FOther.Designer.cs
generated
@ -33,13 +33,6 @@
|
||||
this.uiLine2 = new Sunny.UI.UILine();
|
||||
this.uiLight2 = new Sunny.UI.UILight();
|
||||
this.uiLight3 = new Sunny.UI.UILight();
|
||||
this.uiProcessBar1 = new Sunny.UI.UIProcessBar();
|
||||
this.uiLine3 = new Sunny.UI.UILine();
|
||||
this.uiProgressIndicator1 = new Sunny.UI.UIProgressIndicator();
|
||||
this.uiLine4 = new Sunny.UI.UILine();
|
||||
this.uiTrackBar1 = new Sunny.UI.UITrackBar();
|
||||
this.uiLine5 = new Sunny.UI.UILine();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.uiLight4 = new Sunny.UI.UILight();
|
||||
this.uiLedBulb1 = new Sunny.UI.UILedBulb();
|
||||
this.uiLine8 = new Sunny.UI.UILine();
|
||||
@ -49,32 +42,20 @@
|
||||
this.uiLine6 = new Sunny.UI.UILine();
|
||||
this.uiScrollingText1 = new Sunny.UI.UIScrollingText();
|
||||
this.uiScrollingText2 = new Sunny.UI.UIScrollingText();
|
||||
this.uiWaitingBar1 = new Sunny.UI.UIWaitingBar();
|
||||
this.uiLine1 = new Sunny.UI.UILine();
|
||||
this.uiLine7 = new Sunny.UI.UILine();
|
||||
this.uiLabel1 = new Sunny.UI.UILabel();
|
||||
this.uiLabel2 = new Sunny.UI.UILabel();
|
||||
this.uiLabel3 = new Sunny.UI.UILabel();
|
||||
this.uiToolTip1 = new Sunny.UI.UIToolTip(this.components);
|
||||
this.uiProcessBar2 = new Sunny.UI.UIProcessBar();
|
||||
this.uiRoundProcess1 = new Sunny.UI.UIRoundProcess();
|
||||
this.uiLine9 = new Sunny.UI.UILine();
|
||||
this.uiRoundProcess2 = new Sunny.UI.UIRoundProcess();
|
||||
this.PagePanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PagePanel
|
||||
//
|
||||
this.PagePanel.Controls.Add(this.uiRoundProcess2);
|
||||
this.PagePanel.Controls.Add(this.uiLine9);
|
||||
this.PagePanel.Controls.Add(this.uiRoundProcess1);
|
||||
this.PagePanel.Controls.Add(this.uiProcessBar2);
|
||||
this.PagePanel.Controls.Add(this.uiLabel3);
|
||||
this.PagePanel.Controls.Add(this.uiLabel2);
|
||||
this.PagePanel.Controls.Add(this.uiLabel1);
|
||||
this.PagePanel.Controls.Add(this.uiLine7);
|
||||
this.PagePanel.Controls.Add(this.uiLine1);
|
||||
this.PagePanel.Controls.Add(this.uiWaitingBar1);
|
||||
this.PagePanel.Controls.Add(this.uiScrollingText2);
|
||||
this.PagePanel.Controls.Add(this.uiScrollingText1);
|
||||
this.PagePanel.Controls.Add(this.uiLine6);
|
||||
@ -84,12 +65,6 @@
|
||||
this.PagePanel.Controls.Add(this.uiLine8);
|
||||
this.PagePanel.Controls.Add(this.uiLedBulb1);
|
||||
this.PagePanel.Controls.Add(this.uiLight4);
|
||||
this.PagePanel.Controls.Add(this.uiLine5);
|
||||
this.PagePanel.Controls.Add(this.uiTrackBar1);
|
||||
this.PagePanel.Controls.Add(this.uiLine4);
|
||||
this.PagePanel.Controls.Add(this.uiProgressIndicator1);
|
||||
this.PagePanel.Controls.Add(this.uiLine3);
|
||||
this.PagePanel.Controls.Add(this.uiProcessBar1);
|
||||
this.PagePanel.Controls.Add(this.uiLight3);
|
||||
this.PagePanel.Controls.Add(this.uiLight2);
|
||||
this.PagePanel.Controls.Add(this.uiLine2);
|
||||
@ -145,76 +120,6 @@
|
||||
this.uiLight3.TabIndex = 23;
|
||||
this.uiLight3.Text = "uiLight3";
|
||||
//
|
||||
// uiProcessBar1
|
||||
//
|
||||
this.uiProcessBar1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiProcessBar1.Location = new System.Drawing.Point(30, 136);
|
||||
this.uiProcessBar1.MinimumSize = new System.Drawing.Size(70, 1);
|
||||
this.uiProcessBar1.Name = "uiProcessBar1";
|
||||
this.uiProcessBar1.Size = new System.Drawing.Size(318, 29);
|
||||
this.uiProcessBar1.TabIndex = 24;
|
||||
this.uiProcessBar1.Text = "50.0%";
|
||||
this.uiProcessBar1.Value = 50;
|
||||
//
|
||||
// uiLine3
|
||||
//
|
||||
this.uiLine3.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine3.Location = new System.Drawing.Point(30, 103);
|
||||
this.uiLine3.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine3.Name = "uiLine3";
|
||||
this.uiLine3.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine3.TabIndex = 25;
|
||||
this.uiLine3.Text = "UIProcessBar";
|
||||
this.uiLine3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiProgressIndicator1
|
||||
//
|
||||
this.uiProgressIndicator1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiProgressIndicator1.Location = new System.Drawing.Point(381, 339);
|
||||
this.uiProgressIndicator1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiProgressIndicator1.Name = "uiProgressIndicator1";
|
||||
this.uiProgressIndicator1.Size = new System.Drawing.Size(120, 120);
|
||||
this.uiProgressIndicator1.TabIndex = 26;
|
||||
this.uiProgressIndicator1.Text = "uiProgressIndicator1";
|
||||
//
|
||||
// uiLine4
|
||||
//
|
||||
this.uiLine4.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine4.Location = new System.Drawing.Point(381, 313);
|
||||
this.uiLine4.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine4.Name = "uiLine4";
|
||||
this.uiLine4.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine4.TabIndex = 27;
|
||||
this.uiLine4.Text = "UIProgressIndicator";
|
||||
this.uiLine4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiTrackBar1
|
||||
//
|
||||
this.uiTrackBar1.DisableColor = System.Drawing.Color.Silver;
|
||||
this.uiTrackBar1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiTrackBar1.Location = new System.Drawing.Point(381, 136);
|
||||
this.uiTrackBar1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiTrackBar1.Name = "uiTrackBar1";
|
||||
this.uiTrackBar1.Size = new System.Drawing.Size(158, 29);
|
||||
this.uiTrackBar1.TabIndex = 30;
|
||||
this.uiTrackBar1.Text = "uiTrackBar1";
|
||||
this.uiTrackBar1.Value = 50;
|
||||
//
|
||||
// uiLine5
|
||||
//
|
||||
this.uiLine5.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine5.Location = new System.Drawing.Point(381, 101);
|
||||
this.uiLine5.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine5.Name = "uiLine5";
|
||||
this.uiLine5.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine5.TabIndex = 31;
|
||||
this.uiLine5.Text = "UITrackBar";
|
||||
this.uiLine5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// uiLight4
|
||||
//
|
||||
this.uiLight4.CenterColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(248)))), ((int)(((byte)(232)))));
|
||||
@ -272,6 +177,7 @@
|
||||
this.uiLedBulb4.BlinkInterval = 500;
|
||||
this.uiLedBulb4.Location = new System.Drawing.Point(507, 52);
|
||||
this.uiLedBulb4.Name = "uiLedBulb4";
|
||||
this.uiLedBulb4.On = false;
|
||||
this.uiLedBulb4.Size = new System.Drawing.Size(32, 32);
|
||||
this.uiLedBulb4.TabIndex = 41;
|
||||
this.uiLedBulb4.Text = "uiLedBulb4";
|
||||
@ -279,7 +185,7 @@
|
||||
// uiLine6
|
||||
//
|
||||
this.uiLine6.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine6.Location = new System.Drawing.Point(381, 182);
|
||||
this.uiLine6.Location = new System.Drawing.Point(381, 98);
|
||||
this.uiLine6.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine6.Name = "uiLine6";
|
||||
this.uiLine6.Size = new System.Drawing.Size(319, 20);
|
||||
@ -292,7 +198,7 @@
|
||||
this.uiScrollingText1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.uiScrollingText1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiScrollingText1.ForeColor = System.Drawing.Color.Red;
|
||||
this.uiScrollingText1.Location = new System.Drawing.Point(381, 215);
|
||||
this.uiScrollingText1.Location = new System.Drawing.Point(381, 131);
|
||||
this.uiScrollingText1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiScrollingText1.Name = "uiScrollingText1";
|
||||
this.uiScrollingText1.ScrollingType = Sunny.UI.UIScrollingText.UIScrollingType.LeftToRight;
|
||||
@ -307,38 +213,17 @@
|
||||
this.uiScrollingText2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||
this.uiScrollingText2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiScrollingText2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
|
||||
this.uiScrollingText2.Location = new System.Drawing.Point(381, 256);
|
||||
this.uiScrollingText2.Location = new System.Drawing.Point(381, 172);
|
||||
this.uiScrollingText2.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiScrollingText2.Name = "uiScrollingText2";
|
||||
this.uiScrollingText2.Size = new System.Drawing.Size(319, 35);
|
||||
this.uiScrollingText2.TabIndex = 49;
|
||||
this.uiScrollingText2.Text = "赠人玫瑰手有余香";
|
||||
//
|
||||
// uiWaitingBar1
|
||||
//
|
||||
this.uiWaitingBar1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiWaitingBar1.Location = new System.Drawing.Point(30, 215);
|
||||
this.uiWaitingBar1.MinimumSize = new System.Drawing.Size(70, 23);
|
||||
this.uiWaitingBar1.Name = "uiWaitingBar1";
|
||||
this.uiWaitingBar1.Size = new System.Drawing.Size(319, 29);
|
||||
this.uiWaitingBar1.TabIndex = 50;
|
||||
this.uiWaitingBar1.Text = "uiWaitingBar1";
|
||||
//
|
||||
// uiLine1
|
||||
//
|
||||
this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine1.Location = new System.Drawing.Point(30, 182);
|
||||
this.uiLine1.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine1.Name = "uiLine1";
|
||||
this.uiLine1.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine1.TabIndex = 51;
|
||||
this.uiLine1.Text = "UIWaitingBar";
|
||||
this.uiLine1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiLine7
|
||||
//
|
||||
this.uiLine7.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine7.Location = new System.Drawing.Point(29, 256);
|
||||
this.uiLine7.Location = new System.Drawing.Point(30, 98);
|
||||
this.uiLine7.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine7.Name = "uiLine7";
|
||||
this.uiLine7.Size = new System.Drawing.Size(319, 20);
|
||||
@ -350,7 +235,7 @@
|
||||
//
|
||||
this.uiLabel1.AutoSize = true;
|
||||
this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLabel1.Location = new System.Drawing.Point(30, 293);
|
||||
this.uiLabel1.Location = new System.Drawing.Point(31, 138);
|
||||
this.uiLabel1.Name = "uiLabel1";
|
||||
this.uiLabel1.Size = new System.Drawing.Size(138, 21);
|
||||
this.uiLabel1.TabIndex = 53;
|
||||
@ -362,7 +247,7 @@
|
||||
//
|
||||
this.uiLabel2.AutoSize = true;
|
||||
this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLabel2.Location = new System.Drawing.Point(210, 293);
|
||||
this.uiLabel2.Location = new System.Drawing.Point(211, 138);
|
||||
this.uiLabel2.Name = "uiLabel2";
|
||||
this.uiLabel2.Size = new System.Drawing.Size(138, 21);
|
||||
this.uiLabel2.TabIndex = 54;
|
||||
@ -373,7 +258,7 @@
|
||||
//
|
||||
this.uiLabel3.AutoSize = true;
|
||||
this.uiLabel3.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLabel3.Location = new System.Drawing.Point(30, 331);
|
||||
this.uiLabel3.Location = new System.Drawing.Point(31, 179);
|
||||
this.uiLabel3.Name = "uiLabel3";
|
||||
this.uiLabel3.Size = new System.Drawing.Size(138, 21);
|
||||
this.uiLabel3.TabIndex = 55;
|
||||
@ -387,56 +272,6 @@
|
||||
this.uiToolTip1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(239)))), ((int)(((byte)(239)))), ((int)(((byte)(239)))));
|
||||
this.uiToolTip1.OwnerDraw = true;
|
||||
//
|
||||
// uiProcessBar2
|
||||
//
|
||||
this.uiProcessBar2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiProcessBar2.Location = new System.Drawing.Point(30, 171);
|
||||
this.uiProcessBar2.MinimumSize = new System.Drawing.Size(70, 1);
|
||||
this.uiProcessBar2.Name = "uiProcessBar2";
|
||||
this.uiProcessBar2.Size = new System.Drawing.Size(318, 5);
|
||||
this.uiProcessBar2.TabIndex = 56;
|
||||
this.uiProcessBar2.Text = "50.0%";
|
||||
this.uiProcessBar2.Value = 50;
|
||||
//
|
||||
// uiRoundProcess1
|
||||
//
|
||||
this.uiRoundProcess1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.uiRoundProcess1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiRoundProcess1.Location = new System.Drawing.Point(29, 393);
|
||||
this.uiRoundProcess1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiRoundProcess1.Name = "uiRoundProcess1";
|
||||
this.uiRoundProcess1.ShowProcess = true;
|
||||
this.uiRoundProcess1.Size = new System.Drawing.Size(120, 120);
|
||||
this.uiRoundProcess1.TabIndex = 57;
|
||||
this.uiRoundProcess1.Text = "0.0%";
|
||||
//
|
||||
// uiLine9
|
||||
//
|
||||
this.uiLine9.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine9.Location = new System.Drawing.Point(30, 367);
|
||||
this.uiLine9.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine9.Name = "uiLine9";
|
||||
this.uiLine9.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine9.TabIndex = 58;
|
||||
this.uiLine9.Text = "UIRoundProcess";
|
||||
this.uiLine9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiRoundProcess2
|
||||
//
|
||||
this.uiRoundProcess2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.uiRoundProcess2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiRoundProcess2.ForeColor = System.Drawing.Color.White;
|
||||
this.uiRoundProcess2.Inner = 0;
|
||||
this.uiRoundProcess2.Location = new System.Drawing.Point(156, 393);
|
||||
this.uiRoundProcess2.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiRoundProcess2.Name = "uiRoundProcess2";
|
||||
this.uiRoundProcess2.ShowProcess = true;
|
||||
this.uiRoundProcess2.Size = new System.Drawing.Size(120, 120);
|
||||
this.uiRoundProcess2.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiRoundProcess2.StyleCustomMode = true;
|
||||
this.uiRoundProcess2.TabIndex = 59;
|
||||
this.uiRoundProcess2.Text = "0.0%";
|
||||
//
|
||||
// FOther
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@ -455,13 +290,6 @@
|
||||
private UILight uiLight2;
|
||||
private UILine uiLine2;
|
||||
private UILight uiLight1;
|
||||
private UITrackBar uiTrackBar1;
|
||||
private UILine uiLine4;
|
||||
private UIProgressIndicator uiProgressIndicator1;
|
||||
private UILine uiLine3;
|
||||
private UIProcessBar uiProcessBar1;
|
||||
private UILine uiLine5;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private UILight uiLight4;
|
||||
private UILedBulb uiLedBulb2;
|
||||
private UILine uiLine8;
|
||||
@ -471,16 +299,10 @@
|
||||
private UILine uiLine6;
|
||||
private UIScrollingText uiScrollingText1;
|
||||
private UIScrollingText uiScrollingText2;
|
||||
private UIWaitingBar uiWaitingBar1;
|
||||
private UILine uiLine1;
|
||||
private UILine uiLine7;
|
||||
private UILabel uiLabel3;
|
||||
private UILabel uiLabel2;
|
||||
private UILabel uiLabel1;
|
||||
private UIToolTip uiToolTip1;
|
||||
private UIProcessBar uiProcessBar2;
|
||||
private UIRoundProcess uiRoundProcess1;
|
||||
private UIRoundProcess uiRoundProcess2;
|
||||
private UILine uiLine9;
|
||||
}
|
||||
}
|
@ -10,21 +10,5 @@
|
||||
uiToolTip1.SetToolTip(uiLabel3, "赠人玫瑰手有余香" + '\n' + "赠人玫瑰手有余香",
|
||||
"SunnyUI", 61530, 32, UIColor.Green);
|
||||
}
|
||||
|
||||
private int value;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
value = 0;
|
||||
timer1.ReStart();
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, System.EventArgs e)
|
||||
{
|
||||
value++;
|
||||
uiTrackBar1.Value = value;
|
||||
uiProcessBar2.Value = uiProcessBar1.Value = value;
|
||||
uiRoundProcess2.Value = uiRoundProcess1.Value = value;
|
||||
}
|
||||
}
|
||||
}
|
@ -120,8 +120,8 @@
|
||||
<metadata name="uiToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>107, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
<metadata name="uiToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>107, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>35</value>
|
||||
|
26
SunnyUI.Demo/Controls/FProcess.cs
Normal file
26
SunnyUI.Demo/Controls/FProcess.cs
Normal file
@ -0,0 +1,26 @@
|
||||
namespace Sunny.UI.Demo
|
||||
{
|
||||
public partial class FProcess : UITitlePage
|
||||
{
|
||||
public FProcess()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private int value;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
value = 0;
|
||||
timer1.ReStart();
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, System.EventArgs e)
|
||||
{
|
||||
value++;
|
||||
uiTrackBar1.Value = value;
|
||||
uiProcessBar2.Value = uiProcessBar1.Value = value;
|
||||
uiRoundProcess2.Value = uiRoundProcess1.Value = value;
|
||||
}
|
||||
}
|
||||
}
|
270
SunnyUI.Demo/Controls/FProcess.designer.cs
generated
Normal file
270
SunnyUI.Demo/Controls/FProcess.designer.cs
generated
Normal file
@ -0,0 +1,270 @@
|
||||
|
||||
namespace Sunny.UI.Demo
|
||||
{
|
||||
partial class FProcess
|
||||
{
|
||||
/// <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()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.uiBreadcrumb1 = new Sunny.UI.UIBreadcrumb();
|
||||
this.uiRoundProcess2 = new Sunny.UI.UIRoundProcess();
|
||||
this.uiLine9 = new Sunny.UI.UILine();
|
||||
this.uiRoundProcess1 = new Sunny.UI.UIRoundProcess();
|
||||
this.uiProcessBar2 = new Sunny.UI.UIProcessBar();
|
||||
this.uiLine1 = new Sunny.UI.UILine();
|
||||
this.uiWaitingBar1 = new Sunny.UI.UIWaitingBar();
|
||||
this.uiLine5 = new Sunny.UI.UILine();
|
||||
this.uiTrackBar1 = new Sunny.UI.UITrackBar();
|
||||
this.uiLine4 = new Sunny.UI.UILine();
|
||||
this.uiProgressIndicator1 = new Sunny.UI.UIProgressIndicator();
|
||||
this.uiLine3 = new Sunny.UI.UILine();
|
||||
this.uiProcessBar1 = new Sunny.UI.UIProcessBar();
|
||||
this.uiLine2 = new Sunny.UI.UILine();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.PagePanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PagePanel
|
||||
//
|
||||
this.PagePanel.Controls.Add(this.uiLine2);
|
||||
this.PagePanel.Controls.Add(this.uiBreadcrumb1);
|
||||
this.PagePanel.Controls.Add(this.uiRoundProcess2);
|
||||
this.PagePanel.Controls.Add(this.uiLine9);
|
||||
this.PagePanel.Controls.Add(this.uiRoundProcess1);
|
||||
this.PagePanel.Controls.Add(this.uiProcessBar2);
|
||||
this.PagePanel.Controls.Add(this.uiLine1);
|
||||
this.PagePanel.Controls.Add(this.uiWaitingBar1);
|
||||
this.PagePanel.Controls.Add(this.uiLine5);
|
||||
this.PagePanel.Controls.Add(this.uiTrackBar1);
|
||||
this.PagePanel.Controls.Add(this.uiLine4);
|
||||
this.PagePanel.Controls.Add(this.uiProgressIndicator1);
|
||||
this.PagePanel.Controls.Add(this.uiLine3);
|
||||
this.PagePanel.Controls.Add(this.uiProcessBar1);
|
||||
this.PagePanel.Size = new System.Drawing.Size(1022, 525);
|
||||
//
|
||||
// uiBreadcrumb1
|
||||
//
|
||||
this.uiBreadcrumb1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiBreadcrumb1.ItemIndex = 2;
|
||||
this.uiBreadcrumb1.Items.AddRange(new object[] {
|
||||
"步骤一",
|
||||
"步骤二",
|
||||
"步骤三",
|
||||
"步骤四",
|
||||
"步骤五"});
|
||||
this.uiBreadcrumb1.ItemWidth = 100;
|
||||
this.uiBreadcrumb1.Location = new System.Drawing.Point(30, 372);
|
||||
this.uiBreadcrumb1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiBreadcrumb1.Name = "uiBreadcrumb1";
|
||||
this.uiBreadcrumb1.Size = new System.Drawing.Size(588, 29);
|
||||
this.uiBreadcrumb1.TabIndex = 73;
|
||||
this.uiBreadcrumb1.Text = "uiBreadcrumb1";
|
||||
//
|
||||
// uiRoundProcess2
|
||||
//
|
||||
this.uiRoundProcess2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.uiRoundProcess2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiRoundProcess2.ForeColor = System.Drawing.Color.White;
|
||||
this.uiRoundProcess2.Inner = 0;
|
||||
this.uiRoundProcess2.Location = new System.Drawing.Point(155, 138);
|
||||
this.uiRoundProcess2.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiRoundProcess2.Name = "uiRoundProcess2";
|
||||
this.uiRoundProcess2.ShowProcess = true;
|
||||
this.uiRoundProcess2.Size = new System.Drawing.Size(120, 120);
|
||||
this.uiRoundProcess2.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.uiRoundProcess2.StyleCustomMode = true;
|
||||
this.uiRoundProcess2.TabIndex = 72;
|
||||
this.uiRoundProcess2.Text = "0.0%";
|
||||
//
|
||||
// uiLine9
|
||||
//
|
||||
this.uiLine9.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine9.Location = new System.Drawing.Point(29, 112);
|
||||
this.uiLine9.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine9.Name = "uiLine9";
|
||||
this.uiLine9.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine9.TabIndex = 71;
|
||||
this.uiLine9.Text = "UIRoundProcess";
|
||||
this.uiLine9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiRoundProcess1
|
||||
//
|
||||
this.uiRoundProcess1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.uiRoundProcess1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiRoundProcess1.Location = new System.Drawing.Point(28, 138);
|
||||
this.uiRoundProcess1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiRoundProcess1.Name = "uiRoundProcess1";
|
||||
this.uiRoundProcess1.ShowProcess = true;
|
||||
this.uiRoundProcess1.Size = new System.Drawing.Size(120, 120);
|
||||
this.uiRoundProcess1.TabIndex = 70;
|
||||
this.uiRoundProcess1.Text = "0.0%";
|
||||
//
|
||||
// uiProcessBar2
|
||||
//
|
||||
this.uiProcessBar2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiProcessBar2.Location = new System.Drawing.Point(30, 88);
|
||||
this.uiProcessBar2.MinimumSize = new System.Drawing.Size(70, 1);
|
||||
this.uiProcessBar2.Name = "uiProcessBar2";
|
||||
this.uiProcessBar2.Size = new System.Drawing.Size(318, 5);
|
||||
this.uiProcessBar2.TabIndex = 69;
|
||||
this.uiProcessBar2.Text = "50.0%";
|
||||
this.uiProcessBar2.Value = 50;
|
||||
//
|
||||
// uiLine1
|
||||
//
|
||||
this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine1.Location = new System.Drawing.Point(381, 20);
|
||||
this.uiLine1.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine1.Name = "uiLine1";
|
||||
this.uiLine1.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine1.TabIndex = 68;
|
||||
this.uiLine1.Text = "UIWaitingBar";
|
||||
this.uiLine1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiWaitingBar1
|
||||
//
|
||||
this.uiWaitingBar1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiWaitingBar1.Location = new System.Drawing.Point(381, 53);
|
||||
this.uiWaitingBar1.MinimumSize = new System.Drawing.Size(70, 23);
|
||||
this.uiWaitingBar1.Name = "uiWaitingBar1";
|
||||
this.uiWaitingBar1.Size = new System.Drawing.Size(319, 29);
|
||||
this.uiWaitingBar1.TabIndex = 67;
|
||||
this.uiWaitingBar1.Text = "uiWaitingBar1";
|
||||
//
|
||||
// uiLine5
|
||||
//
|
||||
this.uiLine5.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine5.Location = new System.Drawing.Point(30, 264);
|
||||
this.uiLine5.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine5.Name = "uiLine5";
|
||||
this.uiLine5.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine5.TabIndex = 66;
|
||||
this.uiLine5.Text = "UITrackBar";
|
||||
this.uiLine5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiTrackBar1
|
||||
//
|
||||
this.uiTrackBar1.DisableColor = System.Drawing.Color.Silver;
|
||||
this.uiTrackBar1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiTrackBar1.Location = new System.Drawing.Point(30, 290);
|
||||
this.uiTrackBar1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiTrackBar1.Name = "uiTrackBar1";
|
||||
this.uiTrackBar1.Size = new System.Drawing.Size(158, 29);
|
||||
this.uiTrackBar1.TabIndex = 65;
|
||||
this.uiTrackBar1.Text = "uiTrackBar1";
|
||||
this.uiTrackBar1.Value = 50;
|
||||
//
|
||||
// uiLine4
|
||||
//
|
||||
this.uiLine4.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine4.Location = new System.Drawing.Point(381, 112);
|
||||
this.uiLine4.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine4.Name = "uiLine4";
|
||||
this.uiLine4.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine4.TabIndex = 64;
|
||||
this.uiLine4.Text = "UIProgressIndicator";
|
||||
this.uiLine4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiProgressIndicator1
|
||||
//
|
||||
this.uiProgressIndicator1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiProgressIndicator1.Location = new System.Drawing.Point(381, 138);
|
||||
this.uiProgressIndicator1.MinimumSize = new System.Drawing.Size(1, 1);
|
||||
this.uiProgressIndicator1.Name = "uiProgressIndicator1";
|
||||
this.uiProgressIndicator1.Size = new System.Drawing.Size(120, 120);
|
||||
this.uiProgressIndicator1.TabIndex = 63;
|
||||
this.uiProgressIndicator1.Text = "uiProgressIndicator1";
|
||||
//
|
||||
// uiLine3
|
||||
//
|
||||
this.uiLine3.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine3.Location = new System.Drawing.Point(30, 20);
|
||||
this.uiLine3.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine3.Name = "uiLine3";
|
||||
this.uiLine3.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine3.TabIndex = 62;
|
||||
this.uiLine3.Text = "UIProcessBar";
|
||||
this.uiLine3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// uiProcessBar1
|
||||
//
|
||||
this.uiProcessBar1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiProcessBar1.Location = new System.Drawing.Point(30, 53);
|
||||
this.uiProcessBar1.MinimumSize = new System.Drawing.Size(70, 1);
|
||||
this.uiProcessBar1.Name = "uiProcessBar1";
|
||||
this.uiProcessBar1.Size = new System.Drawing.Size(318, 29);
|
||||
this.uiProcessBar1.TabIndex = 61;
|
||||
this.uiProcessBar1.Text = "50.0%";
|
||||
this.uiProcessBar1.Value = 50;
|
||||
//
|
||||
// uiLine2
|
||||
//
|
||||
this.uiLine2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiLine2.Location = new System.Drawing.Point(30, 334);
|
||||
this.uiLine2.MinimumSize = new System.Drawing.Size(16, 16);
|
||||
this.uiLine2.Name = "uiLine2";
|
||||
this.uiLine2.Size = new System.Drawing.Size(319, 20);
|
||||
this.uiLine2.TabIndex = 74;
|
||||
this.uiLine2.Text = "UIBreadcrumb";
|
||||
this.uiLine2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// FProcess
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1022, 560);
|
||||
this.Name = "FProcess";
|
||||
this.Symbol = 62034;
|
||||
this.Text = "Progress";
|
||||
this.PagePanel.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private UIBreadcrumb uiBreadcrumb1;
|
||||
private UIRoundProcess uiRoundProcess2;
|
||||
private UILine uiLine9;
|
||||
private UIRoundProcess uiRoundProcess1;
|
||||
private UIProcessBar uiProcessBar2;
|
||||
private UILine uiLine1;
|
||||
private UIWaitingBar uiWaitingBar1;
|
||||
private UILine uiLine5;
|
||||
private UITrackBar uiTrackBar1;
|
||||
private UILine uiLine4;
|
||||
private UIProgressIndicator uiProgressIndicator1;
|
||||
private UILine uiLine3;
|
||||
private UIProcessBar uiProcessBar1;
|
||||
private UILine uiLine2;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
}
|
||||
}
|
123
SunnyUI.Demo/Controls/FProcess.resx
Normal file
123
SunnyUI.Demo/Controls/FProcess.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?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>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@ -34,6 +34,7 @@ namespace Sunny.UI.Demo
|
||||
Aside.CreateChildNode(parent, 61516, 24, AddPage(new FTransfer(), ++pageIndex));
|
||||
Aside.CreateChildNode(parent, 61447, 24, AddPage(new FAvatar(), ++pageIndex));
|
||||
Aside.CreateChildNode(parent, 62104, 24, AddPage(new FContextMenuStrip(), ++pageIndex));
|
||||
Aside.CreateChildNode(parent, AddPage(new FProcess(), ++pageIndex));
|
||||
Aside.CreateChildNode(parent, AddPage(new FScrollBar(), ++pageIndex));
|
||||
Aside.CreateChildNode(parent, 61668, 24, AddPage(new FMeter(), ++pageIndex));
|
||||
Aside.CreateChildNode(parent, 62173, 24, AddPage(new FOther(), ++pageIndex));
|
||||
|
@ -171,6 +171,12 @@
|
||||
<Compile Include="Controls\FPanel.Designer.cs">
|
||||
<DependentUpon>FPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\FProcess.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Controls\FProcess.designer.cs">
|
||||
<DependentUpon>FProcess.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\FRadioButton.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -383,6 +389,9 @@
|
||||
<EmbeddedResource Include="Controls\FPanel.resx">
|
||||
<DependentUpon>FPanel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\FProcess.resx">
|
||||
<DependentUpon>FProcess.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Controls\FRadioButton.resx">
|
||||
<DependentUpon>FRadioButton.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
235
SunnyUI/Controls/UIBreadcrumb.cs
Normal file
235
SunnyUI/Controls/UIBreadcrumb.cs
Normal file
@ -0,0 +1,235 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Design;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Sunny.UI
|
||||
{
|
||||
[ToolboxItem(true)]
|
||||
[DefaultEvent("ItemIndexChanged")]
|
||||
[DefaultProperty("ItemIndex")]
|
||||
public class UIBreadcrumb : UIControl
|
||||
{
|
||||
public UIBreadcrumb()
|
||||
{
|
||||
ShowText = false;
|
||||
ShowRect = false;
|
||||
Height = 29;
|
||||
ItemWidth = 120;
|
||||
|
||||
fillColor = UIColor.Blue;
|
||||
rectColor = Color.FromArgb(155, 200, 255);
|
||||
foreColor = Color.White;
|
||||
}
|
||||
|
||||
public delegate void OnValueChanged(object sender, int value);
|
||||
|
||||
public event OnValueChanged ItemIndexChanged;
|
||||
|
||||
private readonly ListBoxEx listbox = new ListBoxEx();
|
||||
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
|
||||
[Localizable(true)]
|
||||
[Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
|
||||
[MergableProperty(false)]
|
||||
[Description("列表项"), Category("SunnyUI")]
|
||||
public ListBox.ObjectCollection Items => listbox.Items;
|
||||
|
||||
private readonly ConcurrentDictionary<int, Point[]> ClickArea = new ConcurrentDictionary<int, Point[]>();
|
||||
|
||||
[Browsable(false)]
|
||||
public int Count => Items.Count;
|
||||
|
||||
private int itemIndex = -1;
|
||||
|
||||
[DefaultValue(-1)]
|
||||
[Description("当前节点索引"), Category("SunnyUI")]
|
||||
public int ItemIndex
|
||||
{
|
||||
get => itemIndex;
|
||||
set
|
||||
{
|
||||
if (Count == 0)
|
||||
{
|
||||
itemIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
itemIndex = Math.Max(-1, value);
|
||||
itemIndex = Math.Min(Count - 1, value);
|
||||
ItemIndexChanged?.Invoke(this, itemIndex);
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaintFill(Graphics g, GraphicsPath path)
|
||||
{
|
||||
float width = 0;
|
||||
if (Items.Count == 0)
|
||||
{
|
||||
SizeF sf = g.MeasureString("Item0", Font);
|
||||
width = sf.Width + Height + 6;
|
||||
if (itemWidth < width) itemWidth = (int)width;
|
||||
List<PointF> points = new List<PointF>();
|
||||
points.Add(new PointF(3, 0));
|
||||
points.Add(new PointF(Width - 3 - Height / 2.0f, 0));
|
||||
points.Add(new PointF(Width - 3, Height / 2.0f));
|
||||
points.Add(new PointF(Width - 3 - Height / 2.0f, Height));
|
||||
points.Add(new PointF(3, Height));
|
||||
points.Add(new PointF(3 + Height / 2.0f, Height / 2.0f));
|
||||
points.Add(new PointF(3, 0));
|
||||
|
||||
using (Brush br = new SolidBrush(SelectedColor))
|
||||
{
|
||||
g.FillPolygon(br, points.ToArray());
|
||||
}
|
||||
|
||||
g.DrawString("Item0", Font, ForeColor, (Width - sf.Width) / 2.0f, (Height - sf.Height) / 2.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in Items)
|
||||
{
|
||||
SizeF sf = g.MeasureString(item.ToString(), Font);
|
||||
width = Math.Max(width, sf.Width);
|
||||
}
|
||||
|
||||
width = width + Height + 6;
|
||||
if (itemWidth < width) itemWidth = (int)width;
|
||||
|
||||
float begin = 0;
|
||||
int index = 0;
|
||||
foreach (var item in Items)
|
||||
{
|
||||
SizeF sf = g.MeasureString(item.ToString(), Font);
|
||||
List<PointF> points = new List<PointF>();
|
||||
points.Add(new PointF(begin + 3, 0));
|
||||
points.Add(new PointF(begin + itemWidth - 3 - Height / 2.0f, 0));
|
||||
points.Add(new PointF(begin + itemWidth - 3, Height / 2.0f));
|
||||
points.Add(new PointF(begin + itemWidth - 3 - Height / 2.0f, Height));
|
||||
points.Add(new PointF(begin + 3, Height));
|
||||
points.Add(new PointF(begin + 3 + Height / 2.0f, Height / 2.0f));
|
||||
points.Add(new PointF(begin + 3, 0));
|
||||
|
||||
Point[] pts = new Point[points.Count];
|
||||
for (int i = 0; i < points.Count; i++)
|
||||
{
|
||||
pts[i] = new Point((int)points[i].X, (int)points[i].Y);
|
||||
}
|
||||
|
||||
if (!ClickArea.ContainsKey(index))
|
||||
{
|
||||
ClickArea.TryAdd(index, pts);
|
||||
}
|
||||
else
|
||||
{
|
||||
ClickArea[index] = pts;
|
||||
}
|
||||
|
||||
using (Brush br = new SolidBrush(index <= ItemIndex ? SelectedColor : UnSelectedColor))
|
||||
{
|
||||
g.FillPolygon(br, points.ToArray());
|
||||
}
|
||||
|
||||
g.DrawString(item.ToString(), Font, ForeColor, begin + (itemWidth - sf.Width) / 2.0f, (Height - sf.Height) / 2.0f);
|
||||
|
||||
begin = begin + itemWidth - 3 - Height / 2.0f + Interval;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int itemWidth;
|
||||
|
||||
[DefaultValue(120)]
|
||||
[Description("节点宽度"), Category("SunnyUI")]
|
||||
public int ItemWidth
|
||||
{
|
||||
get => itemWidth;
|
||||
set
|
||||
{
|
||||
itemWidth = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private int interval = 1;
|
||||
|
||||
[DefaultValue(1)]
|
||||
[Description("节点间隔"), Category("SunnyUI")]
|
||||
public int Interval
|
||||
{
|
||||
get => interval;
|
||||
set
|
||||
{
|
||||
interval = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 已选节点颜色
|
||||
/// </summary>
|
||||
[Description("已选节点颜色")]
|
||||
[Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "80, 160, 255")]
|
||||
public Color SelectedColor
|
||||
{
|
||||
get => fillColor;
|
||||
set => SetFillColor(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 未选节点颜色
|
||||
/// </summary>
|
||||
[Description("未选节点颜色")]
|
||||
[Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "155, 200, 255")]
|
||||
public Color UnSelectedColor
|
||||
{
|
||||
get => rectColor;
|
||||
set => SetRectColor(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 字体颜色
|
||||
/// </summary>
|
||||
[Description("字体颜色")]
|
||||
[Category("SunnyUI")]
|
||||
[DefaultValue(typeof(Color), "White")]
|
||||
public override Color ForeColor
|
||||
{
|
||||
get => foreColor;
|
||||
set => SetForeColor(value);
|
||||
}
|
||||
|
||||
public override void SetStyleColor(UIBaseStyle uiColor)
|
||||
{
|
||||
base.SetStyleColor(uiColor);
|
||||
if (uiColor.IsCustom()) return;
|
||||
|
||||
fillColor = uiColor.PrimaryColor;
|
||||
foreColor = uiColor.ButtonForeColor;
|
||||
rectColor = uiColor.GridSelectedColor;
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnMouseClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseClick(e);
|
||||
foreach (var pair in ClickArea)
|
||||
{
|
||||
if (e.Location.InRegion(pair.Value))
|
||||
{
|
||||
ItemIndex = pair.Key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user