237 |
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 AddGlobal
|
|
|
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 AddGlobal : public System::Windows::Forms::Form
|
|
|
23 |
{
|
|
|
24 |
public:
|
|
|
25 |
AddGlobal(void)
|
|
|
26 |
{
|
|
|
27 |
InitializeComponent();
|
|
|
28 |
}
|
|
|
29 |
|
|
|
30 |
void SetEdit(String ^name, String ^data)
|
|
|
31 |
{
|
|
|
32 |
this->Text = "Edit Global";
|
|
|
33 |
this->TextName->Text = name;
|
|
|
34 |
this->TextData->Text = data;
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
String ^GetName() { return m_sName; }
|
|
|
38 |
String ^GetData() { return m_sData; }
|
|
|
39 |
|
|
|
40 |
protected:
|
|
|
41 |
/// <summary>
|
|
|
42 |
/// Clean up any resources being used.
|
|
|
43 |
/// </summary>
|
|
|
44 |
~AddGlobal()
|
|
|
45 |
{
|
|
|
46 |
if (components)
|
|
|
47 |
{
|
|
|
48 |
delete components;
|
|
|
49 |
}
|
|
|
50 |
}
|
|
|
51 |
private: System::Windows::Forms::Panel^ panel1;
|
|
|
52 |
protected:
|
|
|
53 |
private: System::Windows::Forms::Button^ button2;
|
|
|
54 |
private: System::Windows::Forms::Button^ button1;
|
|
|
55 |
private: System::Windows::Forms::TextBox^ TextName;
|
|
|
56 |
private: System::Windows::Forms::Panel^ panel2;
|
|
|
57 |
private: System::Windows::Forms::Label^ label1;
|
|
|
58 |
private: System::Windows::Forms::Panel^ panel3;
|
|
|
59 |
private: System::Windows::Forms::TextBox^ TextData;
|
|
|
60 |
|
|
|
61 |
private: System::Windows::Forms::Label^ label2;
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
private:
|
|
|
67 |
String ^m_sName;
|
|
|
68 |
String ^m_sData;
|
|
|
69 |
/// <summary>
|
|
|
70 |
/// Required designer variable.
|
|
|
71 |
/// </summary>
|
|
|
72 |
System::ComponentModel::Container ^components;
|
|
|
73 |
|
|
|
74 |
#pragma region Windows Form Designer generated code
|
|
|
75 |
/// <summary>
|
|
|
76 |
/// Required method for Designer support - do not modify
|
|
|
77 |
/// the contents of this method with the code editor.
|
|
|
78 |
/// </summary>
|
|
|
79 |
void InitializeComponent(void)
|
|
|
80 |
{
|
|
|
81 |
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(AddGlobal::typeid));
|
|
|
82 |
this->panel1 = (gcnew System::Windows::Forms::Panel());
|
|
|
83 |
this->button2 = (gcnew System::Windows::Forms::Button());
|
|
|
84 |
this->button1 = (gcnew System::Windows::Forms::Button());
|
|
|
85 |
this->TextName = (gcnew System::Windows::Forms::TextBox());
|
|
|
86 |
this->panel2 = (gcnew System::Windows::Forms::Panel());
|
|
|
87 |
this->label1 = (gcnew System::Windows::Forms::Label());
|
|
|
88 |
this->panel3 = (gcnew System::Windows::Forms::Panel());
|
|
|
89 |
this->TextData = (gcnew System::Windows::Forms::TextBox());
|
|
|
90 |
this->label2 = (gcnew System::Windows::Forms::Label());
|
|
|
91 |
this->panel1->SuspendLayout();
|
|
|
92 |
this->panel2->SuspendLayout();
|
|
|
93 |
this->panel3->SuspendLayout();
|
|
|
94 |
this->SuspendLayout();
|
|
|
95 |
//
|
|
|
96 |
// panel1
|
|
|
97 |
//
|
|
|
98 |
this->panel1->Controls->Add(this->button2);
|
|
|
99 |
this->panel1->Controls->Add(this->button1);
|
|
|
100 |
this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;
|
|
|
101 |
this->panel1->Location = System::Drawing::Point(15, 119);
|
|
|
102 |
this->panel1->Name = L"panel1";
|
|
|
103 |
this->panel1->Padding = System::Windows::Forms::Padding(5);
|
|
|
104 |
this->panel1->Size = System::Drawing::Size(469, 36);
|
|
|
105 |
this->panel1->TabIndex = 0;
|
|
|
106 |
//
|
|
|
107 |
// button2
|
|
|
108 |
//
|
|
|
109 |
this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;
|
|
|
110 |
this->button2->Dock = System::Windows::Forms::DockStyle::Right;
|
|
|
111 |
this->button2->Location = System::Drawing::Point(270, 5);
|
|
|
112 |
this->button2->Name = L"button2";
|
|
|
113 |
this->button2->Size = System::Drawing::Size(94, 26);
|
|
|
114 |
this->button2->TabIndex = 2;
|
|
|
115 |
this->button2->Text = L"Cancel";
|
|
|
116 |
this->button2->UseVisualStyleBackColor = true;
|
|
|
117 |
//
|
|
|
118 |
// button1
|
|
|
119 |
//
|
|
|
120 |
this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
|
|
|
121 |
this->button1->Dock = System::Windows::Forms::DockStyle::Right;
|
|
|
122 |
this->button1->Location = System::Drawing::Point(364, 5);
|
|
|
123 |
this->button1->Name = L"button1";
|
|
|
124 |
this->button1->Size = System::Drawing::Size(100, 26);
|
|
|
125 |
this->button1->TabIndex = 2;
|
|
|
126 |
this->button1->Text = L"OK";
|
|
|
127 |
this->button1->UseVisualStyleBackColor = true;
|
|
|
128 |
this->button1->Click += gcnew System::EventHandler(this, &AddGlobal::button1_Click);
|
|
|
129 |
//
|
|
|
130 |
// TextName
|
|
|
131 |
//
|
|
|
132 |
this->TextName->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
133 |
this->TextName->Location = System::Drawing::Point(196, 0);
|
|
|
134 |
this->TextName->Name = L"TextName";
|
|
|
135 |
this->TextName->Size = System::Drawing::Size(273, 20);
|
|
|
136 |
this->TextName->TabIndex = 0;
|
|
|
137 |
//
|
|
|
138 |
// panel2
|
|
|
139 |
//
|
|
|
140 |
this->panel2->Controls->Add(this->TextName);
|
|
|
141 |
this->panel2->Controls->Add(this->label1);
|
|
|
142 |
this->panel2->Dock = System::Windows::Forms::DockStyle::Top;
|
|
|
143 |
this->panel2->Location = System::Drawing::Point(15, 15);
|
|
|
144 |
this->panel2->Name = L"panel2";
|
|
|
145 |
this->panel2->Size = System::Drawing::Size(469, 29);
|
|
|
146 |
this->panel2->TabIndex = 2;
|
|
|
147 |
//
|
|
|
148 |
// label1
|
|
|
149 |
//
|
|
|
150 |
this->label1->Dock = System::Windows::Forms::DockStyle::Left;
|
|
|
151 |
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
|
|
|
152 |
static_cast<System::Byte>(0)));
|
|
|
153 |
this->label1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"label1.Image")));
|
|
|
154 |
this->label1->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
|
|
|
155 |
this->label1->Location = System::Drawing::Point(0, 0);
|
|
|
156 |
this->label1->Name = L"label1";
|
|
|
157 |
this->label1->Size = System::Drawing::Size(196, 29);
|
|
|
158 |
this->label1->TabIndex = 2;
|
|
|
159 |
this->label1->Text = L"Global";
|
|
|
160 |
this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
|
|
|
161 |
//
|
|
|
162 |
// panel3
|
|
|
163 |
//
|
|
|
164 |
this->panel3->Controls->Add(this->TextData);
|
|
|
165 |
this->panel3->Controls->Add(this->label2);
|
|
|
166 |
this->panel3->Dock = System::Windows::Forms::DockStyle::Top;
|
|
|
167 |
this->panel3->Location = System::Drawing::Point(15, 44);
|
|
|
168 |
this->panel3->Name = L"panel3";
|
|
|
169 |
this->panel3->Size = System::Drawing::Size(469, 29);
|
|
|
170 |
this->panel3->TabIndex = 3;
|
|
|
171 |
//
|
|
|
172 |
// TextData
|
|
|
173 |
//
|
|
|
174 |
this->TextData->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
175 |
this->TextData->Location = System::Drawing::Point(196, 0);
|
|
|
176 |
this->TextData->Name = L"TextData";
|
|
|
177 |
this->TextData->Size = System::Drawing::Size(273, 20);
|
|
|
178 |
this->TextData->TabIndex = 1;
|
|
|
179 |
//
|
|
|
180 |
// label2
|
|
|
181 |
//
|
|
|
182 |
this->label2->Dock = System::Windows::Forms::DockStyle::Left;
|
|
|
183 |
this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
|
|
|
184 |
static_cast<System::Byte>(0)));
|
|
|
185 |
this->label2->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"label2.Image")));
|
|
|
186 |
this->label2->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
|
|
|
187 |
this->label2->Location = System::Drawing::Point(0, 0);
|
|
|
188 |
this->label2->Name = L"label2";
|
|
|
189 |
this->label2->Size = System::Drawing::Size(196, 29);
|
|
|
190 |
this->label2->TabIndex = 2;
|
|
|
191 |
this->label2->Text = L"Value";
|
|
|
192 |
this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
|
|
|
193 |
//
|
|
|
194 |
// AddGlobal
|
|
|
195 |
//
|
|
|
196 |
this->AcceptButton = this->button1;
|
|
|
197 |
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
|
|
|
198 |
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
|
|
199 |
this->CancelButton = this->button2;
|
|
|
200 |
this->ClientSize = System::Drawing::Size(499, 170);
|
|
|
201 |
this->Controls->Add(this->panel3);
|
|
|
202 |
this->Controls->Add(this->panel2);
|
|
|
203 |
this->Controls->Add(this->panel1);
|
|
|
204 |
this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));
|
|
|
205 |
this->Name = L"AddGlobal";
|
|
|
206 |
this->Padding = System::Windows::Forms::Padding(15);
|
|
|
207 |
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
|
|
|
208 |
this->Text = L"Add Global";
|
|
|
209 |
this->TopMost = true;
|
|
|
210 |
this->Load += gcnew System::EventHandler(this, &AddGlobal::AddGlobal_Load);
|
|
|
211 |
this->panel1->ResumeLayout(false);
|
|
|
212 |
this->panel2->ResumeLayout(false);
|
|
|
213 |
this->panel2->PerformLayout();
|
|
|
214 |
this->panel3->ResumeLayout(false);
|
|
|
215 |
this->panel3->PerformLayout();
|
|
|
216 |
this->ResumeLayout(false);
|
|
|
217 |
|
|
|
218 |
}
|
|
|
219 |
#pragma endregion
|
|
|
220 |
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
221 |
m_sName = this->TextName->Text;
|
|
|
222 |
m_sData = this->TextData->Text;
|
|
|
223 |
}
|
|
|
224 |
private: System::Void AddGlobal_Load(System::Object^ sender, System::EventArgs^ e) {
|
|
|
225 |
this->TextName->Focus();
|
|
|
226 |
}
|
|
|
227 |
};
|
|
|
228 |
}
|