-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathDoubleParameterControl.cs
More file actions
60 lines (53 loc) · 1.69 KB
/
Copy pathDoubleParameterControl.cs
File metadata and controls
60 lines (53 loc) · 1.69 KB
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
56
57
58
59
60
// -------------------------------------------------------------------------------------------
// <copyright file="DoubleParameterControl.cs" company="MapWindow OSS Team - www.mapwindow.org">
// MapWindow OSS Team - 2015
// </copyright>
// -------------------------------------------------------------------------------------------
using System;
using System.Windows.Forms;
namespace MW5.Tools.Controls.Parameters
{
/// <summary>
/// Represents control for entering value of double parameter. Doesn't allow empty values.
/// </summary>
public partial class DoubleParameterControl : ParameterControlBase
{
/// <summary>
/// Initializes a new instance of the <see cref="StringParameterControl"/> class.
/// </summary>
public DoubleParameterControl()
{
InitializeComponent();
buttonAdv1.Visible = false;
}
/// <summary>
/// Gets or sets the caption.
/// </summary>
public override string Caption
{
get { return label1.Text; }
set { label1.Text = value; }
}
/// <summary>
/// Gets control to display tooltip for.
/// </summary>
public override Control ToolTipControl
{
get { return doubleTextBox1; }
}
/// <summary>
/// The get value.
/// </summary>
public override object GetValue()
{
return doubleTextBox1.DoubleValue;
}
/// <summary>
/// Sets the value.
/// </summary>
public override void SetValue(object value)
{
doubleTextBox1.DoubleValue = Convert.ToDouble(value);
}
}
}