-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustom_ToolStrip_UC_Label_NUD.cs
55 lines (49 loc) · 1.44 KB
/
Custom_ToolStrip_UC_Label_NUD.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ImageShaper
{
public partial class Custom_ToolStrip_UC_Label_NUD : UserControl
{
public float LabelWidth
{
get { return this.tableLayoutPanel1.ColumnStyles[0].Width; }
set { this.tableLayoutPanel1.ColumnStyles[0].Width = value; }
}
public override string Text
{
get { return this.label1.Text; }
set { this.label1.Text = value; }
}
public decimal Value
{
get { return this.numericUpDown1.Value; }
set
{
decimal d = value;
if (d > this.numericUpDown1.Maximum) d = this.numericUpDown1.Maximum;
if (d < this.numericUpDown1.Minimum) d = this.numericUpDown1.Minimum;
this.numericUpDown1.Value = d;
}
}
public decimal Maximum
{
get { return this.numericUpDown1.Maximum; }
set { this.numericUpDown1.Maximum = value; }
}
public decimal Minimum
{
get { return this.numericUpDown1.Minimum; }
set { this.numericUpDown1.Minimum = value; }
}
public Custom_ToolStrip_UC_Label_NUD()
{
InitializeComponent();
}
}
}