-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroupEditorForm.cs
More file actions
62 lines (54 loc) · 1.44 KB
/
GroupEditorForm.cs
File metadata and controls
62 lines (54 loc) · 1.44 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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static DNA64.Library.Common;
namespace NppLauncher {
public partial class GroupEditorForm : Form {
public string Data = "";
public bool CloneFlag = false;
public GroupEditorForm() {
InitializeComponent();
}
void ConfigSetDefaultString(dynamic obj, string var, string data) {
if (!isset(obj, var)) {
//
// Add default value into ExpandoObject
//
var dictionary = (IDictionary<string, object>)obj;
dictionary.Add(var, data);
}
}
void Config2UI() {
textBox_Name.Text = Data;
}
void UI2Config() {
string OldData = Data;
Data = textBox_Name.Text;
if (checkBox_Clone.Checked) {
if (Data == OldData) {
Data = OldData + " (Clone)";
}
}
CloneFlag = checkBox_Clone.Checked;
}
private void button_OK_Click(object sender, EventArgs e) {
UI2Config();
this.DialogResult = DialogResult.OK;
this.Close();
}
private void button_Cancel_Click(object sender, EventArgs e) {
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void NewGroupDialog_Load(object sender, EventArgs e) {
//Data = "";
Config2UI();
}
}
}