Blame | Last modification | View Log | RSS feed
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for InputBox
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
/// </summary>
public ref class InputBox : public System::Windows::Forms::Form
{
public:
InputBox(System::String ^str)
{
InitializeComponent();
Label->Text = str;
TextInput->Focus();
}
InputBox(System::String ^str, System::String ^text)
{
InitializeComponent();
Label->Text = str;
TextInput->Text = text;
TextInput->Focus();
}
System::String ^GetInput() { return TextInput->Text; }
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~InputBox()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Panel^ panel1;
private: System::Windows::Forms::Button^ ButOK;
protected:
private: System::Windows::Forms::Button^ ButCancel;
private: System::Windows::Forms::Label^ Label;
private: System::Windows::Forms::TextBox^ TextInput;
private: System::Windows::Forms::PictureBox^ pictureBox1;
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(InputBox::typeid));
this->panel1 = (gcnew System::Windows::Forms::Panel());
this->ButCancel = (gcnew System::Windows::Forms::Button());
this->ButOK = (gcnew System::Windows::Forms::Button());
this->Label = (gcnew System::Windows::Forms::Label());
this->TextInput = (gcnew System::Windows::Forms::TextBox());
this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
this->panel1->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit();
this->SuspendLayout();
//
// panel1
//
this->panel1->Controls->Add(this->ButOK);
this->panel1->Controls->Add(this->ButCancel);
this->panel1->Dock = System::Windows::Forms::DockStyle::Bottom;
this->panel1->Location = System::Drawing::Point(0, 73);
this->panel1->Name = L"panel1";
this->panel1->Size = System::Drawing::Size(367, 26);
this->panel1->TabIndex = 0;
//
// ButCancel
//
this->ButCancel->DialogResult = System::Windows::Forms::DialogResult::Cancel;
this->ButCancel->Dock = System::Windows::Forms::DockStyle::Right;
this->ButCancel->Location = System::Drawing::Point(292, 0);
this->ButCancel->Name = L"ButCancel";
this->ButCancel->Size = System::Drawing::Size(75, 26);
this->ButCancel->TabIndex = 0;
this->ButCancel->Text = L"Cancel";
this->ButCancel->UseVisualStyleBackColor = true;
//
// ButOK
//
this->ButOK->DialogResult = System::Windows::Forms::DialogResult::OK;
this->ButOK->Dock = System::Windows::Forms::DockStyle::Right;
this->ButOK->Location = System::Drawing::Point(217, 0);
this->ButOK->Name = L"ButOK";
this->ButOK->Size = System::Drawing::Size(75, 26);
this->ButOK->TabIndex = 1;
this->ButOK->Text = L"OK";
this->ButOK->UseVisualStyleBackColor = true;
//
// Label
//
this->Label->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->Label->Location = System::Drawing::Point(53, 8);
this->Label->Margin = System::Windows::Forms::Padding(3);
this->Label->Name = L"Label";
this->Label->Size = System::Drawing::Size(302, 37);
this->Label->TabIndex = 1;
this->Label->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
//
// TextInput
//
this->TextInput->Location = System::Drawing::Point(12, 49);
this->TextInput->Name = L"TextInput";
this->TextInput->Size = System::Drawing::Size(343, 20);
this->TextInput->TabIndex = 2;
//
// pictureBox1
//
this->pictureBox1->Image = nullptr;//(cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox1.Image")));
this->pictureBox1->Location = System::Drawing::Point(12, 8);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size = System::Drawing::Size(35, 35);
this->pictureBox1->SizeMode = System::Windows::Forms::PictureBoxSizeMode::StretchImage;
this->pictureBox1->TabIndex = 3;
this->pictureBox1->TabStop = false;
//
// InputBox
//
this->AcceptButton = this->ButOK;
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->CancelButton = this->ButCancel;
this->ClientSize = System::Drawing::Size(367, 99);
this->Controls->Add(this->pictureBox1);
this->Controls->Add(this->TextInput);
this->Controls->Add(this->Label);
this->Controls->Add(this->panel1);
this->Name = L"InputBox";
this->Text = L"InputBox";
this->panel1->ResumeLayout(false);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
this->ResumeLayout(false);
this->Load += gcnew System::EventHandler(this, &InputBox::InputBox_Load);
this->PerformLayout();
}
#pragma endregion
private: System::Void InputBox_Load(System::Object^ sender, System::EventArgs^ e) {
this->TextInput->Focus();
}
};