Subversion Repositories spk

Rev

Rev 1 | Details | Compare with Previous | 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 AddShipText
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 AddShipText : public System::Windows::Forms::Form
23
	{
24
	public:
25
		AddShipText(void)
26
		{
27
			InitializeComponent();
28
 
29
			this->numericUpDown1->Focus();
30
		}
31
 
32
		void SetEdit(int l)
33
		{
34
			this->Text = "Edit Ship Text (Language " + Convert::ToString(l) + ")";
35
			this->numericUpDown1->Enabled = false;
36
		}
37
 
38
		String ^GetName() { return m_sName; }
39
		String ^GetDescription() { return m_sDesc; }
40
		int		GetLanguage() { return m_iLang; }
41
 
42
		void SetName(String ^s) { this->textBox1->Text = s; }
43
		void SetDescription(String ^s) { this->richTextBox1->Text = s; }
44
		void SetLanguage(int i) { this->numericUpDown1->Value = i; }
45
 
46
	protected:
47
		/// <summary>
48
		/// Clean up any resources being used.
49
		/// </summary>
50
		~AddShipText()
51
		{
52
			if (components)
53
			{
54
				delete components;
55
			}
56
		}
57
 
58
		String ^m_sName;
59
		String ^m_sDesc;
60
		int		m_iLang;
61
 
62
	private: System::Windows::Forms::Panel^  panel1;
63
	private: System::Windows::Forms::NumericUpDown^  numericUpDown1;
64
	private: System::Windows::Forms::Label^  label1;
65
	private: System::Windows::Forms::Panel^  panel2;
66
	private: System::Windows::Forms::Button^  ButCancel;
67
	private: System::Windows::Forms::Button^  button1;
68
	private: System::Windows::Forms::Panel^  panel3;
69
	private: System::Windows::Forms::TextBox^  textBox1;
70
	private: System::Windows::Forms::Label^  label2;
71
	private: System::Windows::Forms::Panel^  panel4;
72
	private: System::Windows::Forms::RichTextBox^  richTextBox1;
73
	private: System::Windows::Forms::Label^  label3;
74
	protected: 
75
 
76
	private:
77
		/// <summary>
78
		/// Required designer variable.
79
		/// </summary>
80
		System::ComponentModel::Container ^components;
81
 
82
#pragma region Windows Form Designer generated code
83
		/// <summary>
84
		/// Required method for Designer support - do not modify
85
		/// the contents of this method with the code editor.
86
		/// </summary>
87
		void InitializeComponent(void)
88
		{
89
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(AddShipText::typeid));
90
			this->panel1 = (gcnew System::Windows::Forms::Panel());
91
			this->numericUpDown1 = (gcnew System::Windows::Forms::NumericUpDown());
92
			this->label1 = (gcnew System::Windows::Forms::Label());
93
			this->panel2 = (gcnew System::Windows::Forms::Panel());
94
			this->ButCancel = (gcnew System::Windows::Forms::Button());
95
			this->button1 = (gcnew System::Windows::Forms::Button());
96
			this->panel3 = (gcnew System::Windows::Forms::Panel());
97
			this->textBox1 = (gcnew System::Windows::Forms::TextBox());
98
			this->label2 = (gcnew System::Windows::Forms::Label());
99
			this->panel4 = (gcnew System::Windows::Forms::Panel());
100
			this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());
101
			this->label3 = (gcnew System::Windows::Forms::Label());
102
			this->panel1->SuspendLayout();
103
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->BeginInit();
104
			this->panel2->SuspendLayout();
105
			this->panel3->SuspendLayout();
106
			this->panel4->SuspendLayout();
107
			this->SuspendLayout();
108
			// 
109
			// panel1
110
			// 
111
			this->panel1->Controls->Add(this->numericUpDown1);
112
			this->panel1->Controls->Add(this->label1);
113
			this->panel1->Dock = System::Windows::Forms::DockStyle::Top;
114
			this->panel1->Location = System::Drawing::Point(20, 20);
115
			this->panel1->Name = L"panel1";
116
			this->panel1->Size = System::Drawing::Size(613, 33);
117
			this->panel1->TabIndex = 0;
118
			// 
119
			// numericUpDown1
120
			// 
121
			this->numericUpDown1->Dock = System::Windows::Forms::DockStyle::Fill;
122
			this->numericUpDown1->Location = System::Drawing::Point(169, 0);
123
			this->numericUpDown1->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {999, 0, 0, 0});
124
			this->numericUpDown1->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
125
			this->numericUpDown1->Name = L"numericUpDown1";
126
			this->numericUpDown1->Size = System::Drawing::Size(444, 20);
127
			this->numericUpDown1->TabIndex = 0;
128
			this->numericUpDown1->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
129
			// 
130
			// label1
131
			// 
132
			this->label1->Dock = System::Windows::Forms::DockStyle::Left;
133
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
134
				static_cast<System::Byte>(0)));
135
			this->label1->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"label1.Image")));
136
			this->label1->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
137
			this->label1->Location = System::Drawing::Point(0, 0);
138
			this->label1->Name = L"label1";
139
			this->label1->Size = System::Drawing::Size(169, 33);
140
			this->label1->TabIndex = 0;
141
			this->label1->Text = L"Language ID";
142
			this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
143
			// 
144
			// panel2
145
			// 
146
			this->panel2->Controls->Add(this->ButCancel);
147
			this->panel2->Controls->Add(this->button1);
148
			this->panel2->Dock = System::Windows::Forms::DockStyle::Bottom;
149
			this->panel2->Location = System::Drawing::Point(20, 178);
150
			this->panel2->Name = L"panel2";
151
			this->panel2->Padding = System::Windows::Forms::Padding(5, 10, 5, 5);
152
			this->panel2->Size = System::Drawing::Size(613, 48);
153
			this->panel2->TabIndex = 1;
154
			// 
155
			// ButCancel
156
			// 
157
			this->ButCancel->DialogResult = System::Windows::Forms::DialogResult::Cancel;
158
			this->ButCancel->Dock = System::Windows::Forms::DockStyle::Right;
159
			this->ButCancel->Location = System::Drawing::Point(408, 10);
160
			this->ButCancel->Name = L"ButCancel";
161
			this->ButCancel->Size = System::Drawing::Size(100, 33);
162
			this->ButCancel->TabIndex = 1;
163
			this->ButCancel->TabStop = false;
164
			this->ButCancel->Text = L"Cancel";
165
			this->ButCancel->UseVisualStyleBackColor = true;
166
			// 
167
			// button1
168
			// 
169
			this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
170
			this->button1->Dock = System::Windows::Forms::DockStyle::Right;
171
			this->button1->Location = System::Drawing::Point(508, 10);
172
			this->button1->Name = L"button1";
173
			this->button1->Size = System::Drawing::Size(100, 33);
174
			this->button1->TabIndex = 1;
175
			this->button1->TabStop = false;
176
			this->button1->Text = L"OK";
177
			this->button1->UseVisualStyleBackColor = true;
178
			this->button1->Click += gcnew System::EventHandler(this, &AddShipText::button1_Click);
179
			// 
180
			// panel3
181
			// 
182
			this->panel3->Controls->Add(this->textBox1);
183
			this->panel3->Controls->Add(this->label2);
184
			this->panel3->Dock = System::Windows::Forms::DockStyle::Top;
185
			this->panel3->Location = System::Drawing::Point(20, 53);
186
			this->panel3->Name = L"panel3";
187
			this->panel3->Size = System::Drawing::Size(613, 33);
188
			this->panel3->TabIndex = 3;
189
			// 
190
			// textBox1
191
			// 
192
			this->textBox1->Dock = System::Windows::Forms::DockStyle::Fill;
193
			this->textBox1->Location = System::Drawing::Point(169, 0);
194
			this->textBox1->Name = L"textBox1";
195
			this->textBox1->Size = System::Drawing::Size(444, 20);
196
			this->textBox1->TabIndex = 0;
197
			// 
198
			// label2
199
			// 
200
			this->label2->Dock = System::Windows::Forms::DockStyle::Left;
201
			this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
202
				static_cast<System::Byte>(0)));
203
			this->label2->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"label2.Image")));
204
			this->label2->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
205
			this->label2->Location = System::Drawing::Point(0, 0);
206
			this->label2->Name = L"label2";
207
			this->label2->Size = System::Drawing::Size(169, 33);
208
			this->label2->TabIndex = 0;
209
			this->label2->Text = L"Ship Name";
210
			this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
211
			// 
212
			// panel4
213
			// 
214
			this->panel4->Controls->Add(this->richTextBox1);
215
			this->panel4->Controls->Add(this->label3);
216
			this->panel4->Dock = System::Windows::Forms::DockStyle::Fill;
217
			this->panel4->Location = System::Drawing::Point(20, 86);
218
			this->panel4->Name = L"panel4";
219
			this->panel4->Size = System::Drawing::Size(613, 92);
220
			this->panel4->TabIndex = 4;
221
			// 
222
			// richTextBox1
223
			// 
224
			this->richTextBox1->Dock = System::Windows::Forms::DockStyle::Fill;
225
			this->richTextBox1->Location = System::Drawing::Point(169, 0);
226
			this->richTextBox1->Name = L"richTextBox1";
227
			this->richTextBox1->Size = System::Drawing::Size(444, 92);
228
			this->richTextBox1->TabIndex = 0;
229
			this->richTextBox1->Text = L"";
230
			// 
231
			// label3
232
			// 
233
			this->label3->Dock = System::Windows::Forms::DockStyle::Left;
234
			this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
235
				static_cast<System::Byte>(0)));
236
			this->label3->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"label3.Image")));
237
			this->label3->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
238
			this->label3->Location = System::Drawing::Point(0, 0);
239
			this->label3->Name = L"label3";
240
			this->label3->Size = System::Drawing::Size(169, 92);
241
			this->label3->TabIndex = 0;
242
			this->label3->Text = L"Ship Description";
243
			this->label3->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
244
			// 
245
			// AddShipText
246
			// 
247
			this->AcceptButton = this->button1;
248
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
249
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
250
			this->CancelButton = this->ButCancel;
251
			this->ClientSize = System::Drawing::Size(653, 246);
252
			this->ControlBox = false;
253
			this->Controls->Add(this->panel4);
254
			this->Controls->Add(this->panel3);
255
			this->Controls->Add(this->panel2);
256
			this->Controls->Add(this->panel1);
257
			this->Name = L"AddShipText";
258
			this->Padding = System::Windows::Forms::Padding(20);
259
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
260
			this->Text = L"Add Ship Text";
261
			this->Load += gcnew System::EventHandler(this, &AddShipText::AddShipText_Load);
262
			this->panel1->ResumeLayout(false);
263
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->EndInit();
264
			this->panel2->ResumeLayout(false);
265
			this->panel3->ResumeLayout(false);
266
			this->panel3->PerformLayout();
267
			this->panel4->ResumeLayout(false);
268
			this->ResumeLayout(false);
269
 
270
		}
271
#pragma endregion
272
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
273
				 m_iLang = Convert::ToInt32(this->numericUpDown1->Value);
274
				 m_sName = this->textBox1->Text;
275
				 m_sDesc = this->richTextBox1->Text;
276
			 }
277
private: System::Void AddShipText_Load(System::Object^  sender, System::EventArgs^  e) {
278
			 this->numericUpDown1->Focus();
279
		 }
280
};
281
}