-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm2.cs
More file actions
46 lines (40 loc) · 1.31 KB
/
Form2.cs
File metadata and controls
46 lines (40 loc) · 1.31 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
namespace Cyber_Sleuth_Mod_Evolution_Analyzer
{
public partial class Form2 : Form
{
readonly List<DSCSMod> dscsMods;
string[] modFolders;
public Form2(List<DSCSMod> mods)
{
InitializeComponent();
dscsMods = mods.Where(x => x.Generated).ToList();
var empty = new string[] { "" };
modFolders = empty.Concat(dscsMods.Select(x => x.Folder)).ToArray();
folderName.Items.AddRange(modFolders);
}
private void folderName_TextChanged(object sender, EventArgs e)
{
if (folderName.SelectedIndex > 0)
{
modName.Text = dscsMods[folderName.SelectedIndex - 1].Name;
}
else
{
modName.Text = folderName.Text;
}
}
private void modName_TextChanged(object sender, EventArgs e)
{
folderName.Text = modName.Text.Trim().ToLower();
}
private void okButton_Click(object sender, EventArgs e)
{
if (folderName.Text.Length > 0)
{
this.DialogResult = DialogResult.OK;
}
}
public string ModName { get { return modName.Text; } }
public string ModFolder { get { return folderName.Text; } }
}
}