#pragma once
#include "Form2.h"
#include "Form3.h"

namespace WeitereFenster {

	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>
	/// Zusammenfassung für Form1
	///
	/// Warnung: Wenn Sie den Namen dieser Klasse ändern, müssen Sie auch
	///          die Ressourcendateiname-Eigenschaft für das Tool zur Kompilierung verwalteter Ressourcen ändern,
	///          das allen RESX-Dateien zugewiesen ist, von denen diese Klasse abhängt.
	///          Anderenfalls können die Designer nicht korrekt mit den lokalisierten Ressourcen
	///          arbeiten, die diesem Formular zugewiesen sind.
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{
   private:
      Form3^ fenster;

	public:
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Konstruktorcode hier hinzufügen.
			//
         fenster = gcnew Form3();
         fenster->Text = "Neues Fenster";
		}

	protected:
		/// <summary>
		/// Verwendete Ressourcen bereinigen.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
   private: System::Windows::Forms::MenuStrip^  menuStrip1;
   private: System::Windows::Forms::ToolStripMenuItem^  miDatei;
   private: System::Windows::Forms::ToolStripMenuItem^  miDateiBeenden;
   protected: 


   private: System::Windows::Forms::ToolStripMenuItem^  miFenster;
   private: System::Windows::Forms::ToolStripMenuItem^  miFensterNeu;
   private: System::Windows::Forms::ToolStripMenuItem^  miFensterEinblenden;




	private:
		/// <summary>
		/// Erforderliche Designervariable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Erforderliche Methode für die Designerunterstützung.
		/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
		/// </summary>
		void InitializeComponent(void)
		{
         this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
         this->miDatei = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miDateiBeenden = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miFenster = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miFensterNeu = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miFensterEinblenden = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->menuStrip1->SuspendLayout();
         this->SuspendLayout();
         // 
         // menuStrip1
         // 
         this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {this->miDatei, this->miFenster});
         this->menuStrip1->Location = System::Drawing::Point(0, 0);
         this->menuStrip1->Name = L"menuStrip1";
         this->menuStrip1->Size = System::Drawing::Size(398, 24);
         this->menuStrip1->TabIndex = 0;
         this->menuStrip1->Text = L"menuStrip1";
         // 
         // miDatei
         // 
         this->miDatei->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(1) {this->miDateiBeenden});
         this->miDatei->Name = L"miDatei";
         this->miDatei->Size = System::Drawing::Size(46, 20);
         this->miDatei->Text = L"&Datei";
         // 
         // miDateiBeenden
         // 
         this->miDateiBeenden->Name = L"miDateiBeenden";
         this->miDateiBeenden->Size = System::Drawing::Size(120, 22);
         this->miDateiBeenden->Text = L"&Beenden";
         this->miDateiBeenden->Click += gcnew System::EventHandler(this, &Form1::miDateiBeenden_Click);
         // 
         // miFenster
         // 
         this->miFenster->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {this->miFensterNeu, 
            this->miFensterEinblenden});
         this->miFenster->Name = L"miFenster";
         this->miFenster->Size = System::Drawing::Size(57, 20);
         this->miFenster->Text = L"&Fenster";
         // 
         // miFensterNeu
         // 
         this->miFensterNeu->Name = L"miFensterNeu";
         this->miFensterNeu->Size = System::Drawing::Size(152, 22);
         this->miFensterNeu->Text = L"&Neu";
         this->miFensterNeu->Click += gcnew System::EventHandler(this, &Form1::miFensterNeu_Click);
         // 
         // miFensterEinblenden
         // 
         this->miFensterEinblenden->Name = L"miFensterEinblenden";
         this->miFensterEinblenden->Size = System::Drawing::Size(152, 22);
         this->miFensterEinblenden->Text = L"&Einblenden";
         this->miFensterEinblenden->Click += gcnew System::EventHandler(this, &Form1::miFensterEinblenden_Click);
         // 
         // Form1
         // 
         this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
         this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
         this->ClientSize = System::Drawing::Size(398, 244);
         this->Controls->Add(this->menuStrip1);
         this->MainMenuStrip = this->menuStrip1;
         this->Name = L"Form1";
         this->Text = L"Hauptfenster";
         this->menuStrip1->ResumeLayout(false);
         this->menuStrip1->PerformLayout();
         this->ResumeLayout(false);
         this->PerformLayout();

      }
#pragma endregion
   private: 
      void miDateiBeenden_Click(Object^  sender, EventArgs^  e) 
      {
         Close();
      }
      void miFensterNeu_Click(Object^  sender, EventArgs^  e) 
      {
         Form2^ fenster = gcnew Form2();
         fenster->Text = "Neues Fenster";

         fenster->Show();
      }
      void miFensterEinblenden_Click(Object^  sender, EventArgs^  e) 
      {
         fenster->Show();
      }
};
}

