UITimePicker选择框增加鼠标长按事件

This commit is contained in:
Sunny 2020-05-30 17:59:13 +08:00
parent 2bf4578df7
commit e80cbc4a10
11 changed files with 472 additions and 334 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -21,6 +21,7 @@
******************************************************************************/
using System;
using System.Drawing;
namespace Sunny.UI
{
@ -29,14 +30,14 @@ namespace Sunny.UI
private UITabControl TabControl;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private UIPanel uiPanel2;
private UIPanel p1;
private UISymbolButton b4;
private UISymbolButton b3;
private UISymbolButton b2;
private UISymbolButton b1;
private UIPanel uiPanel4;
private UIPanel p2;
private System.Windows.Forms.TabPage tabPage3;
private UIPanel uiPanel5;
private UIPanel p3;
private UILabel m12;
private UILabel m11;
private UILabel m10;
@ -120,7 +121,7 @@ namespace Sunny.UI
this.b1 = new Sunny.UI.UISymbolButton();
this.TabControl = new Sunny.UI.UITabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.uiPanel2 = new Sunny.UI.UIPanel();
this.p1 = new Sunny.UI.UIPanel();
this.y10 = new Sunny.UI.UILabel();
this.y9 = new Sunny.UI.UILabel();
this.y8 = new Sunny.UI.UILabel();
@ -132,7 +133,7 @@ namespace Sunny.UI
this.y2 = new Sunny.UI.UILabel();
this.y1 = new Sunny.UI.UILabel();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.uiPanel4 = new Sunny.UI.UIPanel();
this.p2 = new Sunny.UI.UIPanel();
this.m12 = new Sunny.UI.UILabel();
this.m11 = new Sunny.UI.UILabel();
this.m10 = new Sunny.UI.UILabel();
@ -146,7 +147,7 @@ namespace Sunny.UI
this.m2 = new Sunny.UI.UILabel();
this.m1 = new Sunny.UI.UILabel();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.uiPanel5 = new Sunny.UI.UIPanel();
this.p3 = new Sunny.UI.UIPanel();
this.d42 = new Sunny.UI.UILabel();
this.d35 = new Sunny.UI.UILabel();
this.d28 = new Sunny.UI.UILabel();
@ -200,11 +201,11 @@ namespace Sunny.UI
this.TopPanel.SuspendLayout();
this.TabControl.SuspendLayout();
this.tabPage1.SuspendLayout();
this.uiPanel2.SuspendLayout();
this.p1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.uiPanel4.SuspendLayout();
this.p2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.uiPanel5.SuspendLayout();
this.p3.SuspendLayout();
this.SuspendLayout();
//
// TopPanel
@ -214,6 +215,7 @@ namespace Sunny.UI
this.TopPanel.Controls.Add(this.b2);
this.TopPanel.Controls.Add(this.b1);
this.TopPanel.Dock = System.Windows.Forms.DockStyle.Top;
this.TopPanel.FillColor = System.Drawing.Color.White;
this.TopPanel.Font = new System.Drawing.Font("微软雅黑", 12F);
this.TopPanel.Location = new System.Drawing.Point(0, 0);
this.TopPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
@ -221,7 +223,9 @@ namespace Sunny.UI
this.TopPanel.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.TopPanel.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)(((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top)
| System.Windows.Forms.ToolStripStatusLabelBorderSides.Right)));
this.TopPanel.Size = new System.Drawing.Size(312, 31);
this.TopPanel.Size = new System.Drawing.Size(461, 31);
this.TopPanel.Style = Sunny.UI.UIStyle.Custom;
this.TopPanel.StyleCustomMode = true;
this.TopPanel.TabIndex = 0;
this.TopPanel.Text = "2020-05-05";
this.TopPanel.Click += new System.EventHandler(this.TopPanel_Click);
@ -231,19 +235,20 @@ namespace Sunny.UI
this.b4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.b4.BackColor = System.Drawing.Color.Transparent;
this.b4.Cursor = System.Windows.Forms.Cursors.Hand;
this.b4.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.b4.FillColor = System.Drawing.Color.White;
this.b4.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b4.Font = new System.Drawing.Font("微软雅黑", 12F);
this.b4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b4.ImageInterval = 0;
this.b4.Location = new System.Drawing.Point(278, 4);
this.b4.Location = new System.Drawing.Point(427, 4);
this.b4.Name = "b4";
this.b4.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0);
this.b4.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b4.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b4.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.b4.Size = new System.Drawing.Size(30, 24);
this.b4.Style = Sunny.UI.UIStyle.LightBlue;
this.b4.Style = Sunny.UI.UIStyle.Custom;
this.b4.StyleCustomMode = true;
this.b4.Symbol = 61697;
this.b4.TabIndex = 3;
this.b4.Click += new System.EventHandler(this.b4_Click);
@ -253,19 +258,20 @@ namespace Sunny.UI
this.b3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.b3.BackColor = System.Drawing.Color.Transparent;
this.b3.Cursor = System.Windows.Forms.Cursors.Hand;
this.b3.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.b3.FillColor = System.Drawing.Color.White;
this.b3.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.b3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b3.ImageInterval = 0;
this.b3.Location = new System.Drawing.Point(242, 4);
this.b3.Location = new System.Drawing.Point(391, 4);
this.b3.Name = "b3";
this.b3.Padding = new System.Windows.Forms.Padding(24, 0, 0, 0);
this.b3.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.b3.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b3.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.b3.Size = new System.Drawing.Size(30, 24);
this.b3.Style = Sunny.UI.UIStyle.LightBlue;
this.b3.Style = Sunny.UI.UIStyle.Custom;
this.b3.StyleCustomMode = true;
this.b3.Symbol = 61701;
this.b3.TabIndex = 2;
this.b3.Click += new System.EventHandler(this.b3_Click);
@ -274,7 +280,7 @@ namespace Sunny.UI
//
this.b2.BackColor = System.Drawing.Color.Transparent;
this.b2.Cursor = System.Windows.Forms.Cursors.Hand;
this.b2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.b2.FillColor = System.Drawing.Color.White;
this.b2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.b2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
@ -286,7 +292,8 @@ namespace Sunny.UI
this.b2.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b2.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.b2.Size = new System.Drawing.Size(30, 24);
this.b2.Style = Sunny.UI.UIStyle.LightBlue;
this.b2.Style = Sunny.UI.UIStyle.Custom;
this.b2.StyleCustomMode = true;
this.b2.Symbol = 61700;
this.b2.TabIndex = 1;
this.b2.Click += new System.EventHandler(this.b2_Click);
@ -295,7 +302,7 @@ namespace Sunny.UI
//
this.b1.BackColor = System.Drawing.Color.Transparent;
this.b1.Cursor = System.Windows.Forms.Cursors.Hand;
this.b1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.b1.FillColor = System.Drawing.Color.White;
this.b1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.b1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
@ -307,7 +314,8 @@ namespace Sunny.UI
this.b1.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.b1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.b1.Size = new System.Drawing.Size(30, 24);
this.b1.Style = Sunny.UI.UIStyle.LightBlue;
this.b1.Style = Sunny.UI.UIStyle.Custom;
this.b1.StyleCustomMode = true;
this.b1.Symbol = 61696;
this.b1.TabIndex = 0;
this.b1.Click += new System.EventHandler(this.b1_Click);
@ -320,47 +328,49 @@ namespace Sunny.UI
this.TabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.TabControl.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
this.TabControl.Font = new System.Drawing.Font("微软雅黑", 12F);
this.TabControl.ItemSize = new System.Drawing.Size(0, 1);
this.TabControl.ItemSize = new System.Drawing.Size(150, 40);
this.TabControl.Location = new System.Drawing.Point(0, 31);
this.TabControl.Name = "TabControl";
this.TabControl.SelectedIndex = 0;
this.TabControl.Size = new System.Drawing.Size(312, 169);
this.TabControl.Size = new System.Drawing.Size(461, 317);
this.TabControl.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.TabControl.Style = Sunny.UI.UIStyle.Custom;
this.TabControl.TabIndex = 1;
this.TabControl.TabVisible = false;
this.TabControl.SelectedIndexChanged += new System.EventHandler(this.TabControl_SelectedIndexChanged);
//
// tabPage1
//
this.tabPage1.Controls.Add(this.uiPanel2);
this.tabPage1.Controls.Add(this.p1);
this.tabPage1.Location = new System.Drawing.Point(0, 40);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(312, 129);
this.tabPage1.Size = new System.Drawing.Size(461, 277);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// uiPanel2
// p1
//
this.uiPanel2.Controls.Add(this.y10);
this.uiPanel2.Controls.Add(this.y9);
this.uiPanel2.Controls.Add(this.y8);
this.uiPanel2.Controls.Add(this.y7);
this.uiPanel2.Controls.Add(this.y6);
this.uiPanel2.Controls.Add(this.y5);
this.uiPanel2.Controls.Add(this.y4);
this.uiPanel2.Controls.Add(this.y3);
this.uiPanel2.Controls.Add(this.y2);
this.uiPanel2.Controls.Add(this.y1);
this.uiPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.uiPanel2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiPanel2.Location = new System.Drawing.Point(0, 0);
this.uiPanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiPanel2.Name = "uiPanel2";
this.uiPanel2.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.uiPanel2.Size = new System.Drawing.Size(312, 129);
this.uiPanel2.TabIndex = 0;
this.uiPanel2.Text = null;
this.p1.Controls.Add(this.y10);
this.p1.Controls.Add(this.y9);
this.p1.Controls.Add(this.y8);
this.p1.Controls.Add(this.y7);
this.p1.Controls.Add(this.y6);
this.p1.Controls.Add(this.y5);
this.p1.Controls.Add(this.y4);
this.p1.Controls.Add(this.y3);
this.p1.Controls.Add(this.y2);
this.p1.Controls.Add(this.y1);
this.p1.Dock = System.Windows.Forms.DockStyle.Fill;
this.p1.FillColor = System.Drawing.Color.White;
this.p1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.p1.Location = new System.Drawing.Point(0, 0);
this.p1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.p1.Name = "p1";
this.p1.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.p1.Size = new System.Drawing.Size(461, 277);
this.p1.Style = Sunny.UI.UIStyle.Custom;
this.p1.TabIndex = 0;
this.p1.Text = null;
//
// y10
//
@ -504,37 +514,39 @@ namespace Sunny.UI
//
// tabPage2
//
this.tabPage2.Controls.Add(this.uiPanel4);
this.tabPage2.Location = new System.Drawing.Point(0, 0);
this.tabPage2.Controls.Add(this.p2);
this.tabPage2.Location = new System.Drawing.Point(0, 40);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(312, 169);
this.tabPage2.Size = new System.Drawing.Size(461, 277);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// uiPanel4
// p2
//
this.uiPanel4.Controls.Add(this.m12);
this.uiPanel4.Controls.Add(this.m11);
this.uiPanel4.Controls.Add(this.m10);
this.uiPanel4.Controls.Add(this.m9);
this.uiPanel4.Controls.Add(this.m8);
this.uiPanel4.Controls.Add(this.m7);
this.uiPanel4.Controls.Add(this.m6);
this.uiPanel4.Controls.Add(this.m5);
this.uiPanel4.Controls.Add(this.m4);
this.uiPanel4.Controls.Add(this.m3);
this.uiPanel4.Controls.Add(this.m2);
this.uiPanel4.Controls.Add(this.m1);
this.uiPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.uiPanel4.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiPanel4.Location = new System.Drawing.Point(0, 0);
this.uiPanel4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiPanel4.Name = "uiPanel4";
this.uiPanel4.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.uiPanel4.Size = new System.Drawing.Size(312, 169);
this.uiPanel4.TabIndex = 1;
this.uiPanel4.Text = null;
this.p2.Controls.Add(this.m12);
this.p2.Controls.Add(this.m11);
this.p2.Controls.Add(this.m10);
this.p2.Controls.Add(this.m9);
this.p2.Controls.Add(this.m8);
this.p2.Controls.Add(this.m7);
this.p2.Controls.Add(this.m6);
this.p2.Controls.Add(this.m5);
this.p2.Controls.Add(this.m4);
this.p2.Controls.Add(this.m3);
this.p2.Controls.Add(this.m2);
this.p2.Controls.Add(this.m1);
this.p2.Dock = System.Windows.Forms.DockStyle.Fill;
this.p2.FillColor = System.Drawing.Color.White;
this.p2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.p2.Location = new System.Drawing.Point(0, 0);
this.p2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.p2.Name = "p2";
this.p2.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.p2.Size = new System.Drawing.Size(461, 277);
this.p2.Style = Sunny.UI.UIStyle.Custom;
this.p2.TabIndex = 1;
this.p2.Text = null;
//
// m12
//
@ -706,75 +718,77 @@ namespace Sunny.UI
//
// tabPage3
//
this.tabPage3.Controls.Add(this.uiPanel5);
this.tabPage3.Controls.Add(this.p3);
this.tabPage3.Location = new System.Drawing.Point(0, 40);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(312, 129);
this.tabPage3.Size = new System.Drawing.Size(461, 277);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "tabPage3";
this.tabPage3.UseVisualStyleBackColor = true;
//
// uiPanel5
// p3
//
this.uiPanel5.Controls.Add(this.d42);
this.uiPanel5.Controls.Add(this.d35);
this.uiPanel5.Controls.Add(this.d28);
this.uiPanel5.Controls.Add(this.d21);
this.uiPanel5.Controls.Add(this.d14);
this.uiPanel5.Controls.Add(this.d7);
this.uiPanel5.Controls.Add(this.d41);
this.uiPanel5.Controls.Add(this.d34);
this.uiPanel5.Controls.Add(this.d27);
this.uiPanel5.Controls.Add(this.d20);
this.uiPanel5.Controls.Add(this.d13);
this.uiPanel5.Controls.Add(this.d6);
this.uiPanel5.Controls.Add(this.d40);
this.uiPanel5.Controls.Add(this.d33);
this.uiPanel5.Controls.Add(this.d26);
this.uiPanel5.Controls.Add(this.d19);
this.uiPanel5.Controls.Add(this.d12);
this.uiPanel5.Controls.Add(this.d5);
this.uiPanel5.Controls.Add(this.d39);
this.uiPanel5.Controls.Add(this.d32);
this.uiPanel5.Controls.Add(this.d25);
this.uiPanel5.Controls.Add(this.d18);
this.uiPanel5.Controls.Add(this.d11);
this.uiPanel5.Controls.Add(this.d4);
this.uiPanel5.Controls.Add(this.d38);
this.uiPanel5.Controls.Add(this.d31);
this.uiPanel5.Controls.Add(this.d24);
this.uiPanel5.Controls.Add(this.d17);
this.uiPanel5.Controls.Add(this.d10);
this.uiPanel5.Controls.Add(this.d3);
this.uiPanel5.Controls.Add(this.d37);
this.uiPanel5.Controls.Add(this.d30);
this.uiPanel5.Controls.Add(this.d23);
this.uiPanel5.Controls.Add(this.d16);
this.uiPanel5.Controls.Add(this.d9);
this.uiPanel5.Controls.Add(this.d2);
this.uiPanel5.Controls.Add(this.uiLabel13);
this.uiPanel5.Controls.Add(this.uiLabel12);
this.uiPanel5.Controls.Add(this.uiLabel11);
this.uiPanel5.Controls.Add(this.uiLabel10);
this.uiPanel5.Controls.Add(this.uiLabel9);
this.uiPanel5.Controls.Add(this.uiLabel7);
this.uiPanel5.Controls.Add(this.d36);
this.uiPanel5.Controls.Add(this.d29);
this.uiPanel5.Controls.Add(this.d22);
this.uiPanel5.Controls.Add(this.d15);
this.uiPanel5.Controls.Add(this.d8);
this.uiPanel5.Controls.Add(this.d1);
this.uiPanel5.Controls.Add(this.uiLabel1);
this.uiPanel5.Controls.Add(this.uiLine1);
this.uiPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.uiPanel5.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiPanel5.Location = new System.Drawing.Point(0, 0);
this.uiPanel5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiPanel5.Name = "uiPanel5";
this.uiPanel5.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.uiPanel5.Size = new System.Drawing.Size(312, 129);
this.uiPanel5.TabIndex = 2;
this.uiPanel5.Text = null;
this.p3.Controls.Add(this.d42);
this.p3.Controls.Add(this.d35);
this.p3.Controls.Add(this.d28);
this.p3.Controls.Add(this.d21);
this.p3.Controls.Add(this.d14);
this.p3.Controls.Add(this.d7);
this.p3.Controls.Add(this.d41);
this.p3.Controls.Add(this.d34);
this.p3.Controls.Add(this.d27);
this.p3.Controls.Add(this.d20);
this.p3.Controls.Add(this.d13);
this.p3.Controls.Add(this.d6);
this.p3.Controls.Add(this.d40);
this.p3.Controls.Add(this.d33);
this.p3.Controls.Add(this.d26);
this.p3.Controls.Add(this.d19);
this.p3.Controls.Add(this.d12);
this.p3.Controls.Add(this.d5);
this.p3.Controls.Add(this.d39);
this.p3.Controls.Add(this.d32);
this.p3.Controls.Add(this.d25);
this.p3.Controls.Add(this.d18);
this.p3.Controls.Add(this.d11);
this.p3.Controls.Add(this.d4);
this.p3.Controls.Add(this.d38);
this.p3.Controls.Add(this.d31);
this.p3.Controls.Add(this.d24);
this.p3.Controls.Add(this.d17);
this.p3.Controls.Add(this.d10);
this.p3.Controls.Add(this.d3);
this.p3.Controls.Add(this.d37);
this.p3.Controls.Add(this.d30);
this.p3.Controls.Add(this.d23);
this.p3.Controls.Add(this.d16);
this.p3.Controls.Add(this.d9);
this.p3.Controls.Add(this.d2);
this.p3.Controls.Add(this.uiLabel13);
this.p3.Controls.Add(this.uiLabel12);
this.p3.Controls.Add(this.uiLabel11);
this.p3.Controls.Add(this.uiLabel10);
this.p3.Controls.Add(this.uiLabel9);
this.p3.Controls.Add(this.uiLabel7);
this.p3.Controls.Add(this.d36);
this.p3.Controls.Add(this.d29);
this.p3.Controls.Add(this.d22);
this.p3.Controls.Add(this.d15);
this.p3.Controls.Add(this.d8);
this.p3.Controls.Add(this.d1);
this.p3.Controls.Add(this.uiLabel1);
this.p3.Controls.Add(this.uiLine1);
this.p3.Dock = System.Windows.Forms.DockStyle.Fill;
this.p3.FillColor = System.Drawing.Color.White;
this.p3.Font = new System.Drawing.Font("微软雅黑", 12F);
this.p3.Location = new System.Drawing.Point(0, 0);
this.p3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.p3.Name = "p3";
this.p3.RadiusSides = Sunny.UI.UICornerRadiusSides.None;
this.p3.Size = new System.Drawing.Size(461, 277);
this.p3.Style = Sunny.UI.UIStyle.Custom;
this.p3.TabIndex = 2;
this.p3.Text = null;
//
// d42
//
@ -1401,6 +1415,7 @@ namespace Sunny.UI
//
// uiLine1
//
this.uiLine1.FillColor = System.Drawing.Color.White;
this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine1.LineColor = System.Drawing.Color.Silver;
this.uiLine1.Location = new System.Drawing.Point(4, 19);
@ -1415,18 +1430,19 @@ namespace Sunny.UI
//
this.Controls.Add(this.TabControl);
this.Controls.Add(this.TopPanel);
this.FillColor = System.Drawing.Color.White;
this.Name = "UIDateTimeItem";
this.Size = new System.Drawing.Size(312, 200);
this.Size = new System.Drawing.Size(461, 348);
this.Style = Sunny.UI.UIStyle.Custom;
this.TopPanel.ResumeLayout(false);
this.TabControl.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.uiPanel2.ResumeLayout(false);
this.p1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.uiPanel4.ResumeLayout(false);
this.p2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.uiPanel5.ResumeLayout(false);
this.p3.ResumeLayout(false);
this.ResumeLayout(false);
}
public UIDateTimeItem()
@ -1470,7 +1486,7 @@ namespace Sunny.UI
DateTime lblDate = (DateTime)label.Tag;
label.ForeColor = (lblDate.Year == Year && lblDate.Month == Month)
? UIFontColor.Primary
: UIFontColor.Plain;
: Color.DarkGray;
if (lblDate.DateString().Equals(date.DateString()))
{
@ -1479,14 +1495,12 @@ namespace Sunny.UI
}
}
private void Label_MouseEnter(object sender, EventArgs e)
{
UILabel label = (UILabel)sender;
label.ForeColor = UIColor.Blue;
}
private void TopPanel_Click(object sender, EventArgs e)
{
TabControl.SelectedTab = tabPage1;
@ -1548,7 +1562,7 @@ namespace Sunny.UI
label.Tag = lblDate;
label.ForeColor = (lblDate.Year == iYear && lblDate.Month == iMonth)
? UIFontColor.Primary
: UIFontColor.Plain;
: Color.DarkGray;
if (lblDate.DateString().Equals(date.DateString()))
{
@ -1573,9 +1587,11 @@ namespace Sunny.UI
label.Text = (iy + i - 1).ToString();
}
break;
case 1:
TopPanel.Text = Year + "年";
break;
case 2:
TopPanel.Text = Year + "年" + Month + "月";
break;
@ -1609,10 +1625,12 @@ namespace Sunny.UI
label.Text = (iy + i - 1).ToString();
}
break;
case 1:
Year -= 1;
TopPanel.Text = Year + "年";
break;
case 2:
Year -= 1;
SetYearMonth(Year, Month);
@ -1652,15 +1670,25 @@ namespace Sunny.UI
label.Text = (iy + i - 1).ToString();
}
break;
case 1:
Year += 1;
TopPanel.Text = Year + "年";
break;
case 2:
Year += 1;
SetYearMonth(Year, Month);
break;
}
}
public override void SetRectColor(Color color)
{
base.SetRectColor(color);
RectColor = color;
b1.ForeColor = b2.ForeColor = b3.ForeColor = b4.ForeColor = color;
TopPanel.RectColor = p1.RectColor = p2.RectColor = p3.RectColor = color;
}
}
}

View File

@ -297,6 +297,7 @@ namespace Sunny.UI
ItemForm.SetRectColor(rectColor);
ItemForm.SetFillColor(fillColor);
ItemForm.SetForeColor(foreColor);
ItemForm.SetStyle(UIStyles.GetStyleColor(UIStyles.Style));
}
ButtonClick?.Invoke(this, e);

View File

@ -320,5 +320,10 @@ namespace Sunny.UI
{
Item?.SetForeColor(color);
}
public void SetStyle(UIBaseStyle style)
{
Item?.SetStyle(style);
}
}
}

View File

@ -92,5 +92,9 @@ namespace Sunny.UI
UIDropDown parent = (UIDropDown)Parent;
parent?.Close();
}
public virtual void SetStyle(UIBaseStyle style)
{
}
}
}

View File

@ -20,6 +20,8 @@
******************************************************************************/
using System;
using System.Diagnostics.SymbolStore;
using System.Drawing;
namespace Sunny.UI
{
@ -43,6 +45,9 @@ namespace Sunny.UI
private UILabel sb;
private UILabel mb;
private UILabel hb;
private System.Windows.Forms.Timer timer1;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.Timer timer2;
private UILine uiLine2;
public UITimeItem()
@ -111,6 +116,7 @@ namespace Sunny.UI
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.uiLine1 = new Sunny.UI.UILine();
this.uiLine2 = new Sunny.UI.UILine();
this.s1 = new Sunny.UI.UISymbolButton();
@ -130,10 +136,13 @@ namespace Sunny.UI
this.sb = new Sunny.UI.UILabel();
this.mb = new Sunny.UI.UILabel();
this.hb = new Sunny.UI.UILabel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// uiLine1
//
this.uiLine1.FillColor = System.Drawing.Color.White;
this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine1.LineColor = System.Drawing.Color.Silver;
this.uiLine1.Location = new System.Drawing.Point(11, 60);
@ -146,6 +155,7 @@ namespace Sunny.UI
//
// uiLine2
//
this.uiLine2.FillColor = System.Drawing.Color.White;
this.uiLine2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiLine2.LineColor = System.Drawing.Color.Silver;
this.uiLine2.Location = new System.Drawing.Point(11, 94);
@ -160,7 +170,7 @@ namespace Sunny.UI
//
this.s1.BackColor = System.Drawing.Color.Transparent;
this.s1.Cursor = System.Windows.Forms.Cursors.Hand;
this.s1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.s1.FillColor = System.Drawing.Color.White;
this.s1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.s1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.s1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
@ -172,17 +182,20 @@ namespace Sunny.UI
this.s1.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.s1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.s1.Size = new System.Drawing.Size(30, 24);
this.s1.Style = Sunny.UI.UIStyle.LightBlue;
this.s1.Style = Sunny.UI.UIStyle.Custom;
this.s1.StyleCustomMode = true;
this.s1.Symbol = 61702;
this.s1.TabIndex = 6;
this.s1.Tag = "3";
this.s1.Click += new System.EventHandler(this.s1_Click);
this.s1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.h1_MouseDown);
this.s1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.h1_MouseUp);
//
// m1
//
this.m1.BackColor = System.Drawing.Color.Transparent;
this.m1.Cursor = System.Windows.Forms.Cursors.Hand;
this.m1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.m1.FillColor = System.Drawing.Color.White;
this.m1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.m1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.m1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
@ -194,17 +207,20 @@ namespace Sunny.UI
this.m1.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.m1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.m1.Size = new System.Drawing.Size(30, 24);
this.m1.Style = Sunny.UI.UIStyle.LightBlue;
this.m1.Style = Sunny.UI.UIStyle.Custom;
this.m1.StyleCustomMode = true;
this.m1.Symbol = 61702;
this.m1.TabIndex = 5;
this.m1.Tag = "2";
this.m1.Click += new System.EventHandler(this.m1_Click);
this.m1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.h1_MouseDown);
this.m1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.h1_MouseUp);
//
// h1
//
this.h1.BackColor = System.Drawing.Color.Transparent;
this.h1.Cursor = System.Windows.Forms.Cursors.Hand;
this.h1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.h1.FillColor = System.Drawing.Color.White;
this.h1.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.h1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.h1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
@ -216,17 +232,20 @@ namespace Sunny.UI
this.h1.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.h1.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.h1.Size = new System.Drawing.Size(30, 24);
this.h1.Style = Sunny.UI.UIStyle.LightBlue;
this.h1.Style = Sunny.UI.UIStyle.Custom;
this.h1.StyleCustomMode = true;
this.h1.Symbol = 61702;
this.h1.TabIndex = 4;
this.h1.Tag = "1";
this.h1.Click += new System.EventHandler(this.h1_Click);
this.h1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.h1_MouseDown);
this.h1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.h1_MouseUp);
//
// s2
//
this.s2.BackColor = System.Drawing.Color.Transparent;
this.s2.Cursor = System.Windows.Forms.Cursors.Hand;
this.s2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.s2.FillColor = System.Drawing.Color.White;
this.s2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.s2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.s2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
@ -238,17 +257,20 @@ namespace Sunny.UI
this.s2.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.s2.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.s2.Size = new System.Drawing.Size(30, 24);
this.s2.Style = Sunny.UI.UIStyle.LightBlue;
this.s2.Style = Sunny.UI.UIStyle.Custom;
this.s2.StyleCustomMode = true;
this.s2.Symbol = 61703;
this.s2.TabIndex = 9;
this.s2.Tag = "6";
this.s2.Click += new System.EventHandler(this.s2_Click);
this.s2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.h1_MouseDown);
this.s2.MouseUp += new System.Windows.Forms.MouseEventHandler(this.h1_MouseUp);
//
// m2
//
this.m2.BackColor = System.Drawing.Color.Transparent;
this.m2.Cursor = System.Windows.Forms.Cursors.Hand;
this.m2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.m2.FillColor = System.Drawing.Color.White;
this.m2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.m2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.m2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
@ -260,17 +282,20 @@ namespace Sunny.UI
this.m2.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.m2.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.m2.Size = new System.Drawing.Size(30, 24);
this.m2.Style = Sunny.UI.UIStyle.LightBlue;
this.m2.Style = Sunny.UI.UIStyle.Custom;
this.m2.StyleCustomMode = true;
this.m2.Symbol = 61703;
this.m2.TabIndex = 8;
this.m2.Tag = "5";
this.m2.Click += new System.EventHandler(this.m2_Click);
this.m2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.h1_MouseDown);
this.m2.MouseUp += new System.Windows.Forms.MouseEventHandler(this.h1_MouseUp);
//
// h2
//
this.h2.BackColor = System.Drawing.Color.Transparent;
this.h2.Cursor = System.Windows.Forms.Cursors.Hand;
this.h2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.h2.FillColor = System.Drawing.Color.White;
this.h2.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.h2.Font = new System.Drawing.Font("微软雅黑", 12F);
this.h2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
@ -282,11 +307,14 @@ namespace Sunny.UI
this.h2.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
this.h2.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None;
this.h2.Size = new System.Drawing.Size(30, 24);
this.h2.Style = Sunny.UI.UIStyle.LightBlue;
this.h2.Style = Sunny.UI.UIStyle.Custom;
this.h2.StyleCustomMode = true;
this.h2.Symbol = 61703;
this.h2.TabIndex = 7;
this.h2.Tag = "4";
this.h2.Click += new System.EventHandler(this.h2_Click);
this.h2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.h1_MouseDown);
this.h2.MouseUp += new System.Windows.Forms.MouseEventHandler(this.h1_MouseUp);
//
// btnOK
//
@ -353,7 +381,7 @@ namespace Sunny.UI
//
this.st.BackColor = System.Drawing.Color.Transparent;
this.st.Font = new System.Drawing.Font("微软雅黑", 12F);
this.st.ForeColor = System.Drawing.Color.Gray;
this.st.ForeColor = System.Drawing.Color.DarkGray;
this.st.Location = new System.Drawing.Point(126, 40);
this.st.Name = "st";
this.st.Size = new System.Drawing.Size(35, 22);
@ -366,7 +394,7 @@ namespace Sunny.UI
//
this.mt.BackColor = System.Drawing.Color.Transparent;
this.mt.Font = new System.Drawing.Font("微软雅黑", 12F);
this.mt.ForeColor = System.Drawing.Color.Gray;
this.mt.ForeColor = System.Drawing.Color.DarkGray;
this.mt.Location = new System.Drawing.Point(73, 40);
this.mt.Name = "mt";
this.mt.Size = new System.Drawing.Size(35, 22);
@ -379,7 +407,7 @@ namespace Sunny.UI
//
this.ht.BackColor = System.Drawing.Color.Transparent;
this.ht.Font = new System.Drawing.Font("微软雅黑", 12F);
this.ht.ForeColor = System.Drawing.Color.Gray;
this.ht.ForeColor = System.Drawing.Color.DarkGray;
this.ht.Location = new System.Drawing.Point(20, 40);
this.ht.Name = "ht";
this.ht.Size = new System.Drawing.Size(35, 22);
@ -392,7 +420,7 @@ namespace Sunny.UI
//
this.sb.BackColor = System.Drawing.Color.Transparent;
this.sb.Font = new System.Drawing.Font("微软雅黑", 12F);
this.sb.ForeColor = System.Drawing.Color.Gray;
this.sb.ForeColor = System.Drawing.Color.DarkGray;
this.sb.Location = new System.Drawing.Point(126, 106);
this.sb.Name = "sb";
this.sb.Size = new System.Drawing.Size(35, 22);
@ -405,7 +433,7 @@ namespace Sunny.UI
//
this.mb.BackColor = System.Drawing.Color.Transparent;
this.mb.Font = new System.Drawing.Font("微软雅黑", 12F);
this.mb.ForeColor = System.Drawing.Color.Gray;
this.mb.ForeColor = System.Drawing.Color.DarkGray;
this.mb.Location = new System.Drawing.Point(73, 106);
this.mb.Name = "mb";
this.mb.Size = new System.Drawing.Size(35, 22);
@ -418,7 +446,7 @@ namespace Sunny.UI
//
this.hb.BackColor = System.Drawing.Color.Transparent;
this.hb.Font = new System.Drawing.Font("微软雅黑", 12F);
this.hb.ForeColor = System.Drawing.Color.Gray;
this.hb.ForeColor = System.Drawing.Color.DarkGray;
this.hb.Location = new System.Drawing.Point(20, 106);
this.hb.Name = "hb";
this.hb.Size = new System.Drawing.Size(35, 22);
@ -427,6 +455,15 @@ namespace Sunny.UI
this.hb.Text = "00";
this.hb.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// timer1
//
this.timer1.Interval = 500;
this.timer1.Tick += new System.EventHandler(this.timer_Tick);
//
// timer2
//
this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
//
// UITimeItem
//
this.Controls.Add(this.sb);
@ -448,14 +485,16 @@ namespace Sunny.UI
this.Controls.Add(this.h1);
this.Controls.Add(this.uiLine2);
this.Controls.Add(this.uiLine1);
this.FillColor = System.Drawing.Color.White;
this.Name = "UITimeItem";
this.Size = new System.Drawing.Size(179, 200);
this.Style = Sunny.UI.UIStyle.Custom;
this.ResumeLayout(false);
}
private void h1_Click(object sender, EventArgs e)
{
Hour = (hour - 1 + 24).Mod(24);
Hour = (Hour - 1 + 24).Mod(24);
ShowOther();
}
@ -473,7 +512,7 @@ namespace Sunny.UI
private void h2_Click(object sender, EventArgs e)
{
Hour = (hour + 1 + 24).Mod(24);
Hour = (Hour + 1 + 24).Mod(24);
ShowOther();
}
@ -500,5 +539,58 @@ namespace Sunny.UI
{
CloseParent();
}
private int buttonIndex;
private bool isEnd;
private void timer2_Tick(object sender, EventArgs e)
{
switch (buttonIndex)
{
case 1: h1_Click(null, null); break;
case 2: m1_Click(null, null); break;
case 3: s1_Click(null, null); break;
case 4: h2_Click(null, null); break;
case 5: m2_Click(null, null); break;
case 6: s2_Click(null, null); break;
}
if (isEnd) timer2.Stop();
}
private void timer_Tick(object sender, EventArgs e)
{
timer1.Stop();
if (!isEnd) timer2.Start();
}
private void h1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
isEnd = false;
buttonIndex = ((UISymbolButton)sender).Tag.ToString().ToInt();
timer1.Start();
}
private void h1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
timer1.Stop();
isEnd = true;
}
public override void SetStyle(UIBaseStyle style)
{
base.SetStyle(style);
btnOK.SetStyleColor(style);
btnCancel.SetStyleColor(style);
}
public override void SetRectColor(Color color)
{
base.SetRectColor(color);
RectColor = color;
h1.ForeColor = h2.ForeColor = color;
m1.ForeColor = m2.ForeColor = color;
s1.ForeColor = s2.ForeColor = color;
}
}
}

View File

@ -117,4 +117,10 @@
<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>
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>107, 17</value>
</metadata>
</root>

View File

@ -39,7 +39,6 @@ namespace Sunny.UI
{
if (UIStyles.Style != value && value != UIStyle.Custom)
{
UIStyles.SetStyle(value);
}
}

View File

@ -424,6 +424,9 @@
<EmbeddedResource Include="Controls\DropItem\UIComboBoxItem.resx">
<DependentUpon>UIComboBoxItem.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\DropItem\UIDateTimeItem.resx">
<DependentUpon>UIDateTimeItem.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\DropItem\UITimeItem.resx">
<DependentUpon>UITimeItem.cs</DependentUpon>
</EmbeddedResource>