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