-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathElementProperties_Popup.cs
41 lines (38 loc) · 1.3 KB
/
ElementProperties_Popup.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
using System;
using System.Windows.Forms;
using ProtoTest.Specter;
namespace ProtoTest.XpathBuilder
{
public partial class ElementProperties_Popup : Form
{
public ElementProperties_Popup()
{
InitializeComponent();
}
private void Ok_button_Click(object sender, EventArgs e)
{
if (ElementName_tb.Text != "" && !ElementName_tb.Text.Contains(" "))
{
Program.elements[Program.elements.Count - 1].ElementName = ElementName_tb.Text;
//This function gets called when the user changes tabs
//This function gets called when the user changes tabs
Program.specter.Elements_rtb.Clear();
for (int x = 0; x < Program.elements.Count; x++)
{
Program.specter.Elements_rtb.AppendText(Program.elements[x].GetGolemElement());
Program.specter.Elements_rtb.AppendText("\n");
}
this.Dispose();
}
else
{
ErrorText_Label.Visible = true;
}
}
private void Cancel_button_Click(object sender, EventArgs e)
{
Program.elements.RemoveAt(Program.elements.Count - 1);
Dispose();
}
}
}