#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;


namespace ObjDataEdit {

	/// <summary>
	/// Summary for MessageDialog
	///
	/// 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 __gc class MessageDialog : public System::Windows::Forms::Form
	{
	public:
		MessageDialog(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~MessageDialog()
		{
			if (components)
			{
				components->Dispose();
			}
		}
	public: System::Windows::Forms::TextBox*  tbxMessage;
	private: System::Windows::Forms::Button*  btOK;
	public: 
	protected: 

	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)
		{
			this->tbxMessage = (new System::Windows::Forms::TextBox());
			this->btOK = (new System::Windows::Forms::Button());
			this->SuspendLayout();
			// 
			// tbxMessage
			// 
			this->tbxMessage->Anchor = (System::Windows::Forms::AnchorStyles)(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom) 
				| System::Windows::Forms::AnchorStyles::Left) 
				| System::Windows::Forms::AnchorStyles::Right);
			this->tbxMessage->BackColor = System::Drawing::SystemColors::MenuBar;
			this->tbxMessage->BorderStyle = System::Windows::Forms::BorderStyle::None;
			this->tbxMessage->Location = System::Drawing::Point(12, 12);
			this->tbxMessage->Multiline = true;
			this->tbxMessage->Name = S"tbxMessage";
			this->tbxMessage->ReadOnly = true;
			this->tbxMessage->ScrollBars = System::Windows::Forms::ScrollBars::Both;
			this->tbxMessage->Size = System::Drawing::Size(308, 135);
			this->tbxMessage->TabIndex = 2;
			// 
			// btOK
			// 
			this->btOK->Anchor = System::Windows::Forms::AnchorStyles::Bottom;
			this->btOK->Location = System::Drawing::Point(128, 152);
			this->btOK->Name = S"btOK";
			this->btOK->Size = System::Drawing::Size(75, 23);
			this->btOK->TabIndex = 3;
			this->btOK->Text = S"OK";
			this->btOK->UseVisualStyleBackColor = true;
			this->btOK->Click += new System::EventHandler(this, &MessageDialog::btOK_Click);
			// 
			// MessageDialog
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(331, 187);
			this->Controls->Add(this->btOK);
			this->Controls->Add(this->tbxMessage);
			this->Name = S"MessageDialog";
			this->Text = S"MessageDialog";
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private: System::Void btOK_Click(System::Object*  sender, System::EventArgs*  e)
			 {
				 this->Close();
			 }

	public: void ShowMessage(String* Content, String* Title)
			{
				tbxMessage->Text = Content;
				this->Text = Title;
				this->Show();
			}

	};
}
