#pragma once


namespace msgshow {

	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>
	/// Form1 的摘要
	///
	/// 警告: 如果您變更這個類別的名稱，就必須變更與這個類別所依據之所有 .resx 檔案關聯的
	///          Managed 資源編譯器工具的 'Resource File Name' 屬性。
	///          否則，這些設計工具
	///          將無法與這個表單關聯的當地語系化資源
	///          正確互動。
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: 在此加入建構函式程式碼
			//
		}

	protected:
		/// <summary>
		/// 清除任何使用中的資源。
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  btnEnter;
	protected: 

	private: System::Windows::Forms::Button^  btnQuit;
	private: System::Windows::Forms::Label^  lblShow;
	private: System::Windows::Forms::Button^  button1;
	protected: 



	private:
		/// <summary>
		/// 設計工具所需的變數。
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改這個方法的內容。
		///
		/// </summary>
		void InitializeComponent(void)
		{
			this->btnEnter = (gcnew System::Windows::Forms::Button());
			this->btnQuit = (gcnew System::Windows::Forms::Button());
			this->lblShow = (gcnew System::Windows::Forms::Label());
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->SuspendLayout();
			// 
			// btnEnter
			// 
			this->btnEnter->Location = System::Drawing::Point(45, 125);
			this->btnEnter->Name = L"btnEnter";
			this->btnEnter->Size = System::Drawing::Size(87, 27);
			this->btnEnter->TabIndex = 0;
			this->btnEnter->Text = L"進入";
			this->btnEnter->UseVisualStyleBackColor = true;
			this->btnEnter->Click += gcnew System::EventHandler(this, &Form1::btnEnter_Click);
			// 
			// btnQuit
			// 
			this->btnQuit->Location = System::Drawing::Point(156, 125);
			this->btnQuit->Name = L"btnQuit";
			this->btnQuit->Size = System::Drawing::Size(87, 27);
			this->btnQuit->TabIndex = 1;
			this->btnQuit->Text = L"離開";
			this->btnQuit->UseVisualStyleBackColor = true;
			this->btnQuit->Click += gcnew System::EventHandler(this, &Form1::btnQuit_Click);
			// 
			// lblShow
			// 
			this->lblShow->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(192)), 
				static_cast<System::Int32>(static_cast<System::Byte>(255)));
			this->lblShow->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
			this->lblShow->Font = (gcnew System::Drawing::Font(L"新細明體", 14.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(136)));
			this->lblShow->Location = System::Drawing::Point(45, 46);
			this->lblShow->Name = L"lblShow";
			this->lblShow->Size = System::Drawing::Size(198, 41);
			this->lblShow->TabIndex = 2;
			this->lblShow->Text = L"碁峰資訊管理系統";
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(163, 177);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(75, 23);
			this->button1->TabIndex = 3;
			this->button1->Text = L"button1";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(292, 213);
			this->Controls->Add(this->button1);
			this->Controls->Add(this->lblShow);
			this->Controls->Add(this->btnQuit);
			this->Controls->Add(this->btnEnter);
			this->Name = L"Form1";
			this->Text = L"Form1";
			this->ResumeLayout(false);

		}
#pragma endregion
	private: System::Void btnEnter_Click(System::Object^  sender, System::EventArgs^  e)
	 {
	   lblShow->Text = "歡迎光臨,碁峰進銷存管理系統  ....";
     }

	private: System::Void btnQuit_Click(System::Object^  sender, System::EventArgs^  e)
	 {
	   if (MessageBox::Show ("您確定是否離開本系統？", "MsgBox測試", MessageBoxButtons::YesNo,MessageBoxIcon::Question) == Windows::Forms::DialogResult ::Yes)
	     {
	        MessageBox::Show("您已經離開本系統, 謝謝使用...", "離開提示訊息");
			Application::Exit() ;
         }
	   else
		   MessageBox::Show("您重新返回本系統, 繼續使用...", "返回提示訊息");		
	  }
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				 MessageBox::Show( " 一般顯示訊息的語法 , 請注意 ..." );
			 }
};
}

