89 |
cycrow |
1 |
#pragma once
|
|
|
2 |
|
|
|
3 |
#include <spk.h>
|
|
|
4 |
|
|
|
5 |
using namespace System;
|
|
|
6 |
using namespace System::ComponentModel;
|
|
|
7 |
using namespace System::Collections;
|
|
|
8 |
using namespace System::Windows::Forms;
|
|
|
9 |
using namespace System::Data;
|
|
|
10 |
using namespace System::Drawing;
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
namespace PluginManager {
|
|
|
14 |
|
|
|
15 |
/// <summary>
|
|
|
16 |
/// Summary for CommandSlots
|
|
|
17 |
///
|
|
|
18 |
/// WARNING: If you change the name of this class, you will need to change the
|
|
|
19 |
/// 'Resource File Name' property for the managed resource compiler tool
|
|
|
20 |
/// associated with all .resx files this class depends on. Otherwise,
|
|
|
21 |
/// the designers will not be able to interact properly with localized
|
|
|
22 |
/// resources associated with this form.
|
|
|
23 |
/// </summary>
|
|
|
24 |
public ref class CommandSlots : public System::Windows::Forms::Form
|
|
|
25 |
{
|
|
|
26 |
public:
|
|
|
27 |
CommandSlots(CPackages *packages) : _pPackages(packages)
|
|
|
28 |
{
|
|
|
29 |
InitializeComponent();
|
|
|
30 |
|
|
|
31 |
updateCommands();
|
|
|
32 |
}
|
|
|
33 |
|
|
|
34 |
void updateCommands();
|
|
|
35 |
|
|
|
36 |
protected:
|
|
|
37 |
System::String ^_commandType(int id);
|
|
|
38 |
System::String ^_commandSlot(int id, bool bWing);
|
|
|
39 |
void _updateCommands(CLinkList<SCommandSlot> &list, ListView ^listView);
|
|
|
40 |
void _updateCommandConflicts(CLinkList<SCommandSlot> &list, bool bWing);
|
|
|
41 |
int _commandIcon(int id);
|
|
|
42 |
|
|
|
43 |
private: System::Windows::Forms::ColumnHeader^ columnHeader2;
|
|
|
44 |
protected:
|
|
|
45 |
private: System::Windows::Forms::ColumnHeader^ columnHeader3;
|
|
|
46 |
private: System::Windows::Forms::ColumnHeader^ columnHeader4;
|
|
|
47 |
private: System::Windows::Forms::ColumnHeader^ columnHeader5;
|
|
|
48 |
private: System::Windows::Forms::ColumnHeader^ columnHeader6;
|
|
|
49 |
private: System::Windows::Forms::TabControl^ tabControl1;
|
|
|
50 |
private: System::Windows::Forms::TabPage^ tabPage1;
|
|
|
51 |
private: System::Windows::Forms::TabPage^ tabPage2;
|
|
|
52 |
private: System::Windows::Forms::ListView^ listView2;
|
|
|
53 |
private: System::Windows::Forms::ColumnHeader^ columnHeader7;
|
|
|
54 |
private: System::Windows::Forms::ColumnHeader^ columnHeader8;
|
|
|
55 |
private: System::Windows::Forms::ColumnHeader^ columnHeader9;
|
|
|
56 |
private: System::Windows::Forms::ColumnHeader^ columnHeader10;
|
|
|
57 |
private: System::Windows::Forms::ColumnHeader^ columnHeader11;
|
|
|
58 |
private: System::Windows::Forms::ColumnHeader^ columnHeader12;
|
|
|
59 |
private: System::Windows::Forms::ImageList^ imageList1;
|
|
|
60 |
private: System::Windows::Forms::TabPage^ tabPage3;
|
|
|
61 |
private: System::Windows::Forms::ListView^ listView3;
|
|
|
62 |
private: System::Windows::Forms::ColumnHeader^ columnHeader13;
|
|
|
63 |
private: System::Windows::Forms::ColumnHeader^ columnHeader14;
|
|
|
64 |
private: System::Windows::Forms::ColumnHeader^ columnHeader15;
|
|
|
65 |
|
|
|
66 |
CPackages *_pPackages;
|
|
|
67 |
|
|
|
68 |
/// <summary>
|
|
|
69 |
/// Clean up any resources being used.
|
|
|
70 |
/// </summary>
|
|
|
71 |
~CommandSlots()
|
|
|
72 |
{
|
|
|
73 |
if (components)
|
|
|
74 |
{
|
|
|
75 |
delete components;
|
|
|
76 |
}
|
|
|
77 |
}
|
|
|
78 |
private: System::Windows::Forms::Button^ button1;
|
|
|
79 |
protected:
|
|
|
80 |
private: System::Windows::Forms::ListView^ listView1;
|
|
|
81 |
private: System::Windows::Forms::ColumnHeader^ columnHeader1;
|
|
|
82 |
private: System::ComponentModel::IContainer^ components;
|
|
|
83 |
|
|
|
84 |
private:
|
|
|
85 |
/// <summary>
|
|
|
86 |
/// Required designer variable.
|
|
|
87 |
/// </summary>
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
#pragma region Windows Form Designer generated code
|
|
|
91 |
/// <summary>
|
|
|
92 |
/// Required method for Designer support - do not modify
|
|
|
93 |
/// the contents of this method with the code editor.
|
|
|
94 |
/// </summary>
|
|
|
95 |
void InitializeComponent(void)
|
|
|
96 |
{
|
|
|
97 |
this->components = (gcnew System::ComponentModel::Container());
|
|
|
98 |
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(CommandSlots::typeid));
|
|
|
99 |
this->button1 = (gcnew System::Windows::Forms::Button());
|
|
|
100 |
this->listView1 = (gcnew System::Windows::Forms::ListView());
|
|
|
101 |
this->columnHeader1 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
102 |
this->columnHeader2 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
103 |
this->columnHeader3 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
104 |
this->columnHeader4 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
105 |
this->columnHeader5 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
106 |
this->columnHeader6 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
107 |
this->imageList1 = (gcnew System::Windows::Forms::ImageList(this->components));
|
|
|
108 |
this->tabControl1 = (gcnew System::Windows::Forms::TabControl());
|
|
|
109 |
this->tabPage1 = (gcnew System::Windows::Forms::TabPage());
|
|
|
110 |
this->tabPage2 = (gcnew System::Windows::Forms::TabPage());
|
|
|
111 |
this->listView2 = (gcnew System::Windows::Forms::ListView());
|
|
|
112 |
this->columnHeader7 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
113 |
this->columnHeader8 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
114 |
this->columnHeader9 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
115 |
this->columnHeader10 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
116 |
this->columnHeader11 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
117 |
this->columnHeader12 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
118 |
this->tabPage3 = (gcnew System::Windows::Forms::TabPage());
|
|
|
119 |
this->listView3 = (gcnew System::Windows::Forms::ListView());
|
|
|
120 |
this->columnHeader13 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
121 |
this->columnHeader14 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
122 |
this->columnHeader15 = (gcnew System::Windows::Forms::ColumnHeader());
|
|
|
123 |
this->tabControl1->SuspendLayout();
|
|
|
124 |
this->tabPage1->SuspendLayout();
|
|
|
125 |
this->tabPage2->SuspendLayout();
|
|
|
126 |
this->tabPage3->SuspendLayout();
|
|
|
127 |
this->SuspendLayout();
|
|
|
128 |
//
|
|
|
129 |
// button1
|
|
|
130 |
//
|
|
|
131 |
this->button1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Right));
|
|
|
132 |
this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
|
|
|
133 |
this->button1->Location = System::Drawing::Point(667, 468);
|
|
|
134 |
this->button1->Name = L"button1";
|
|
|
135 |
this->button1->Size = System::Drawing::Size(102, 41);
|
|
|
136 |
this->button1->TabIndex = 0;
|
|
|
137 |
this->button1->Text = L"Close";
|
|
|
138 |
this->button1->UseVisualStyleBackColor = true;
|
|
|
139 |
//
|
|
|
140 |
// listView1
|
|
|
141 |
//
|
|
|
142 |
this->listView1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom)
|
|
|
143 |
| System::Windows::Forms::AnchorStyles::Left)
|
|
|
144 |
| System::Windows::Forms::AnchorStyles::Right));
|
|
|
145 |
this->listView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^ >(6) {this->columnHeader1, this->columnHeader2,
|
|
|
146 |
this->columnHeader3, this->columnHeader4, this->columnHeader5, this->columnHeader6});
|
|
|
147 |
this->listView1->FullRowSelect = true;
|
|
|
148 |
this->listView1->LargeImageList = this->imageList1;
|
|
|
149 |
this->listView1->Location = System::Drawing::Point(-4, 0);
|
|
|
150 |
this->listView1->Name = L"listView1";
|
|
|
151 |
this->listView1->Size = System::Drawing::Size(757, 411);
|
|
|
152 |
this->listView1->SmallImageList = this->imageList1;
|
|
|
153 |
this->listView1->TabIndex = 1;
|
|
|
154 |
this->listView1->UseCompatibleStateImageBehavior = false;
|
|
|
155 |
this->listView1->View = System::Windows::Forms::View::Details;
|
|
|
156 |
//
|
|
|
157 |
// columnHeader1
|
|
|
158 |
//
|
|
|
159 |
this->columnHeader1->Text = L"Slot";
|
|
|
160 |
//
|
|
|
161 |
// columnHeader2
|
|
|
162 |
//
|
|
|
163 |
this->columnHeader2->Text = L"Name";
|
|
|
164 |
//
|
|
|
165 |
// columnHeader3
|
|
|
166 |
//
|
|
|
167 |
this->columnHeader3->Text = L"Package";
|
|
|
168 |
//
|
|
|
169 |
// columnHeader4
|
|
|
170 |
//
|
|
|
171 |
this->columnHeader4->Text = L"Short Name";
|
|
|
172 |
//
|
|
|
173 |
// columnHeader5
|
|
|
174 |
//
|
|
|
175 |
this->columnHeader5->Text = L"Info";
|
|
|
176 |
//
|
|
|
177 |
// columnHeader6
|
|
|
178 |
//
|
|
|
179 |
this->columnHeader6->Text = L"ID";
|
|
|
180 |
//
|
|
|
181 |
// imageList1
|
|
|
182 |
//
|
|
|
183 |
this->imageList1->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^ >(resources->GetObject(L"imageList1.ImageStream")));
|
|
|
184 |
this->imageList1->TransparentColor = System::Drawing::Color::Transparent;
|
|
|
185 |
this->imageList1->Images->SetKeyName(0, L"navigation.png");
|
|
|
186 |
this->imageList1->Images->SetKeyName(1, L"combat.png");
|
|
|
187 |
this->imageList1->Images->SetKeyName(2, L"trade.png");
|
|
|
188 |
this->imageList1->Images->SetKeyName(3, L"special.png");
|
|
|
189 |
this->imageList1->Images->SetKeyName(4, L"pirate.png");
|
|
|
190 |
this->imageList1->Images->SetKeyName(5, L"command.png");
|
|
|
191 |
this->imageList1->Images->SetKeyName(6, L"stock_init.png");
|
|
|
192 |
this->imageList1->Images->SetKeyName(7, L"sandman_gun.png");
|
|
|
193 |
this->imageList1->Images->SetKeyName(8, L"commandprompt.ico");
|
|
|
194 |
this->imageList1->Images->SetKeyName(9, L"space_station.png");
|
|
|
195 |
this->imageList1->Images->SetKeyName(10, L"run.png");
|
|
|
196 |
this->imageList1->Images->SetKeyName(11, L"tf_droid_control_ship.png");
|
|
|
197 |
this->imageList1->Images->SetKeyName(12, L"plus_minus2.png");
|
|
|
198 |
this->imageList1->Images->SetKeyName(13, L"Actions-dialog-ok-apply-icon.png");
|
|
|
199 |
this->imageList1->Images->SetKeyName(14, L"no.png");
|
|
|
200 |
this->imageList1->Images->SetKeyName(15, L"emblem_cvs_conflict.png");
|
|
|
201 |
this->imageList1->Images->SetKeyName(16, L"angel_wing.png");
|
|
|
202 |
//
|
|
|
203 |
// tabControl1
|
|
|
204 |
//
|
|
|
205 |
this->tabControl1->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom)
|
|
|
206 |
| System::Windows::Forms::AnchorStyles::Left)
|
|
|
207 |
| System::Windows::Forms::AnchorStyles::Right));
|
|
|
208 |
this->tabControl1->Controls->Add(this->tabPage1);
|
|
|
209 |
this->tabControl1->Controls->Add(this->tabPage2);
|
|
|
210 |
this->tabControl1->Controls->Add(this->tabPage3);
|
|
|
211 |
this->tabControl1->ImageList = this->imageList1;
|
|
|
212 |
this->tabControl1->Location = System::Drawing::Point(12, 12);
|
|
|
213 |
this->tabControl1->Name = L"tabControl1";
|
|
|
214 |
this->tabControl1->SelectedIndex = 0;
|
|
|
215 |
this->tabControl1->Size = System::Drawing::Size(757, 450);
|
|
|
216 |
this->tabControl1->TabIndex = 2;
|
|
|
217 |
//
|
|
|
218 |
// tabPage1
|
|
|
219 |
//
|
|
|
220 |
this->tabPage1->Controls->Add(this->listView1);
|
|
|
221 |
this->tabPage1->ImageKey = L"commandprompt.ico";
|
|
|
222 |
this->tabPage1->Location = System::Drawing::Point(4, 39);
|
|
|
223 |
this->tabPage1->Name = L"tabPage1";
|
|
|
224 |
this->tabPage1->Padding = System::Windows::Forms::Padding(3);
|
|
|
225 |
this->tabPage1->Size = System::Drawing::Size(749, 407);
|
|
|
226 |
this->tabPage1->TabIndex = 0;
|
|
|
227 |
this->tabPage1->Text = L"Commands";
|
|
|
228 |
this->tabPage1->UseVisualStyleBackColor = true;
|
|
|
229 |
//
|
|
|
230 |
// tabPage2
|
|
|
231 |
//
|
|
|
232 |
this->tabPage2->Controls->Add(this->listView2);
|
|
|
233 |
this->tabPage2->ImageIndex = 16;
|
|
|
234 |
this->tabPage2->Location = System::Drawing::Point(4, 39);
|
|
|
235 |
this->tabPage2->Name = L"tabPage2";
|
|
|
236 |
this->tabPage2->Padding = System::Windows::Forms::Padding(3);
|
|
|
237 |
this->tabPage2->Size = System::Drawing::Size(749, 407);
|
|
|
238 |
this->tabPage2->TabIndex = 1;
|
|
|
239 |
this->tabPage2->Text = L"Wing Commands";
|
|
|
240 |
this->tabPage2->UseVisualStyleBackColor = true;
|
|
|
241 |
//
|
|
|
242 |
// listView2
|
|
|
243 |
//
|
|
|
244 |
this->listView2->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom)
|
|
|
245 |
| System::Windows::Forms::AnchorStyles::Left)
|
|
|
246 |
| System::Windows::Forms::AnchorStyles::Right));
|
|
|
247 |
this->listView2->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^ >(6) {this->columnHeader7, this->columnHeader8,
|
|
|
248 |
this->columnHeader9, this->columnHeader10, this->columnHeader11, this->columnHeader12});
|
|
|
249 |
this->listView2->FullRowSelect = true;
|
|
|
250 |
this->listView2->LargeImageList = this->imageList1;
|
|
|
251 |
this->listView2->Location = System::Drawing::Point(-4, 0);
|
|
|
252 |
this->listView2->Name = L"listView2";
|
|
|
253 |
this->listView2->Size = System::Drawing::Size(757, 411);
|
|
|
254 |
this->listView2->SmallImageList = this->imageList1;
|
|
|
255 |
this->listView2->TabIndex = 0;
|
|
|
256 |
this->listView2->UseCompatibleStateImageBehavior = false;
|
|
|
257 |
this->listView2->View = System::Windows::Forms::View::Details;
|
|
|
258 |
//
|
|
|
259 |
// columnHeader7
|
|
|
260 |
//
|
|
|
261 |
this->columnHeader7->Text = L"Slot";
|
|
|
262 |
//
|
|
|
263 |
// columnHeader8
|
|
|
264 |
//
|
|
|
265 |
this->columnHeader8->Text = L"Name";
|
|
|
266 |
//
|
|
|
267 |
// columnHeader9
|
|
|
268 |
//
|
|
|
269 |
this->columnHeader9->Text = L"Package";
|
|
|
270 |
//
|
|
|
271 |
// columnHeader10
|
|
|
272 |
//
|
|
|
273 |
this->columnHeader10->Text = L"Short Name";
|
|
|
274 |
//
|
|
|
275 |
// columnHeader11
|
|
|
276 |
//
|
|
|
277 |
this->columnHeader11->Text = L"Info";
|
|
|
278 |
//
|
|
|
279 |
// columnHeader12
|
|
|
280 |
//
|
|
|
281 |
this->columnHeader12->Text = L"ID";
|
|
|
282 |
//
|
|
|
283 |
// tabPage3
|
|
|
284 |
//
|
|
|
285 |
this->tabPage3->Controls->Add(this->listView3);
|
|
|
286 |
this->tabPage3->ImageIndex = 15;
|
|
|
287 |
this->tabPage3->Location = System::Drawing::Point(4, 39);
|
|
|
288 |
this->tabPage3->Name = L"tabPage3";
|
|
|
289 |
this->tabPage3->Padding = System::Windows::Forms::Padding(3);
|
|
|
290 |
this->tabPage3->Size = System::Drawing::Size(749, 407);
|
|
|
291 |
this->tabPage3->TabIndex = 2;
|
|
|
292 |
this->tabPage3->Text = L"Conflicts";
|
|
|
293 |
this->tabPage3->UseVisualStyleBackColor = true;
|
|
|
294 |
//
|
|
|
295 |
// listView3
|
|
|
296 |
//
|
|
|
297 |
this->listView3->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom)
|
|
|
298 |
| System::Windows::Forms::AnchorStyles::Left)
|
|
|
299 |
| System::Windows::Forms::AnchorStyles::Right));
|
|
|
300 |
this->listView3->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^ >(3) {this->columnHeader13, this->columnHeader14,
|
|
|
301 |
this->columnHeader15});
|
|
|
302 |
this->listView3->FullRowSelect = true;
|
|
|
303 |
this->listView3->LargeImageList = this->imageList1;
|
|
|
304 |
this->listView3->Location = System::Drawing::Point(-4, 0);
|
|
|
305 |
this->listView3->Name = L"listView3";
|
|
|
306 |
this->listView3->Size = System::Drawing::Size(757, 411);
|
|
|
307 |
this->listView3->SmallImageList = this->imageList1;
|
|
|
308 |
this->listView3->TabIndex = 0;
|
|
|
309 |
this->listView3->UseCompatibleStateImageBehavior = false;
|
|
|
310 |
this->listView3->View = System::Windows::Forms::View::Details;
|
|
|
311 |
//
|
|
|
312 |
// columnHeader13
|
|
|
313 |
//
|
|
|
314 |
this->columnHeader13->Text = L"Package";
|
|
|
315 |
//
|
|
|
316 |
// columnHeader14
|
|
|
317 |
//
|
|
|
318 |
this->columnHeader14->Text = L"Name";
|
|
|
319 |
//
|
|
|
320 |
// columnHeader15
|
|
|
321 |
//
|
|
|
322 |
this->columnHeader15->Text = L"Info";
|
|
|
323 |
//
|
|
|
324 |
// CommandSlots
|
|
|
325 |
//
|
|
|
326 |
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
|
|
|
327 |
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
|
|
328 |
this->ClientSize = System::Drawing::Size(781, 521);
|
|
|
329 |
this->Controls->Add(this->tabControl1);
|
|
|
330 |
this->Controls->Add(this->button1);
|
|
|
331 |
this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon")));
|
|
|
332 |
this->Name = L"CommandSlots";
|
|
|
333 |
this->Text = L"CommandSlots";
|
|
|
334 |
this->tabControl1->ResumeLayout(false);
|
|
|
335 |
this->tabPage1->ResumeLayout(false);
|
|
|
336 |
this->tabPage2->ResumeLayout(false);
|
|
|
337 |
this->tabPage3->ResumeLayout(false);
|
|
|
338 |
this->ResumeLayout(false);
|
|
|
339 |
|
|
|
340 |
}
|
|
|
341 |
#pragma endregion
|
|
|
342 |
};
|
|
|
343 |
}
|