-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathTabAdvanced.cs
147 lines (118 loc) · 4.5 KB
/
TabAdvanced.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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Text;
using Decal.Adapter;
using VirindiViewService.Controls;
namespace AceCreator
{
public partial class AceCreator : PluginBase
{
public HudButton ButtonGetParentGUID { get; set; }
public HudButton ButtonLinkChild { get; set; }
public HudButton ButtonCreateGenerator { get; set; }
public HudButton ButtonEditGeneratorList { get; set; }
public HudButton ButtonRefreshGeneratorList { get; set; }
public HudButton ButtonAdvancedRemoveInst { get; set; }
public HudButton ButtonCreateMob { get; set; }
public HudButton ButtonAdvancedAddEncounter { get; set; }
public HudButton ButtonAdvancedRemoveEncounter { get; set; }
public HudTextBox TextBoxEncounterWCID { get; set; }
public HudTextBox TextboxGeneratorWCID { get; set; }
public HudTextBox TextboxParentGUID { get; set; }
public HudTextBox TextboxChildWCID { get; set; }
public HudCombo ChoiceGenerator { get; set; }
public HudCombo ChoiceChildList { get; set; }
// ComboBox Change Events
public void ChoiceChildList_Change(object sender, EventArgs e)
{
try
{
TextboxChildWCID = (HudTextBox)view["TextboxChildWCID"];
string tsplit = ((HudStaticText)ChoiceChildList[ChoiceChildList.Current]).Text;
TextboxChildWCID.Text = tsplit.Split(' ')[0];
}
catch (Exception ex) { Util.LogError(ex); }
}
public void ChoiceGenerator_Change(object sender, EventArgs e)
{
try
{
TextboxGeneratorWCID = (HudTextBox)view["TextboxGeneratorWCID"];
string tsplit = ((HudStaticText)ChoiceGenerator[ChoiceGenerator.Current]).Text;
TextboxGeneratorWCID.Text = tsplit.Split(' ')[0];
}
catch (Exception ex) { Util.LogError(ex); }
}
// Button Events
public void ButtonGetParentGUID_Click(object sender, EventArgs e)
{
try
{
Globals.ButtonCommand = "/getinfo";
CommandWait(sender, e);
}
catch (Exception ex) { Util.LogError(ex); }
}
public void ButtonLinkChild_Click(object sender, EventArgs e)
{
try
{
Util.SendChatCommand("/createinst -p " + TextboxParentGUID.Text +" -c " + TextboxChildWCID.Text);
}
catch (Exception ex) { Util.LogError(ex); }
}
public void ButtonCreateGenerator_Click(object sender, EventArgs e)
{
try
{
Util.SendChatCommand("/createinst " + TextboxGeneratorWCID.Text);
}
catch (Exception ex) { Util.LogError(ex); }
}
public void ButtonEditGeneratorList_Click(object sender, EventArgs e)
{
try
{
string assemblyFolder = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string filePath = System.IO.Path.Combine(assemblyFolder, "parentobjects.ini");
System.Diagnostics.Process.Start(filePath);
Util.WriteToChat(filePath);
}
catch (Exception ex) { Util.LogError(ex); }
}
public void ButtonRefreshGeneratorList_Click(object sender, EventArgs e)
{
try
{
LoadParentObjectsFile();
}
catch (Exception ex) { Util.LogError(ex); }
}
public void ButtonCreateMob_Click(object sender, EventArgs e)
{
try
{
Util.SendChatCommand("/createinst -p GUID -c 1");
}
catch (Exception ex) { Util.LogError(ex); }
}
public void ButtonAdvancedRemoveEncounter_Click(object sender, EventArgs e)
{
try
{
Globals.ButtonCommand = "/removeenc";
CommandWait(sender, e);
}
catch (Exception ex) { Util.LogError(ex); }
}
public void ButtonAdvancedAddEncounter_Click(object sender, EventArgs e)
{
try
{
Util.SendChatCommand("/addenc " + TextBoxEncounterWCID.Text);
}
catch (Exception ex) { Util.LogError(ex); }
}
}
}