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
/// <summary>
12
/// Summary for InputBox
13
///
14
/// WARNING: If you change the name of this class, you will need to change the
15
///          'Resource File Name' property for the managed resource compiler tool
16
///          associated with all .resx files this class depends on.  Otherwise,
17
///          the designers will not be able to interact properly with localized
18
///          resources associated with this form.
19
/// </summary>
20
public ref class InputBox : public System::Windows::Forms::Form
21
{
22
public:
23
	InputBox(System::String ^str)
24
	{
25
		InitializeComponent();
26
 
27
		Label->Text = str;
28
		TextInput->Focus();
29
	}
30
	InputBox(System::String ^str, System::String ^text)
31
	{
32
		InitializeComponent();
33
 
34
		Label->Text = str;
35
		TextInput->Text = text;
36
		TextInput->Focus();
37
	}
38
 
39
	System::String ^GetInput() { return TextInput->Text; }
40
protected:
41
	/// <summary>
42
	/// Clean up any resources being used.
43
	/// </summary>
44
	~InputBox()
45
	{
46
		if (components)
47
		{
48
			delete components;
49
		}
50
	}
51
private: System::Windows::Forms::Panel^  panel1;
52
private: System::Windows::Forms::Button^  ButOK;
53
protected: 
54
 
55
private: System::Windows::Forms::Button^  ButCancel;
56
private: System::Windows::Forms::Label^  Label;
57
 
58
 
59
private: System::Windows::Forms::TextBox^  TextInput;
60
private: System::Windows::Forms::PictureBox^  pictureBox1;
61
 
62
 
63
private:
64
	/// <summary>
65
	/// Required designer variable.
66
	/// </summary>
67
	System::ComponentModel::Container ^components;
68
 
69
#pragma region Windows Form Designer generated code
70
	/// <summary>
71
	/// Required method for Designer support - do not modify
72
	/// the contents of this method with the code editor.
73
	/// </summary>
74
	void InitializeComponent(void)
75
	{
76
		System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(InputBox::typeid));
77
		this->panel1 = (gcnew System::Windows::Forms::Panel());
78
		this->ButCancel = (gcnew System::Windows::Forms::Button());
79
		this->ButOK = (gcnew System::Windows::Forms::Button());
80
		this->Label = (gcnew System::Windows::Forms::Label());
81
		this->TextInput = (gcnew System::Windows::Forms::TextBox());
82
		this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
83
		this->panel1->SuspendLayout();
84
		(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->BeginInit();
85
		this->SuspendLayout();
86
		// 
87
		// panel1
88
		// 
89
		this->panel1->Controls->Add(this->ButOK);
90
		this->panel1->Controls->Add(this->ButCancel);
91
		this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;
92
		this->panel1->Location = System::Drawing::Point(0, 73);
93
		this->panel1->Name = L"panel1";
94
		this->panel1->Size = System::Drawing::Size(367, 26);
95
		this->panel1->TabIndex = 0;
96
		// 
97
		// ButCancel
98
		// 
99
		this->ButCancel->DialogResult = System::Windows::Forms::DialogResult::Cancel;
100
		this->ButCancel->Dock = System::Windows::Forms::DockStyle::Right;
101
		this->ButCancel->Location = System::Drawing::Point(292, 0);
102
		this->ButCancel->Name = L"ButCancel";
103
		this->ButCancel->Size = System::Drawing::Size(75, 26);
104
		this->ButCancel->TabIndex = 0;
105
		this->ButCancel->Text = L"Cancel";
106
		this->ButCancel->UseVisualStyleBackColor = true;
107
		// 
108
		// ButOK
109
		// 
110
		this->ButOK->DialogResult = System::Windows::Forms::DialogResult::OK;
111
		this->ButOK->Dock = System::Windows::Forms::DockStyle::Right;
112
		this->ButOK->Location = System::Drawing::Point(217, 0);
113
		this->ButOK->Name = L"ButOK";
114
		this->ButOK->Size = System::Drawing::Size(75, 26);
115
		this->ButOK->TabIndex = 1;
116
		this->ButOK->Text = L"OK";
117
		this->ButOK->UseVisualStyleBackColor = true;
118
		// 
119
		// Label
120
		// 
121
		this->Label->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
122
			static_cast<System::Byte>(0)));
123
		this->Label->Location = System::Drawing::Point(53, 8);
124
		this->Label->Margin = System::Windows::Forms::Padding(3);
125
		this->Label->Name = L"Label";
126
		this->Label->Size = System::Drawing::Size(302, 37);
127
		this->Label->TabIndex = 1;
128
		this->Label->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
129
		// 
130
		// TextInput
131
		// 
132
		this->TextInput->Location = System::Drawing::Point(12, 49);
133
		this->TextInput->Name = L"TextInput";
134
		this->TextInput->Size = System::Drawing::Size(343, 20);
135
		this->TextInput->TabIndex = 2;
136
		// 
137
		// pictureBox1
138
		// 
139
		this->pictureBox1->Image = nullptr;//(cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"pictureBox1.Image")));
140
		this->pictureBox1->Location = System::Drawing::Point(12, 8);
141
		this->pictureBox1->Name = L"pictureBox1";
142
		this->pictureBox1->Size = System::Drawing::Size(35, 35);
143
		this->pictureBox1->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
144
		this->pictureBox1->TabIndex = 3;
145
		this->pictureBox1->TabStop = false;
146
		// 
147
		// InputBox
148
		// 
149
		this->AcceptButton = this->ButOK;
150
		this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
151
		this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
152
		this->CancelButton = this->ButCancel;
153
		this->ClientSize = System::Drawing::Size(367, 99);
154
		this->Controls->Add(this->pictureBox1);
155
		this->Controls->Add(this->TextInput);
156
		this->Controls->Add(this->Label);
157
		this->Controls->Add(this->panel1);
158
		this->Name = L"InputBox";
159
		this->Text = L"InputBox";
160
		this->panel1->ResumeLayout(false);
161
		(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->EndInit();
162
		this->ResumeLayout(false);
163
		this->Load += gcnew System::EventHandler(this, &InputBox::InputBox_Load);
164
		this->PerformLayout();
165
 
166
	}
167
#pragma endregion
168
	private: System::Void InputBox_Load(System::Object^  sender, System::EventArgs^  e) {
169
				 this->TextInput->Focus();
170
			 }
171
};