Subversion Repositories spk

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 cycrow 1
#pragma once
2
 
3
using namespace System;
4
using namespace System::ComponentModel;
5
using namespace System::Collections;
6
using namespace System::Windows::Forms;
7
using namespace System::Data;
8
using namespace System::Drawing;
9
 
10
#include "WizardBasic1.h"
11
#include "WizardUpdate.h"
12
#include "WizardRebalance.h"
13
#include "WizardCore1.h"
14
 
15
namespace Creator {
16
 
17
	/// <summary>
18
	/// Summary for WizardStartup
19
	/// </summary>
20
#ifdef DESIGNER
21
	public ref class WizardStartup : public System::Windows::Forms::UserControl
22
#else
23
	public ref class WizardStartup : public Creator::WizardCore1
24
#endif
25
	{
26
	public:
27
#ifdef DESIGNER
28
		WizardStartup(Windows::Forms::Form ^parent)
29
#else
30
		WizardStartup(Windows::Forms::Form ^parent) : WizardCore1(parent, NULL)
31
#endif
32
		{
33
			InitializeComponent();
34
 
35
			m_pParent = parent;
36
			this->Tag = "startup";
37
		}
38
 
39
		virtual Windows::Forms::UserControl ^GetNext(CBaseFile *package) override
40
		{
41
			if ( this->radioButton1->Checked )
42
				return gcnew WizardBasic1(m_pParent, package);
43
			else if ( this->radioButton2->Checked )
44
				return gcnew WizardUpdate(m_pParent, package);
45
			else if ( this->radioButton3->Checked )
46
				return gcnew WizardRebalance(m_pParent, package);
47
 
48
			return nullptr;
49
		}
50
 
51
		void DisableOption(RadioButton ^disable, RadioButton ^skip)
52
		{
53
			if ( disable == skip ) return;
54
			disable->Checked = false;
55
		}
56
		void DisableAllOptions(RadioButton ^radio) 
57
		{
58
			this->DisableOption(this->radioButton1, radio);
59
			this->DisableOption(this->radioButton2, radio);
60
			this->DisableOption(this->radioButton3, radio);
61
		}
62
 
63
		void DoChecked(RadioButton ^radio, String ^text, int type)
64
		{
65
			if ( radio->Checked ) {
66
				this->DisableAllOptions(radio);
67
				this->EnableDone(radio->Checked, type);
68
				this->richTextBox1->Text = text;
69
			}
70
		}
71
 
72
	protected:
73
		/// <summary>
74
		/// Clean up any resources being used.
75
		/// </summary>
76
		~WizardStartup()
77
		{
78
			if (components)
79
			{
80
				delete components;
81
			}
82
		}
83
	private: System::Windows::Forms::Label^  label1;
84
	protected: 
85
	private: System::Windows::Forms::Label^  label2;
86
	private: System::Windows::Forms::GroupBox^  groupBox1;
87
	private: System::Windows::Forms::GroupBox^  groupBox2;
88
	private: System::Windows::Forms::FlowLayoutPanel^  flowLayoutPanel1;
89
	private: System::Windows::Forms::RichTextBox^  richTextBox1;
90
	private: System::Windows::Forms::GroupBox^  groupBox3;
91
	private: System::Windows::Forms::RadioButton^  radioButton2;
92
	private: System::Windows::Forms::FlowLayoutPanel^  flowLayoutPanel2;
93
	private: System::Windows::Forms::RadioButton^  radioButton3;
94
	private: System::Windows::Forms::RadioButton^  radioButton1;
95
 
96
	private:
97
		/// <summary>
98
		/// Required designer variable.
99
		/// </summary>
100
		//void EnableDone(bool e, int type);
101
 
102
		Windows::Forms::Form ^m_pParent;
103
 
104
		System::ComponentModel::Container ^components;
105
 
106
#pragma region Windows Form Designer generated code
107
		/// <summary>
108
		/// Required method for Designer support - do not modify
109
		/// the contents of this method with the code editor.
110
		/// </summary>
111
		void InitializeComponent(void)
112
		{
113
			this->label1 = (gcnew System::Windows::Forms::Label());
114
			this->label2 = (gcnew System::Windows::Forms::Label());
115
			this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
116
			this->groupBox2 = (gcnew System::Windows::Forms::GroupBox());
117
			this->flowLayoutPanel1 = (gcnew System::Windows::Forms::FlowLayoutPanel());
118
			this->radioButton1 = (gcnew System::Windows::Forms::RadioButton());
119
			this->radioButton2 = (gcnew System::Windows::Forms::RadioButton());
120
			this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());
121
			this->groupBox3 = (gcnew System::Windows::Forms::GroupBox());
122
			this->flowLayoutPanel2 = (gcnew System::Windows::Forms::FlowLayoutPanel());
123
			this->radioButton3 = (gcnew System::Windows::Forms::RadioButton());
124
			this->groupBox1->SuspendLayout();
125
			this->groupBox2->SuspendLayout();
126
			this->flowLayoutPanel1->SuspendLayout();
127
			this->groupBox3->SuspendLayout();
128
			this->flowLayoutPanel2->SuspendLayout();
129
			this->SuspendLayout();
130
			// 
131
			// label1
132
			// 
133
			this->label1->Dock = System::Windows::Forms::DockStyle::Top;
134
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
135
				static_cast<System::Byte>(0)));
136
			this->label1->Location = System::Drawing::Point(0, 0);
137
			this->label1->Name = L"label1";
138
			this->label1->Size = System::Drawing::Size(433, 105);
139
			this->label1->TabIndex = 0;
140
			this->label1->Text = L"Welcome to the Package Creation Wizard";
141
			this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
142
			// 
143
			// label2
144
			// 
145
			this->label2->Dock = System::Windows::Forms::DockStyle::Fill;
146
			this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
147
				static_cast<System::Byte>(0)));
148
			this->label2->Location = System::Drawing::Point(0, 105);
149
			this->label2->Name = L"label2";
150
			this->label2->Size = System::Drawing::Size(433, 154);
151
			this->label2->TabIndex = 1;
152
			this->label2->Text = L"Select the option below for the type of package you wish to create and the wizard" 
153
				L" will guide you through the required options\r\n";
154
			this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
155
			// 
156
			// groupBox1
157
			// 
158
			this->groupBox1->Controls->Add(this->flowLayoutPanel2);
159
			this->groupBox1->Dock = System::Windows::Forms::DockStyle::Bottom;
160
			this->groupBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
161
				static_cast<System::Byte>(0)));
162
			this->groupBox1->Location = System::Drawing::Point(0, 320);
163
			this->groupBox1->Name = L"groupBox1";
164
			this->groupBox1->Size = System::Drawing::Size(433, 49);
165
			this->groupBox1->TabIndex = 2;
166
			this->groupBox1->TabStop = false;
167
			this->groupBox1->Text = L"Ship Creation";
168
			// 
169
			// groupBox2
170
			// 
171
			this->groupBox2->Controls->Add(this->flowLayoutPanel1);
172
			this->groupBox2->Dock = System::Windows::Forms::DockStyle::Bottom;
173
			this->groupBox2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
174
				static_cast<System::Byte>(0)));
175
			this->groupBox2->Location = System::Drawing::Point(0, 259);
176
			this->groupBox2->Name = L"groupBox2";
177
			this->groupBox2->Size = System::Drawing::Size(433, 61);
178
			this->groupBox2->TabIndex = 3;
179
			this->groupBox2->TabStop = false;
180
			this->groupBox2->Text = L"Package Creation";
181
			// 
182
			// flowLayoutPanel1
183
			// 
184
			this->flowLayoutPanel1->Controls->Add(this->radioButton1);
185
			this->flowLayoutPanel1->Controls->Add(this->radioButton2);
186
			this->flowLayoutPanel1->Dock = System::Windows::Forms::DockStyle::Fill;
187
			this->flowLayoutPanel1->Location = System::Drawing::Point(3, 18);
188
			this->flowLayoutPanel1->Name = L"flowLayoutPanel1";
189
			this->flowLayoutPanel1->Size = System::Drawing::Size(427, 40);
190
			this->flowLayoutPanel1->TabIndex = 1;
191
			// 
192
			// radioButton1
193
			// 
194
			this->radioButton1->AutoSize = true;
195
			this->radioButton1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point, 
196
				static_cast<System::Byte>(0)));
197
			this->radioButton1->Location = System::Drawing::Point(3, 3);
198
			this->radioButton1->Name = L"radioButton1";
199
			this->radioButton1->Size = System::Drawing::Size(118, 20);
200
			this->radioButton1->TabIndex = 0;
201
			this->radioButton1->TabStop = true;
202
			this->radioButton1->Text = L"Basic Package";
203
			this->radioButton1->UseVisualStyleBackColor = true;
204
			this->radioButton1->CheckedChanged += gcnew System::EventHandler(this, &WizardStartup::radioButton1_CheckedChanged);
205
			// 
206
			// radioButton2
207
			// 
208
			this->radioButton2->AutoSize = true;
209
			this->radioButton2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point, 
210
				static_cast<System::Byte>(0)));
211
			this->radioButton2->Location = System::Drawing::Point(127, 3);
212
			this->radioButton2->Name = L"radioButton2";
213
			this->radioButton2->Size = System::Drawing::Size(129, 20);
214
			this->radioButton2->TabIndex = 1;
215
			this->radioButton2->TabStop = true;
216
			this->radioButton2->Text = L"Update Package";
217
			this->radioButton2->UseVisualStyleBackColor = true;
218
			this->radioButton2->CheckedChanged += gcnew System::EventHandler(this, &WizardStartup::radioButton2_CheckedChanged);
219
			// 
220
			// richTextBox1
221
			// 
222
			this->richTextBox1->BackColor = System::Drawing::SystemColors::Control;
223
			this->richTextBox1->Dock = System::Windows::Forms::DockStyle::Fill;
224
			this->richTextBox1->Location = System::Drawing::Point(10, 23);
225
			this->richTextBox1->Name = L"richTextBox1";
226
			this->richTextBox1->ReadOnly = true;
227
			this->richTextBox1->Size = System::Drawing::Size(413, 61);
228
			this->richTextBox1->TabIndex = 4;
229
			this->richTextBox1->Text = L"";
230
			// 
231
			// groupBox3
232
			// 
233
			this->groupBox3->Controls->Add(this->richTextBox1);
234
			this->groupBox3->Dock = System::Windows::Forms::DockStyle::Bottom;
235
			this->groupBox3->Location = System::Drawing::Point(0, 369);
236
			this->groupBox3->Name = L"groupBox3";
237
			this->groupBox3->Padding = System::Windows::Forms::Padding(10);
238
			this->groupBox3->Size = System::Drawing::Size(433, 94);
239
			this->groupBox3->TabIndex = 5;
240
			this->groupBox3->TabStop = false;
241
			this->groupBox3->Text = L"Description";
242
			// 
243
			// flowLayoutPanel2
244
			// 
245
			this->flowLayoutPanel2->Controls->Add(this->radioButton3);
246
			this->flowLayoutPanel2->Dock = System::Windows::Forms::DockStyle::Fill;
247
			this->flowLayoutPanel2->Location = System::Drawing::Point(3, 18);
248
			this->flowLayoutPanel2->Name = L"flowLayoutPanel2";
249
			this->flowLayoutPanel2->Size = System::Drawing::Size(427, 28);
250
			this->flowLayoutPanel2->TabIndex = 0;
251
			// 
252
			// radioButton3
253
			// 
254
			this->radioButton3->AutoSize = true;
255
			this->radioButton3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Italic, System::Drawing::GraphicsUnit::Point, 
256
				static_cast<System::Byte>(0)));
257
			this->radioButton3->Location = System::Drawing::Point(3, 3);
258
			this->radioButton3->Name = L"radioButton3";
259
			this->radioButton3->Size = System::Drawing::Size(137, 20);
260
			this->radioButton3->TabIndex = 1;
261
			this->radioButton3->TabStop = true;
262
			this->radioButton3->Text = L"Rebalance Vanilla";
263
			this->radioButton3->UseVisualStyleBackColor = true;
264
			this->radioButton3->CheckedChanged += gcnew System::EventHandler(this, &WizardStartup::radioButton3_CheckedChanged);
265
			// 
266
			// WizardStartup
267
			// 
268
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
269
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
270
			this->Controls->Add(this->label2);
271
			this->Controls->Add(this->groupBox2);
272
			this->Controls->Add(this->groupBox1);
273
			this->Controls->Add(this->label1);
274
			this->Controls->Add(this->groupBox3);
275
			this->Name = L"WizardStartup";
276
			this->Size = System::Drawing::Size(433, 463);
277
			this->groupBox1->ResumeLayout(false);
278
			this->groupBox2->ResumeLayout(false);
279
			this->flowLayoutPanel1->ResumeLayout(false);
280
			this->flowLayoutPanel1->PerformLayout();
281
			this->groupBox3->ResumeLayout(false);
282
			this->flowLayoutPanel2->ResumeLayout(false);
283
			this->flowLayoutPanel2->PerformLayout();
284
			this->ResumeLayout(false);
285
 
286
		}
287
#pragma endregion
288
	private: System::Void radioButton1_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
289
			 this->DoChecked(cli::safe_cast<RadioButton ^>(sender), "This allows you to create a basic script package, just enough to allow it to be installed correctly, any more advanced options can be added after the wizard if you wish", TYPE_SPK);
290
		 }
291
private: System::Void radioButton2_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
292
			 this->DoChecked(cli::safe_cast<RadioButton ^>(sender), "This will create an update package, these are used to update an existing package, so only needs to contain the files and data that has change so the package file can be smaller, easier to download.  You will need to start the old and current version of your package, and a new update package will be created with the differences", TYPE_SPK);
293
		 }
294
private: System::Void radioButton3_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
295
			 this->DoChecked(cli::safe_cast<RadioButton ^>(sender), "This will create a ship file that will replace an existing ship in the game and allow you to adjust any properties that you want", TYPE_XSP);
296
		 }
297
};
298
}