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
 
11
namespace Creator {
12
 
13
	/// <summary>
14
	/// Summary for AddCockpit
15
	///
16
	/// WARNING: If you change the name of this class, you will need to change the
17
	///          'Resource File Name' property for the managed resource compiler tool
18
	///          associated with all .resx files this class depends on.  Otherwise,
19
	///          the designers will not be able to interact properly with localized
20
	///          resources associated with this form.
21
	/// </summary>
22
	public ref class AddCockpit : public System::Windows::Forms::Form
23
	{
24
	public:
25
		AddCockpit(void)
26
		{
27
			InitializeComponent();
28
		}
29
 
30
		void SetEdit(String ^id, String ^scene, int mask)
31
		{
32
			this->Text = "Edit Cockpit: " + id;
33
			this->TextID->Text = id;
34
			this->TextID->Enabled = false;
35
			this->TextScene->Text = scene;
36
			this->numericUpDown1->Value = mask;
37
		}
38
 
39
		String ^GetID() { return m_sId; }
40
		String ^GetScene() { return m_sScene; }
41
		int		GetMask() { return m_iMask; }
42
 
43
	protected:
44
		String ^m_sId;
45
		String ^m_sScene;
46
		int		m_iMask;
47
 
48
		/// <summary>
49
		/// Clean up any resources being used.
50
		/// </summary>
51
		~AddCockpit()
52
		{
53
			if (components)
54
			{
55
				delete components;
56
			}
57
		}
58
	private: System::Windows::Forms::Panel^  panel1;
59
	protected: 
60
	private: System::Windows::Forms::TextBox^  TextID;
61
	private: System::Windows::Forms::Label^  label1;
62
	private: System::Windows::Forms::Panel^  panel2;
63
	private: System::Windows::Forms::Button^  button1;
64
	private: System::Windows::Forms::Button^  button2;
65
	private: System::Windows::Forms::Panel^  panel3;
66
	private: System::Windows::Forms::TextBox^  TextScene;
67
	private: System::Windows::Forms::Label^  label2;
68
	private: System::Windows::Forms::Panel^  panel4;
69
 
70
 
71
	private: System::Windows::Forms::Label^  label3;
72
	private: System::Windows::Forms::NumericUpDown^  numericUpDown1;
73
 
74
	private:
75
		/// <summary>
76
		/// Required designer variable.
77
		/// </summary>
78
		System::ComponentModel::Container ^components;
79
 
80
#pragma region Windows Form Designer generated code
81
		/// <summary>
82
		/// Required method for Designer support - do not modify
83
		/// the contents of this method with the code editor.
84
		/// </summary>
85
		void InitializeComponent(void)
86
		{
87
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(AddCockpit::typeid));
88
			this->panel1 = (gcnew System::Windows::Forms::Panel());
89
			this->TextID = (gcnew System::Windows::Forms::TextBox());
90
			this->label1 = (gcnew System::Windows::Forms::Label());
91
			this->panel2 = (gcnew System::Windows::Forms::Panel());
92
			this->button2 = (gcnew System::Windows::Forms::Button());
93
			this->button1 = (gcnew System::Windows::Forms::Button());
94
			this->panel3 = (gcnew System::Windows::Forms::Panel());
95
			this->TextScene = (gcnew System::Windows::Forms::TextBox());
96
			this->label2 = (gcnew System::Windows::Forms::Label());
97
			this->panel4 = (gcnew System::Windows::Forms::Panel());
98
			this->numericUpDown1 = (gcnew System::Windows::Forms::NumericUpDown());
99
			this->label3 = (gcnew System::Windows::Forms::Label());
100
			this->panel1->SuspendLayout();
101
			this->panel2->SuspendLayout();
102
			this->panel3->SuspendLayout();
103
			this->panel4->SuspendLayout();
104
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->BeginInit();
105
			this->SuspendLayout();
106
			// 
107
			// panel1
108
			// 
109
			this->panel1->Controls->Add(this->TextID);
110
			this->panel1->Controls->Add(this->label1);
111
			this->panel1->Dock = System::Windows::Forms::DockStyle::Top;
112
			this->panel1->Location = System::Drawing::Point(15, 15);
113
			this->panel1->Name = L"panel1";
114
			this->panel1->Size = System::Drawing::Size(581, 38);
115
			this->panel1->TabIndex = 0;
116
			// 
117
			// TextID
118
			// 
119
			this->TextID->Dock = System::Windows::Forms::DockStyle::Fill;
120
			this->TextID->Location = System::Drawing::Point(170, 0);
121
			this->TextID->Name = L"TextID";
122
			this->TextID->Size = System::Drawing::Size(411, 20);
123
			this->TextID->TabIndex = 1;
124
			// 
125
			// label1
126
			// 
127
			this->label1->Dock = System::Windows::Forms::DockStyle::Left;
128
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
129
				static_cast<System::Byte>(0)));
130
			this->label1->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"label1.Image")));
131
			this->label1->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
132
			this->label1->Location = System::Drawing::Point(0, 0);
133
			this->label1->Name = L"label1";
134
			this->label1->Size = System::Drawing::Size(170, 38);
135
			this->label1->TabIndex = 0;
136
			this->label1->Text = L"Cockpit ID";
137
			this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
138
			// 
139
			// panel2
140
			// 
141
			this->panel2->Controls->Add(this->button2);
142
			this->panel2->Controls->Add(this->button1);
143
			this->panel2->Dock = System::Windows::Forms::DockStyle::Bottom;
144
			this->panel2->Location = System::Drawing::Point(15, 137);
145
			this->panel2->Name = L"panel2";
146
			this->panel2->Padding = System::Windows::Forms::Padding(5);
147
			this->panel2->Size = System::Drawing::Size(581, 39);
148
			this->panel2->TabIndex = 1;
149
			// 
150
			// button2
151
			// 
152
			this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;
153
			this->button2->Dock = System::Windows::Forms::DockStyle::Right;
154
			this->button2->Location = System::Drawing::Point(390, 5);
155
			this->button2->Name = L"button2";
156
			this->button2->Size = System::Drawing::Size(91, 29);
157
			this->button2->TabIndex = 1;
158
			this->button2->Text = L"Cancel";
159
			this->button2->UseVisualStyleBackColor = true;
160
			// 
161
			// button1
162
			// 
163
			this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
164
			this->button1->Dock = System::Windows::Forms::DockStyle::Right;
165
			this->button1->Location = System::Drawing::Point(481, 5);
166
			this->button1->Name = L"button1";
167
			this->button1->Size = System::Drawing::Size(95, 29);
168
			this->button1->TabIndex = 0;
169
			this->button1->Text = L"OK";
170
			this->button1->UseVisualStyleBackColor = true;
171
			this->button1->Click += gcnew System::EventHandler(this, &AddCockpit::button1_Click);
172
			// 
173
			// panel3
174
			// 
175
			this->panel3->Controls->Add(this->TextScene);
176
			this->panel3->Controls->Add(this->label2);
177
			this->panel3->Dock = System::Windows::Forms::DockStyle::Top;
178
			this->panel3->Location = System::Drawing::Point(15, 53);
179
			this->panel3->Name = L"panel3";
180
			this->panel3->Size = System::Drawing::Size(581, 36);
181
			this->panel3->TabIndex = 2;
182
			// 
183
			// TextScene
184
			// 
185
			this->TextScene->Dock = System::Windows::Forms::DockStyle::Fill;
186
			this->TextScene->Location = System::Drawing::Point(170, 0);
187
			this->TextScene->Name = L"TextScene";
188
			this->TextScene->Size = System::Drawing::Size(411, 20);
189
			this->TextScene->TabIndex = 1;
190
			this->TextScene->Text = L"4512";
191
			// 
192
			// label2
193
			// 
194
			this->label2->Dock = System::Windows::Forms::DockStyle::Left;
195
			this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
196
				static_cast<System::Byte>(0)));
197
			this->label2->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"label2.Image")));
198
			this->label2->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
199
			this->label2->Location = System::Drawing::Point(0, 0);
200
			this->label2->Name = L"label2";
201
			this->label2->Size = System::Drawing::Size(170, 36);
202
			this->label2->TabIndex = 0;
203
			this->label2->Text = L"Scene";
204
			this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
205
			// 
206
			// panel4
207
			// 
208
			this->panel4->Controls->Add(this->numericUpDown1);
209
			this->panel4->Controls->Add(this->label3);
210
			this->panel4->Dock = System::Windows::Forms::DockStyle::Top;
211
			this->panel4->Location = System::Drawing::Point(15, 89);
212
			this->panel4->Name = L"panel4";
213
			this->panel4->Size = System::Drawing::Size(581, 31);
214
			this->panel4->TabIndex = 3;
215
			// 
216
			// numericUpDown1
217
			// 
218
			this->numericUpDown1->Dock = System::Windows::Forms::DockStyle::Fill;
219
			this->numericUpDown1->Location = System::Drawing::Point(170, 0);
220
			this->numericUpDown1->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {-1994967296, 0, 0, 0});
221
			this->numericUpDown1->Name = L"numericUpDown1";
222
			this->numericUpDown1->Size = System::Drawing::Size(411, 20);
223
			this->numericUpDown1->TabIndex = 1;
224
			// 
225
			// label3
226
			// 
227
			this->label3->Dock = System::Windows::Forms::DockStyle::Left;
228
			this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
229
				static_cast<System::Byte>(0)));
230
			this->label3->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"label3.Image")));
231
			this->label3->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
232
			this->label3->Location = System::Drawing::Point(0, 0);
233
			this->label3->Name = L"label3";
234
			this->label3->Size = System::Drawing::Size(170, 31);
235
			this->label3->TabIndex = 0;
236
			this->label3->Text = L"Default Lasers";
237
			this->label3->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
238
			// 
239
			// AddCockpit
240
			// 
241
			this->AcceptButton = this->button1;
242
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
243
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
244
			this->CancelButton = this->button2;
245
			this->ClientSize = System::Drawing::Size(611, 191);
246
			this->ControlBox = false;
247
			this->Controls->Add(this->panel4);
248
			this->Controls->Add(this->panel3);
249
			this->Controls->Add(this->panel2);
250
			this->Controls->Add(this->panel1);
251
			this->Name = L"AddCockpit";
252
			this->Padding = System::Windows::Forms::Padding(15);
253
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
254
			this->Text = L"Add New Cockpit Entry";
255
			this->TopMost = true;
256
			this->Load += gcnew System::EventHandler(this, &AddCockpit::AddCockpit_Load);
257
			this->panel1->ResumeLayout(false);
258
			this->panel1->PerformLayout();
259
			this->panel2->ResumeLayout(false);
260
			this->panel3->ResumeLayout(false);
261
			this->panel3->PerformLayout();
262
			this->panel4->ResumeLayout(false);
263
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->EndInit();
264
			this->ResumeLayout(false);
265
 
266
		}
267
#pragma endregion
268
	private: System::Void AddCockpit_Load(System::Object^  sender, System::EventArgs^  e) {
269
				 this->TextID->Focus();
270
			 }
271
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
272
				 m_sId = this->TextID->Text;
273
				 m_sScene = this->TextScene->Text;
274
				 m_iMask = Convert::ToInt32(this->numericUpDown1->Value);
275
		 }
276
};
277
}