forked from fdorg/flashdevelop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArgEditor.cs
More file actions
100 lines (89 loc) · 2.7 KB
/
Copy pathArgEditor.cs
File metadata and controls
100 lines (89 loc) · 2.7 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
using System;
using System.Windows.Forms;
namespace FlashDevelop.Controls
{
public class ArgEditor : UserControl
{
Label argLabel;
ComboBox argValues;
public ArgEditor(string args, string[] values)
{
InitializeComponent();
argLabel.Text = args;
Font = PluginCore.PluginBase.Settings.DefaultFont;
if (values.Length > 0)
{
argValues.Items.AddRange(values);
Value = values[0];
}
}
#region Windows Forms Designer Generated Code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent()
{
argLabel = new Label();
argValues = new FlatCombo();
SuspendLayout();
//
// argLabel
//
argLabel.FlatStyle = FlatStyle.System;
argLabel.Location = new System.Drawing.Point(0, 3);
argLabel.Margin = new Padding(0);
argLabel.Name = "argLabel";
argLabel.Size = new System.Drawing.Size(100, 22);
argLabel.TabIndex = 0;
argLabel.Text = "Argument";
argLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// argValues
//
argValues.FormattingEnabled = true;
argValues.Location = new System.Drawing.Point(105, 1);
argValues.Name = "argValues";
argValues.Size = new System.Drawing.Size(160, 22);
argValues.TabIndex = 1;
//
// ArgEditor
//
AutoSize = true;
Controls.Add(argValues);
Controls.Add(argLabel);
AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
AutoScaleMode = AutoScaleMode.Font;
Name = "ArgEditor";
Size = new System.Drawing.Size(270, 25);
ResumeLayout(false);
}
#endregion
#region Methods And Event Handlers
/// <summary>
///
/// </summary>
protected override void OnGotFocus(EventArgs e)
{
base.OnGotFocus(e);
argValues.Focus();
}
/// <summary>
///
/// </summary>
public string Argument
{
get => argLabel.Text;
set => argLabel.Text = value;
}
/// <summary>
///
/// </summary>
public string Value
{
get => argValues.Text;
set => argValues.Text = value;
}
#endregion
}
}