diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll index c3cacf11..347ecb39 100644 Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ diff --git a/SunnyUI/Controls/UIDoubleUpDown.cs b/SunnyUI/Controls/UIDoubleUpDown.cs index b6dec2df..fbe3b1ea 100644 --- a/SunnyUI/Controls/UIDoubleUpDown.cs +++ b/SunnyUI/Controls/UIDoubleUpDown.cs @@ -23,6 +23,8 @@ using System; using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; namespace Sunny.UI { @@ -36,6 +38,19 @@ namespace Sunny.UI { InitializeComponent(); ShowText = false; + edit.Type = UITextBox.UIEditType.Double; + edit.Parent = pnlValue; + edit.Visible = false; + edit.BorderStyle = BorderStyle.None; + edit.TextChanged += Edit_TextChanged; + } + + private void Edit_TextChanged(object sender, EventArgs e) + { + if (edit != null && edit.Visible) + { + Value = edit.Text.ToDouble(); + } } protected override void OnFontChanged(EventArgs e) @@ -46,7 +61,7 @@ namespace Sunny.UI public event OnValueChanged ValueChanged; - private double _value = 0; + private double _value; [DefaultValue(0)] [Description("选中数值"), Category("SunnyUI")] @@ -73,20 +88,27 @@ namespace Sunny.UI public double Step { get => step; - set - { - step = Math.Abs(value); - } + set => step = Math.Abs(value); } private void btnAdd_Click(object sender, EventArgs e) { Value += Step; + if (edit.Visible) + { + edit.Visible = false; + pnlValue.FillColor = pnlColor; + } } private void btnDec_Click(object sender, EventArgs e) { Value -= Step; + if (edit.Visible) + { + edit.Visible = false; + pnlValue.FillColor = pnlColor; + } } private double _maximum = double.MaxValue; @@ -104,6 +126,7 @@ namespace Sunny.UI _minimum = _maximum; Value = CheckMaxMin(Value); + edit.MaxValue = _maximum; Invalidate(); } } @@ -120,6 +143,7 @@ namespace Sunny.UI _maximum = _minimum; Value = CheckMaxMin(Value); + edit.MinValue = _minimum; Invalidate(); } } @@ -155,6 +179,7 @@ namespace Sunny.UI { hasMaximum = value; Value = CheckMaxMin(Value); + edit.HasMaxValue = value; Invalidate(); } } @@ -171,9 +196,26 @@ namespace Sunny.UI { hasMinimum = value; Value = CheckMaxMin(Value); + edit.HasMinValue = value; Invalidate(); } } } + + private readonly UIEdit edit = new UIEdit(); + private Color pnlColor; + private void pnlValue_DoubleClick(object sender, EventArgs e) + { + edit.Left = 1; + edit.Top = (pnlValue.Height - edit.Height) / 2; + edit.Width = pnlValue.Width - 2; + pnlColor = pnlValue.FillColor; + pnlValue.FillColor = Color.White; + edit.TextAlign = HorizontalAlignment.Center; + edit.Text = pnlValue.Text; + edit.DecLength = Decimal; + edit.Visible = true; + edit.BringToFront(); + } } } \ No newline at end of file diff --git a/SunnyUI/Controls/UIDoubleUpDown.designer.cs b/SunnyUI/Controls/UIDoubleUpDown.designer.cs index b2ce725d..fb7b67f6 100644 --- a/SunnyUI/Controls/UIDoubleUpDown.designer.cs +++ b/SunnyUI/Controls/UIDoubleUpDown.designer.cs @@ -37,31 +37,17 @@ // this.btnDec.Cursor = System.Windows.Forms.Cursors.Hand; this.btnDec.Dock = System.Windows.Forms.DockStyle.Left; - this.btnDec.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.btnDec.FillDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); - this.btnDec.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(168)))), ((int)(((byte)(255))))); - this.btnDec.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229))))); this.btnDec.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnDec.ForeColor = System.Drawing.Color.White; - this.btnDec.ForeDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(103))))); - this.btnDec.ForeHoverColor = System.Drawing.Color.White; - this.btnDec.ForePressColor = System.Drawing.Color.White; this.btnDec.ImageInterval = 1; this.btnDec.Location = new System.Drawing.Point(0, 0); this.btnDec.Margin = new System.Windows.Forms.Padding(0); + this.btnDec.MinimumSize = new System.Drawing.Size(1, 1); this.btnDec.Name = "btnDec"; this.btnDec.Padding = new System.Windows.Forms.Padding(26, 0, 0, 0); this.btnDec.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.LeftTop | Sunny.UI.UICornerRadiusSides.LeftBottom))); - this.btnDec.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.btnDec.RectDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(178)))), ((int)(((byte)(181))))); - this.btnDec.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(168)))), ((int)(((byte)(255))))); - this.btnDec.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229))))); this.btnDec.Size = new System.Drawing.Size(29, 29); - this.btnDec.Style = Sunny.UI.UIStyle.Blue; this.btnDec.Symbol = 61544; this.btnDec.TabIndex = 0; - this.btnDec.Text = null; - this.btnDec.TipsFont = new System.Drawing.Font("Microsoft Sans Serif", 9F); this.btnDec.TipsText = null; this.btnDec.Click += new System.EventHandler(this.btnDec_Click); // @@ -69,63 +55,43 @@ // this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand; this.btnAdd.Dock = System.Windows.Forms.DockStyle.Right; - this.btnAdd.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.btnAdd.FillDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); - this.btnAdd.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(168)))), ((int)(((byte)(255))))); - this.btnAdd.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229))))); this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnAdd.ForeColor = System.Drawing.Color.White; - this.btnAdd.ForeDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(103))))); - this.btnAdd.ForeHoverColor = System.Drawing.Color.White; - this.btnAdd.ForePressColor = System.Drawing.Color.White; this.btnAdd.ImageInterval = 1; this.btnAdd.Location = new System.Drawing.Point(87, 0); this.btnAdd.Margin = new System.Windows.Forms.Padding(0); + this.btnAdd.MinimumSize = new System.Drawing.Size(1, 1); this.btnAdd.Name = "btnAdd"; this.btnAdd.Padding = new System.Windows.Forms.Padding(26, 0, 0, 0); this.btnAdd.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.RightTop | Sunny.UI.UICornerRadiusSides.RightBottom))); - this.btnAdd.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.btnAdd.RectDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(178)))), ((int)(((byte)(181))))); - this.btnAdd.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(168)))), ((int)(((byte)(255))))); - this.btnAdd.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229))))); this.btnAdd.Size = new System.Drawing.Size(29, 29); - this.btnAdd.Style = Sunny.UI.UIStyle.Blue; this.btnAdd.Symbol = 61543; this.btnAdd.TabIndex = 1; - this.btnAdd.Text = null; - this.btnAdd.TipsFont = new System.Drawing.Font("Microsoft Sans Serif", 9F); this.btnAdd.TipsText = null; this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); // // pnlValue // this.pnlValue.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlValue.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.pnlValue.FillDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); this.pnlValue.Font = new System.Drawing.Font("微软雅黑", 12F); - this.pnlValue.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); - this.pnlValue.ForeDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(103))))); this.pnlValue.Location = new System.Drawing.Point(29, 0); this.pnlValue.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.pnlValue.MinimumSize = new System.Drawing.Size(1, 1); this.pnlValue.Name = "pnlValue"; - this.pnlValue.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.pnlValue.RectDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(178)))), ((int)(((byte)(181))))); + this.pnlValue.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.pnlValue.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Top | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); - this.pnlValue.RadiusSides = UICornerRadiusSides.None; this.pnlValue.Size = new System.Drawing.Size(58, 29); - this.pnlValue.Style = Sunny.UI.UIStyle.Blue; this.pnlValue.TabIndex = 2; this.pnlValue.Text = "0"; + this.pnlValue.DoubleClick += new System.EventHandler(this.pnlValue_DoubleClick); // - // UIIntegerUpDown + // UIDoubleUpDown // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.Controls.Add(this.pnlValue); this.Controls.Add(this.btnAdd); this.Controls.Add(this.btnDec); this.MinimumSize = new System.Drawing.Size(100, 0); - this.Name = "UIIntegerUpDown"; + this.Name = "UIDoubleUpDown"; this.Size = new System.Drawing.Size(116, 29); this.ResumeLayout(false); diff --git a/SunnyUI/Controls/UIDoubleUpDown.resx b/SunnyUI/Controls/UIDoubleUpDown.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/SunnyUI/Controls/UIDoubleUpDown.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SunnyUI/Controls/UIIntegerUpDown.cs b/SunnyUI/Controls/UIIntegerUpDown.cs index 2d8c2582..30703edd 100644 --- a/SunnyUI/Controls/UIIntegerUpDown.cs +++ b/SunnyUI/Controls/UIIntegerUpDown.cs @@ -23,6 +23,8 @@ using System; using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; namespace Sunny.UI { @@ -36,6 +38,19 @@ namespace Sunny.UI { InitializeComponent(); ShowText = false; + edit.Type = UITextBox.UIEditType.Integer; + edit.Parent = pnlValue; + edit.Visible = false; + edit.BorderStyle = BorderStyle.None; + edit.TextChanged += Edit_TextChanged; + } + + private void Edit_TextChanged(object sender, EventArgs e) + { + if (edit != null && edit.Visible) + { + Value = edit.Text.ToInt(); + } } public event OnValueChanged ValueChanged; @@ -69,17 +84,27 @@ namespace Sunny.UI public int Step { get => step; - set { step = Math.Max(1, value); } + set => step = Math.Max(1, value); } private void btnAdd_Click(object sender, EventArgs e) { Value += Step; + if (edit.Visible) + { + edit.Visible = false; + pnlValue.FillColor = pnlColor; + } } private void btnDec_Click(object sender, EventArgs e) { Value -= Step; + if (edit.Visible) + { + edit.Visible = false; + pnlValue.FillColor = pnlColor; + } } private int _maximum = int.MaxValue; @@ -97,6 +122,7 @@ namespace Sunny.UI _minimum = _maximum; Value = CheckMaxMin(Value); + edit.MaxValue = _maximum; Invalidate(); } } @@ -113,6 +139,7 @@ namespace Sunny.UI _maximum = _minimum; Value = CheckMaxMin(Value); + edit.MinValue = _maximum; Invalidate(); } } @@ -148,6 +175,7 @@ namespace Sunny.UI { hasMaximum = value; Value = CheckMaxMin(Value); + edit.HasMaxValue = value; Invalidate(); } } @@ -164,9 +192,25 @@ namespace Sunny.UI { hasMinimum = value; Value = CheckMaxMin(Value); + edit.HasMinValue = value; Invalidate(); } } } + + private readonly UIEdit edit = new UIEdit(); + private Color pnlColor; + private void pnlValue_DoubleClick(object sender, EventArgs e) + { + edit.Left = 1; + edit.Top = (pnlValue.Height - edit.Height) / 2; + edit.Width = pnlValue.Width - 2; + pnlColor = pnlValue.FillColor; + pnlValue.FillColor = Color.White; + edit.TextAlign = HorizontalAlignment.Center; + edit.Text = pnlValue.Text; + edit.Visible = true; + edit.BringToFront(); + } } } \ No newline at end of file diff --git a/SunnyUI/Controls/UIIntegerUpDown.designer.cs b/SunnyUI/Controls/UIIntegerUpDown.designer.cs index 3a373699..34aa2c60 100644 --- a/SunnyUI/Controls/UIIntegerUpDown.designer.cs +++ b/SunnyUI/Controls/UIIntegerUpDown.designer.cs @@ -37,31 +37,17 @@ // this.btnDec.Cursor = System.Windows.Forms.Cursors.Hand; this.btnDec.Dock = System.Windows.Forms.DockStyle.Left; - this.btnDec.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.btnDec.FillDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); - this.btnDec.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(168)))), ((int)(((byte)(255))))); - this.btnDec.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229))))); this.btnDec.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnDec.ForeColor = System.Drawing.Color.White; - this.btnDec.ForeDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(103))))); - this.btnDec.ForeHoverColor = System.Drawing.Color.White; - this.btnDec.ForePressColor = System.Drawing.Color.White; this.btnDec.ImageInterval = 1; this.btnDec.Location = new System.Drawing.Point(0, 0); this.btnDec.Margin = new System.Windows.Forms.Padding(0); + this.btnDec.MinimumSize = new System.Drawing.Size(1, 1); this.btnDec.Name = "btnDec"; this.btnDec.Padding = new System.Windows.Forms.Padding(26, 0, 0, 0); this.btnDec.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.LeftTop | Sunny.UI.UICornerRadiusSides.LeftBottom))); - this.btnDec.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.btnDec.RectDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(178)))), ((int)(((byte)(181))))); - this.btnDec.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(168)))), ((int)(((byte)(255))))); - this.btnDec.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229))))); this.btnDec.Size = new System.Drawing.Size(29, 29); - this.btnDec.Style = Sunny.UI.UIStyle.Blue; this.btnDec.Symbol = 61544; this.btnDec.TabIndex = 0; - this.btnDec.Text = null; - this.btnDec.TipsFont = new System.Drawing.Font("Microsoft Sans Serif", 9F); this.btnDec.TipsText = null; this.btnDec.Click += new System.EventHandler(this.btnDec_Click); // @@ -69,57 +55,37 @@ // this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand; this.btnAdd.Dock = System.Windows.Forms.DockStyle.Right; - this.btnAdd.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.btnAdd.FillDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); - this.btnAdd.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(168)))), ((int)(((byte)(255))))); - this.btnAdd.FillPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229))))); this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnAdd.ForeColor = System.Drawing.Color.White; - this.btnAdd.ForeDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(103))))); - this.btnAdd.ForeHoverColor = System.Drawing.Color.White; - this.btnAdd.ForePressColor = System.Drawing.Color.White; this.btnAdd.ImageInterval = 1; this.btnAdd.Location = new System.Drawing.Point(87, 0); this.btnAdd.Margin = new System.Windows.Forms.Padding(0); + this.btnAdd.MinimumSize = new System.Drawing.Size(1, 1); this.btnAdd.Name = "btnAdd"; this.btnAdd.Padding = new System.Windows.Forms.Padding(26, 0, 0, 0); this.btnAdd.RadiusSides = ((Sunny.UI.UICornerRadiusSides)((Sunny.UI.UICornerRadiusSides.RightTop | Sunny.UI.UICornerRadiusSides.RightBottom))); - this.btnAdd.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.btnAdd.RectDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(178)))), ((int)(((byte)(181))))); - this.btnAdd.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(111)))), ((int)(((byte)(168)))), ((int)(((byte)(255))))); - this.btnAdd.RectPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(131)))), ((int)(((byte)(229))))); this.btnAdd.Size = new System.Drawing.Size(29, 29); - this.btnAdd.Style = Sunny.UI.UIStyle.Blue; this.btnAdd.Symbol = 61543; this.btnAdd.TabIndex = 1; - this.btnAdd.Text = null; - this.btnAdd.TipsFont = new System.Drawing.Font("Microsoft Sans Serif", 9F); this.btnAdd.TipsText = null; this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); // // pnlValue // this.pnlValue.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlValue.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.pnlValue.FillDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); this.pnlValue.Font = new System.Drawing.Font("微软雅黑", 12F); - this.pnlValue.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32))))); - this.pnlValue.ForeDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(103))))); this.pnlValue.Location = new System.Drawing.Point(29, 0); this.pnlValue.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.pnlValue.MinimumSize = new System.Drawing.Size(1, 1); this.pnlValue.Name = "pnlValue"; - this.pnlValue.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(158)))), ((int)(((byte)(255))))); - this.pnlValue.RectDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(173)))), ((int)(((byte)(178)))), ((int)(((byte)(181))))); + this.pnlValue.RadiusSides = Sunny.UI.UICornerRadiusSides.None; this.pnlValue.RectSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((System.Windows.Forms.ToolStripStatusLabelBorderSides.Top | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom))); - this.pnlValue.RadiusSides = UICornerRadiusSides.None; this.pnlValue.Size = new System.Drawing.Size(58, 29); - this.pnlValue.Style = Sunny.UI.UIStyle.Blue; this.pnlValue.TabIndex = 2; this.pnlValue.Text = "0"; + this.pnlValue.DoubleClick += new System.EventHandler(this.pnlValue_DoubleClick); // // UIIntegerUpDown // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.Controls.Add(this.pnlValue); this.Controls.Add(this.btnAdd); diff --git a/SunnyUI/Controls/UIIntegerUpDown.resx b/SunnyUI/Controls/UIIntegerUpDown.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/SunnyUI/Controls/UIIntegerUpDown.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SunnyUI/SunnyUI.csproj b/SunnyUI/SunnyUI.csproj index 7873c862..a178f812 100644 --- a/SunnyUI/SunnyUI.csproj +++ b/SunnyUI/SunnyUI.csproj @@ -534,6 +534,12 @@ + + UIDoubleUpDown.cs + + + UIIntegerUpDown.cs + UIDataGridViewForm.cs