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 AddDepend
|
|
|
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 AddDepend : public System::Windows::Forms::Form
|
|
|
23 |
{
|
|
|
24 |
public:
|
|
|
25 |
AddDepend(void)
|
|
|
26 |
{
|
|
|
27 |
InitializeComponent();
|
|
|
28 |
}
|
|
|
29 |
|
|
|
30 |
void BuiltIn()
|
|
|
31 |
{
|
|
|
32 |
this->TextName->Enabled = false;
|
|
|
33 |
this->TextAuthor->Enabled = false;
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
void SetEdit(String ^name, String ^author, String ^version)
|
|
|
37 |
{
|
|
|
38 |
this->Text = "Edit Dependacy";
|
|
|
39 |
this->TextName->Text = name;
|
|
|
40 |
this->TextAuthor->Text = author;
|
|
|
41 |
this->TextVersion->Text = version;
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
String ^GetName() { return m_sName; }
|
|
|
45 |
String ^GetAuthor() { return m_sAuthor; }
|
|
|
46 |
String ^GetVersion() { return m_sVersion; }
|
|
|
47 |
|
|
|
48 |
protected:
|
|
|
49 |
/// <summary>
|
|
|
50 |
/// Clean up any resources being used.
|
|
|
51 |
/// </summary>
|
|
|
52 |
~AddDepend()
|
|
|
53 |
{
|
|
|
54 |
if (components)
|
|
|
55 |
{
|
|
|
56 |
delete components;
|
|
|
57 |
}
|
|
|
58 |
}
|
|
|
59 |
private: System::Windows::Forms::Panel^ panel1;
|
|
|
60 |
protected:
|
|
|
61 |
private: System::Windows::Forms::Button^ button2;
|
|
|
62 |
private: System::Windows::Forms::Button^ button1;
|
|
|
63 |
private: System::Windows::Forms::TextBox^ TextName;
|
|
|
64 |
private: System::Windows::Forms::Panel^ panel2;
|
|
|
65 |
private: System::Windows::Forms::Label^ label1;
|
|
|
66 |
private: System::Windows::Forms::Panel^ panel3;
|
|
|
67 |
private: System::Windows::Forms::TextBox^ TextAuthor;
|
|
|
68 |
private: System::Windows::Forms::Label^ label2;
|
|
|
69 |
private: System::Windows::Forms::Panel^ panel4;
|
|
|
70 |
private: System::Windows::Forms::TextBox^ TextVersion;
|
|
|
71 |
private: System::Windows::Forms::Label^ label3;
|
|
|
72 |
|
|
|
73 |
private:
|
|
|
74 |
String ^m_sName;
|
|
|
75 |
String ^m_sAuthor;
|
|
|
76 |
String ^m_sVersion;
|
|
|
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(AddDepend::typeid));
|
|
|
90 |
this->panel1 = (gcnew System::Windows::Forms::Panel());
|
|
|
91 |
this->button2 = (gcnew System::Windows::Forms::Button());
|
|
|
92 |
this->button1 = (gcnew System::Windows::Forms::Button());
|
|
|
93 |
this->TextName = (gcnew System::Windows::Forms::TextBox());
|
|
|
94 |
this->panel2 = (gcnew System::Windows::Forms::Panel());
|
|
|
95 |
this->label1 = (gcnew System::Windows::Forms::Label());
|
|
|
96 |
this->panel3 = (gcnew System::Windows::Forms::Panel());
|
|
|
97 |
this->TextAuthor = (gcnew System::Windows::Forms::TextBox());
|
|
|
98 |
this->label2 = (gcnew System::Windows::Forms::Label());
|
|
|
99 |
this->panel4 = (gcnew System::Windows::Forms::Panel());
|
|
|
100 |
this->TextVersion = (gcnew System::Windows::Forms::TextBox());
|
|
|
101 |
this->label3 = (gcnew System::Windows::Forms::Label());
|
|
|
102 |
this->panel1->SuspendLayout();
|
|
|
103 |
this->panel2->SuspendLayout();
|
|
|
104 |
this->panel3->SuspendLayout();
|
|
|
105 |
this->panel4->SuspendLayout();
|
|
|
106 |
this->SuspendLayout();
|
|
|
107 |
//
|
|
|
108 |
// panel1
|
|
|
109 |
//
|
|
|
110 |
this->panel1->Controls->Add(this->button2);
|
|
|
111 |
this->panel1->Controls->Add(this->button1);
|
|
|
112 |
this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;
|
|
|
113 |
this->panel1->Location = System::Drawing::Point(15, 119);
|
|
|
114 |
this->panel1->Name = L"panel1";
|
|
|
115 |
this->panel1->Padding = System::Windows::Forms::Padding(5);
|
|
|
116 |
this->panel1->Size = System::Drawing::Size(469, 36);
|
|
|
117 |
this->panel1->TabIndex = 0;
|
|
|
118 |
//
|
|
|
119 |
// button2
|
|
|
120 |
//
|
|
|
121 |
this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;
|
|
|
122 |
this->button2->Dock = System::Windows::Forms::DockStyle::Right;
|
|
|
123 |
this->button2->Location = System::Drawing::Point(270, 5);
|
|
|
124 |
this->button2->Name = L"button2";
|
|
|
125 |
this->button2->Size = System::Drawing::Size(94, 26);
|
|
|
126 |
this->button2->TabIndex = 2;
|
|
|
127 |
this->button2->Text = L"Cancel";
|
|
|
128 |
this->button2->UseVisualStyleBackColor = true;
|
|
|
129 |
//
|
|
|
130 |
// button1
|
|
|
131 |
//
|
|
|
132 |
this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
|
|
|
133 |
this->button1->Dock = System::Windows::Forms::DockStyle::Right;
|
|
|
134 |
this->button1->Location = System::Drawing::Point(364, 5);
|
|
|
135 |
this->button1->Name = L"button1";
|
|
|
136 |
this->button1->Size = System::Drawing::Size(100, 26);
|
|
|
137 |
this->button1->TabIndex = 2;
|
|
|
138 |
this->button1->Text = L"OK";
|
|
|
139 |
this->button1->UseVisualStyleBackColor = true;
|
|
|
140 |
this->button1->Click += gcnew System::EventHandler(this, &AddDepend::button1_Click);
|
|
|
141 |
//
|
|
|
142 |
// TextName
|
|
|
143 |
//
|
|
|
144 |
this->TextName->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
145 |
this->TextName->Location = System::Drawing::Point(196, 0);
|
|
|
146 |
this->TextName->Name = L"TextName";
|
|
|
147 |
this->TextName->Size = System::Drawing::Size(273, 20);
|
|
|
148 |
this->TextName->TabIndex = 0;
|
|
|
149 |
//
|
|
|
150 |
// panel2
|
|
|
151 |
//
|
|
|
152 |
this->panel2->Controls->Add(this->TextName);
|
|
|
153 |
this->panel2->Controls->Add(this->label1);
|
|
|
154 |
this->panel2->Dock = System::Windows::Forms::DockStyle::Top;
|
|
|
155 |
this->panel2->Location = System::Drawing::Point(15, 15);
|
|
|
156 |
this->panel2->Name = L"panel2";
|
|
|
157 |
this->panel2->Size = System::Drawing::Size(469, 29);
|
|
|
158 |
this->panel2->TabIndex = 2;
|
|
|
159 |
//
|
|
|
160 |
// label1
|
|
|
161 |
//
|
|
|
162 |
this->label1->Dock = System::Windows::Forms::DockStyle::Left;
|
|
|
163 |
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
|
|
|
164 |
static_cast<System::Byte>(0)));
|
|
|
165 |
this->label1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"label1.Image")));
|
|
|
166 |
this->label1->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
|
|
|
167 |
this->label1->Location = System::Drawing::Point(0, 0);
|
|
|
168 |
this->label1->Name = L"label1";
|
|
|
169 |
this->label1->Size = System::Drawing::Size(196, 29);
|
|
|
170 |
this->label1->TabIndex = 2;
|
|
|
171 |
this->label1->Text = L"Package Name";
|
|
|
172 |
this->label1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
|
|
|
173 |
//
|
|
|
174 |
// panel3
|
|
|
175 |
//
|
|
|
176 |
this->panel3->Controls->Add(this->TextAuthor);
|
|
|
177 |
this->panel3->Controls->Add(this->label2);
|
|
|
178 |
this->panel3->Dock = System::Windows::Forms::DockStyle::Top;
|
|
|
179 |
this->panel3->Location = System::Drawing::Point(15, 44);
|
|
|
180 |
this->panel3->Name = L"panel3";
|
|
|
181 |
this->panel3->Size = System::Drawing::Size(469, 29);
|
|
|
182 |
this->panel3->TabIndex = 3;
|
|
|
183 |
//
|
|
|
184 |
// TextAuthor
|
|
|
185 |
//
|
|
|
186 |
this->TextAuthor->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
187 |
this->TextAuthor->Location = System::Drawing::Point(196, 0);
|
|
|
188 |
this->TextAuthor->Name = L"TextAuthor";
|
|
|
189 |
this->TextAuthor->Size = System::Drawing::Size(273, 20);
|
|
|
190 |
this->TextAuthor->TabIndex = 1;
|
|
|
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(196, 29);
|
|
|
202 |
this->label2->TabIndex = 2;
|
|
|
203 |
this->label2->Text = L"Author";
|
|
|
204 |
this->label2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
|
|
|
205 |
//
|
|
|
206 |
// panel4
|
|
|
207 |
//
|
|
|
208 |
this->panel4->Controls->Add(this->TextVersion);
|
|
|
209 |
this->panel4->Controls->Add(this->label3);
|
|
|
210 |
this->panel4->Dock = System::Windows::Forms::DockStyle::Top;
|
|
|
211 |
this->panel4->Location = System::Drawing::Point(15, 73);
|
|
|
212 |
this->panel4->Name = L"panel4";
|
|
|
213 |
this->panel4->Size = System::Drawing::Size(469, 29);
|
|
|
214 |
this->panel4->TabIndex = 4;
|
|
|
215 |
//
|
|
|
216 |
// TextVersion
|
|
|
217 |
//
|
|
|
218 |
this->TextVersion->Dock = System::Windows::Forms::DockStyle::Fill;
|
|
|
219 |
this->TextVersion->Location = System::Drawing::Point(196, 0);
|
|
|
220 |
this->TextVersion->Name = L"TextVersion";
|
|
|
221 |
this->TextVersion->Size = System::Drawing::Size(273, 20);
|
|
|
222 |
this->TextVersion->TabIndex = 1;
|
|
|
223 |
//
|
|
|
224 |
// label3
|
|
|
225 |
//
|
|
|
226 |
this->label3->Dock = System::Windows::Forms::DockStyle::Left;
|
|
|
227 |
this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
|
|
|
228 |
static_cast<System::Byte>(0)));
|
|
|
229 |
this->label3->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"label3.Image")));
|
|
|
230 |
this->label3->ImageAlign = System::Drawing::ContentAlignment::MiddleRight;
|
|
|
231 |
this->label3->Location = System::Drawing::Point(0, 0);
|
|
|
232 |
this->label3->Name = L"label3";
|
|
|
233 |
this->label3->Size = System::Drawing::Size(196, 29);
|
|
|
234 |
this->label3->TabIndex = 2;
|
|
|
235 |
this->label3->Text = L"Minimum Version";
|
|
|
236 |
this->label3->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
|
|
|
237 |
//
|
|
|
238 |
// AddDepend
|
|
|
239 |
//
|
|
|
240 |
this->AcceptButton = this->button1;
|
|
|
241 |
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
|
|
|
242 |
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
|
|
243 |
this->CancelButton = this->button2;
|
|
|
244 |
this->ClientSize = System::Drawing::Size(499, 170);
|
|
|
245 |
this->Controls->Add(this->panel4);
|
|
|
246 |
this->Controls->Add(this->panel3);
|
|
|
247 |
this->Controls->Add(this->panel2);
|
|
|
248 |
this->Controls->Add(this->panel1);
|
|
|
249 |
this->Name = L"AddDepend";
|
|
|
250 |
this->Padding = System::Windows::Forms::Padding(15);
|
|
|
251 |
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
|
|
|
252 |
this->Text = L"Add Dependacies";
|
|
|
253 |
this->TopMost = true;
|
|
|
254 |
this->Load += gcnew System::EventHandler(this, &AddDepend::AddDepend_Load);
|
|
|
255 |
this->panel1->ResumeLayout(false);
|
|
|
256 |
this->panel2->ResumeLayout(false);
|
|
|
257 |
this->panel2->PerformLayout();
|
|
|
258 |
this->panel3->ResumeLayout(false);
|
|
|
259 |
this->panel3->PerformLayout();
|
|
|
260 |
this->panel4->ResumeLayout(false);
|
|
|
261 |
this->panel4->PerformLayout();
|
|
|
262 |
this->ResumeLayout(false);
|
|
|
263 |
|
|
|
264 |
}
|
|
|
265 |
#pragma endregion
|
|
|
266 |
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
|
|
|
267 |
m_sName = this->TextName->Text;
|
|
|
268 |
m_sAuthor = this->TextAuthor->Text;
|
|
|
269 |
m_sVersion = this->TextVersion->Text;
|
|
|
270 |
}
|
|
|
271 |
private: System::Void AddDepend_Load(System::Object^ sender, System::EventArgs^ e) {
|
|
|
272 |
this->TextName->Focus();
|
|
|
273 |
}
|
|
|
274 |
};
|
|
|
275 |
}
|