#pragma once


namespace Symbolleisten {

	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
	{
	public:
		Form1(void)
		{
			InitializeComponent();
			

			/*** Bilder über ImageList verteilen ***/

			/* Die ImageList ist bereits mit den Bilder bestückt
			 *
			 * Um die Bilder zu verteilen heben Sie die Auskommentierung
			 * der nachfolgenden Anweisungen auf 
			 * und 
			 * kommentieren Sie dafür in der InitializeComponent()-Methode
			 * die Anweisungen zum Setzen der Eigenschaften
			 * Image und ImageTransparentColor aus
			 */
			/*
			toolStrip1->ImageList = imageList1;

			toolStripButton1->ImageIndex = 0;
			toolStripButton1->ImageTransparentColor = Color::Magenta;
			toolStripButton2->ImageIndex = 1;
			toolStripButton2->ImageTransparentColor = Color::Magenta;
			toolStripButton3->ImageIndex = 2;
			toolStripButton3->ImageTransparentColor = Color::Magenta;
			toolStripButton4->ImageIndex = 3;
			toolStripButton4->ImageTransparentColor = Color::Magenta;
			toolStripButton5->ImageIndex = 4;
			toolStripButton5->ImageTransparentColor = Color::Magenta;
			toolStripButton6->ImageIndex = 5;
			toolStripButton6->ImageTransparentColor = Color::Magenta;
            */
		}

	protected:
		/// <summary>
		/// Verwendete Ressourcen bereinigen.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
		}
    private: System::Windows::Forms::MenuStrip^  menuStrip1;
    private: System::Windows::Forms::ToolStripMenuItem^  miFile;
    private: System::Windows::Forms::ToolStripMenuItem^  miFileNew;
    private: System::Windows::Forms::ToolStripMenuItem^  miFileOpen;
    private: System::Windows::Forms::ToolStripMenuItem^  miFileSave;
    private: System::Windows::Forms::ToolStripSeparator^  toolStripMenuItem3;
    private: System::Windows::Forms::ToolStripMenuItem^  miFilePrint;
    private: System::Windows::Forms::ToolStripSeparator^  toolStripMenuItem1;
    private: System::Windows::Forms::ToolStripMenuItem^  miFileQuit;
    private: System::Windows::Forms::ToolStripMenuItem^  miEdit;
    private: System::Windows::Forms::ToolStripMenuItem^  miEditCut;
    private: System::Windows::Forms::ToolStripMenuItem^  miEditCopy;
    private: System::Windows::Forms::ToolStripMenuItem^  miEditPaste;


    private: System::Windows::Forms::ContextMenuStrip^  contextMenuStrip1;
    private: System::Windows::Forms::ToolStripMenuItem^  ausschneidenToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  kopierenToolStripMenuItem;
    private: System::Windows::Forms::ToolStripMenuItem^  einfuegenToolStripMenuItem;

	private: System::Windows::Forms::ToolStrip^  toolStrip1;
	private: System::Windows::Forms::ToolStripButton^  toolStripButton1;
	private: System::Windows::Forms::ToolStripButton^  toolStripButton2;
	private: System::Windows::Forms::ToolStripButton^  toolStripButton3;
	private: System::Windows::Forms::ToolStripSeparator^  toolStripSeparator1;
	private: System::Windows::Forms::ToolStripButton^  toolStripButton4;
	private: System::Windows::Forms::ToolStripButton^  toolStripButton5;
	private: System::Windows::Forms::ToolStripButton^  toolStripButton6;
	private: System::Windows::Forms::ImageList^  imageList1;





	private: System::ComponentModel::IContainer^  components;

	private:
		/// <summary>
		/// Erforderliche Designervariable.
		/// </summary>


#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->components = (gcnew System::ComponentModel::Container());
         System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
         this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
         this->miFile = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miFileNew = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miFileOpen = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miFileSave = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->toolStripMenuItem3 = (gcnew System::Windows::Forms::ToolStripSeparator());
         this->miFilePrint = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->toolStripMenuItem1 = (gcnew System::Windows::Forms::ToolStripSeparator());
         this->miFileQuit = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miEdit = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miEditCut = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miEditCopy = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->miEditPaste = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->contextMenuStrip1 = (gcnew System::Windows::Forms::ContextMenuStrip(this->components));
         this->ausschneidenToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->kopierenToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->einfuegenToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
         this->toolStrip1 = (gcnew System::Windows::Forms::ToolStrip());
         this->toolStripButton1 = (gcnew System::Windows::Forms::ToolStripButton());
         this->toolStripButton2 = (gcnew System::Windows::Forms::ToolStripButton());
         this->toolStripButton3 = (gcnew System::Windows::Forms::ToolStripButton());
         this->toolStripSeparator1 = (gcnew System::Windows::Forms::ToolStripSeparator());
         this->toolStripButton4 = (gcnew System::Windows::Forms::ToolStripButton());
         this->toolStripButton5 = (gcnew System::Windows::Forms::ToolStripButton());
         this->toolStripButton6 = (gcnew System::Windows::Forms::ToolStripButton());
         this->imageList1 = (gcnew System::Windows::Forms::ImageList(this->components));
         this->menuStrip1->SuspendLayout();
         this->contextMenuStrip1->SuspendLayout();
         this->toolStrip1->SuspendLayout();
         this->SuspendLayout();
         // 
         // menuStrip1
         // 
         this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(2) {this->miFile, this->miEdit});
         this->menuStrip1->Location = System::Drawing::Point(0, 0);
         this->menuStrip1->Name = L"menuStrip1";
         this->menuStrip1->Size = System::Drawing::Size(532, 24);
         this->menuStrip1->TabIndex = 1;
         this->menuStrip1->Text = L"menuStrip1";
         // 
         // miFile
         // 
         this->miFile->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(7) {this->miFileNew, this->miFileOpen, 
            this->miFileSave, this->toolStripMenuItem3, this->miFilePrint, this->toolStripMenuItem1, this->miFileQuit});
         this->miFile->Name = L"miFile";
         this->miFile->Size = System::Drawing::Size(46, 20);
         this->miFile->Text = L"&Datei";
         // 
         // miFileNew
         // 
         this->miFileNew->Name = L"miFileNew";
         this->miFileNew->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::N));
         this->miFileNew->Size = System::Drawing::Size(168, 22);
         this->miFileNew->Text = L"&Neu";
         this->miFileNew->Click += gcnew System::EventHandler(this, &Form1::miFileNew_Click);
         // 
         // miFileOpen
         // 
         this->miFileOpen->Name = L"miFileOpen";
         this->miFileOpen->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::O));
         this->miFileOpen->Size = System::Drawing::Size(168, 22);
         this->miFileOpen->Text = L"Ö&ffnen";
         this->miFileOpen->Click += gcnew System::EventHandler(this, &Form1::miFileOpen_Click);
         // 
         // miFileSave
         // 
         this->miFileSave->Name = L"miFileSave";
         this->miFileSave->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::S));
         this->miFileSave->Size = System::Drawing::Size(168, 22);
         this->miFileSave->Text = L"&Speichern";
         this->miFileSave->Click += gcnew System::EventHandler(this, &Form1::miFileSave_Click);
         // 
         // toolStripMenuItem3
         // 
         this->toolStripMenuItem3->Name = L"toolStripMenuItem3";
         this->toolStripMenuItem3->Size = System::Drawing::Size(165, 6);
         // 
         // miFilePrint
         // 
         this->miFilePrint->Name = L"miFilePrint";
         this->miFilePrint->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::P));
         this->miFilePrint->Size = System::Drawing::Size(168, 22);
         this->miFilePrint->Text = L"&Drucken";
         this->miFilePrint->Click += gcnew System::EventHandler(this, &Form1::miFilePrint_Click);
         // 
         // toolStripMenuItem1
         // 
         this->toolStripMenuItem1->Name = L"toolStripMenuItem1";
         this->toolStripMenuItem1->Size = System::Drawing::Size(165, 6);
         // 
         // miFileQuit
         // 
         this->miFileQuit->Name = L"miFileQuit";
         this->miFileQuit->Size = System::Drawing::Size(168, 22);
         this->miFileQuit->Text = L"&Beenden";
         this->miFileQuit->Click += gcnew System::EventHandler(this, &Form1::miFileQuit_Click);
         // 
         // miEdit
         // 
         this->miEdit->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(3) {this->miEditCut, this->miEditCopy, 
            this->miEditPaste});
         this->miEdit->Name = L"miEdit";
         this->miEdit->Size = System::Drawing::Size(75, 20);
         this->miEdit->Text = L"&Bearbeiten";
         // 
         // miEditCut
         // 
         this->miEditCut->Name = L"miEditCut";
         this->miEditCut->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::X));
         this->miEditCut->Size = System::Drawing::Size(191, 22);
         this->miEditCut->Text = L"Auss&chneiden";
         this->miEditCut->Click += gcnew System::EventHandler(this, &Form1::miEditCut_Click);
         // 
         // miEditCopy
         // 
         this->miEditCopy->Name = L"miEditCopy";
         this->miEditCopy->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::C));
         this->miEditCopy->Size = System::Drawing::Size(191, 22);
         this->miEditCopy->Text = L"&Kopieren";
         this->miEditCopy->Click += gcnew System::EventHandler(this, &Form1::miEditCopy_Click);
         // 
         // miEditPaste
         // 
         this->miEditPaste->Name = L"miEditPaste";
         this->miEditPaste->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::V));
         this->miEditPaste->Size = System::Drawing::Size(191, 22);
         this->miEditPaste->Text = L"&Einfügen";
         this->miEditPaste->Click += gcnew System::EventHandler(this, &Form1::miEditPaste_Click);
         // 
         // contextMenuStrip1
         // 
         this->contextMenuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(3) {this->ausschneidenToolStripMenuItem, 
            this->kopierenToolStripMenuItem, this->einfuegenToolStripMenuItem});
         this->contextMenuStrip1->Name = L"contextMenuStrip1";
         this->contextMenuStrip1->Size = System::Drawing::Size(192, 70);
         // 
         // ausschneidenToolStripMenuItem
         // 
         this->ausschneidenToolStripMenuItem->Name = L"ausschneidenToolStripMenuItem";
         this->ausschneidenToolStripMenuItem->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::X));
         this->ausschneidenToolStripMenuItem->Size = System::Drawing::Size(191, 22);
         this->ausschneidenToolStripMenuItem->Text = L"Ausschneiden";
         this->ausschneidenToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::contextmenu_Click);
         // 
         // kopierenToolStripMenuItem
         // 
         this->kopierenToolStripMenuItem->Name = L"kopierenToolStripMenuItem";
         this->kopierenToolStripMenuItem->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::C));
         this->kopierenToolStripMenuItem->Size = System::Drawing::Size(191, 22);
         this->kopierenToolStripMenuItem->Text = L"Kopieren";
         this->kopierenToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::contextmenu_Click);
         // 
         // einfuegenToolStripMenuItem
         // 
         this->einfuegenToolStripMenuItem->Name = L"einfuegenToolStripMenuItem";
         this->einfuegenToolStripMenuItem->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::V));
         this->einfuegenToolStripMenuItem->Size = System::Drawing::Size(191, 22);
         this->einfuegenToolStripMenuItem->Text = L"Einfügen";
         this->einfuegenToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::contextmenu_Click);
         // 
         // toolStrip1
         // 
         this->toolStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(7) {this->toolStripButton1, 
            this->toolStripButton2, this->toolStripButton3, this->toolStripSeparator1, this->toolStripButton4, this->toolStripButton5, this->toolStripButton6});
         this->toolStrip1->Location = System::Drawing::Point(0, 24);
         this->toolStrip1->Name = L"toolStrip1";
         this->toolStrip1->Size = System::Drawing::Size(532, 25);
         this->toolStrip1->TabIndex = 2;
         this->toolStrip1->Text = L"toolStrip1";
         // 
         // toolStripButton1
         // 
         this->toolStripButton1->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
         this->toolStripButton1->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton1.Image")));
         this->toolStripButton1->ImageTransparentColor = System::Drawing::Color::Magenta;
         this->toolStripButton1->Name = L"toolStripButton1";
         this->toolStripButton1->Size = System::Drawing::Size(23, 22);
         this->toolStripButton1->Text = L"toolStripButton1";
         this->toolStripButton1->ToolTipText = L"Neues Dokument";
         this->toolStripButton1->Click += gcnew System::EventHandler(this, &Form1::miFileNew_Click);
         // 
         // toolStripButton2
         // 
         this->toolStripButton2->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
         this->toolStripButton2->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton2.Image")));
         this->toolStripButton2->ImageTransparentColor = System::Drawing::Color::Magenta;
         this->toolStripButton2->Name = L"toolStripButton2";
         this->toolStripButton2->Size = System::Drawing::Size(23, 22);
         this->toolStripButton2->Text = L"toolStripButton2";
         this->toolStripButton2->ToolTipText = L"Datei öffnen";
         this->toolStripButton2->Click += gcnew System::EventHandler(this, &Form1::miFileOpen_Click);
         // 
         // toolStripButton3
         // 
         this->toolStripButton3->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
         this->toolStripButton3->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton3.Image")));
         this->toolStripButton3->ImageTransparentColor = System::Drawing::Color::Magenta;
         this->toolStripButton3->Name = L"toolStripButton3";
         this->toolStripButton3->Size = System::Drawing::Size(23, 22);
         this->toolStripButton3->Text = L"toolStripButton3";
         this->toolStripButton3->ToolTipText = L"Datei speichern";
         this->toolStripButton3->Click += gcnew System::EventHandler(this, &Form1::miFileSave_Click);
         // 
         // toolStripSeparator1
         // 
         this->toolStripSeparator1->Name = L"toolStripSeparator1";
         this->toolStripSeparator1->Size = System::Drawing::Size(6, 25);
         // 
         // toolStripButton4
         // 
         this->toolStripButton4->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
         this->toolStripButton4->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton4.Image")));
         this->toolStripButton4->ImageTransparentColor = System::Drawing::Color::Magenta;
         this->toolStripButton4->Name = L"toolStripButton4";
         this->toolStripButton4->Size = System::Drawing::Size(23, 22);
         this->toolStripButton4->Text = L"toolStripButton4";
         this->toolStripButton4->ToolTipText = L"Ausschneiden";
         this->toolStripButton4->Click += gcnew System::EventHandler(this, &Form1::miEditCut_Click);
         // 
         // toolStripButton5
         // 
         this->toolStripButton5->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
         this->toolStripButton5->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton5.Image")));
         this->toolStripButton5->ImageTransparentColor = System::Drawing::Color::Magenta;
         this->toolStripButton5->Name = L"toolStripButton5";
         this->toolStripButton5->Size = System::Drawing::Size(23, 22);
         this->toolStripButton5->Text = L"toolStripButton5";
         this->toolStripButton5->ToolTipText = L"Kopieren";
         this->toolStripButton5->Click += gcnew System::EventHandler(this, &Form1::miEditCopy_Click);
         // 
         // toolStripButton6
         // 
         this->toolStripButton6->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
         this->toolStripButton6->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"toolStripButton6.Image")));
         this->toolStripButton6->ImageTransparentColor = System::Drawing::Color::Magenta;
         this->toolStripButton6->Name = L"toolStripButton6";
         this->toolStripButton6->Size = System::Drawing::Size(23, 22);
         this->toolStripButton6->Text = L"toolStripButton6";
         this->toolStripButton6->ToolTipText = L"Einfügen";
         this->toolStripButton6->Click += gcnew System::EventHandler(this, &Form1::miEditPaste_Click);
         // 
         // imageList1
         // 
         this->imageList1->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^  >(resources->GetObject(L"imageList1.ImageStream")));
         this->imageList1->TransparentColor = System::Drawing::Color::Transparent;
         this->imageList1->Images->SetKeyName(0, L"NewDocument.bmp");
         this->imageList1->Images->SetKeyName(1, L"OpenFolder.bmp");
         this->imageList1->Images->SetKeyName(2, L"Save.bmp");
         this->imageList1->Images->SetKeyName(3, L"Cut.bmp");
         this->imageList1->Images->SetKeyName(4, L"Copy.bmp");
         this->imageList1->Images->SetKeyName(5, L"Paste.bmp");
         // 
         // Form1
         // 
         this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
         this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
         this->ClientSize = System::Drawing::Size(532, 295);
         this->ContextMenuStrip = this->contextMenuStrip1;
         this->Controls->Add(this->toolStrip1);
         this->Controls->Add(this->menuStrip1);
         this->Name = L"Form1";
         this->Text = L"Symbolleisten-Demo";
         this->menuStrip1->ResumeLayout(false);
         this->menuStrip1->PerformLayout();
         this->contextMenuStrip1->ResumeLayout(false);
         this->toolStrip1->ResumeLayout(false);
         this->toolStrip1->PerformLayout();
         this->ResumeLayout(false);
         this->PerformLayout();

      }
#pragma endregion
private: 
        void miFileNew_Click(System::Object^  sender, System::EventArgs^  e) 
        {
            MessageBox::Show("Datei/Neu", "Befehl");
        }
        void miFileOpen_Click(System::Object^  sender, System::EventArgs^  e) 
        {
            MessageBox::Show("Datei/Öffnen", "Befehl");
        }
        void miFileSave_Click(System::Object^  sender, System::EventArgs^  e) 
        {
            MessageBox::Show("Datei/Speichern", "Befehl");
        }
        void miFilePrint_Click(System::Object^  sender, System::EventArgs^  e) 
        {
            MessageBox::Show("Datei/Drucken", "Befehl");
        }
        void miFileQuit_Click(System::Object^  sender, System::EventArgs^  e) 
        {
            MessageBox::Show("Datei/Beenden", "Befehl");
        }
        void miEditCut_Click(System::Object^  sender, System::EventArgs^  e) 
        {
            MessageBox::Show("Bearbeiten/Ausschneiden", "Befehl");
        }
        void miEditCopy_Click(System::Object^  sender, System::EventArgs^  e) 
        {
            MessageBox::Show("Bearbeiten/Kopieren", "Befehl");
        }
        void miEditPaste_Click(System::Object^  sender, System::EventArgs^  e) 
        {
            MessageBox::Show("Bearbeiten/Einfügen", "Befehl");
        }

        
        void contextmenu_Click(System::Object^  sender, System::EventArgs^  e) 
        {
            ToolStripMenuItem ^mi = dynamic_cast<ToolStripMenuItem^>(sender);

            if (mi->Text == "Ausschneiden")
                MessageBox::Show("Kontextmenü/Ausschneiden", "Befehl");
            else if (mi->Text == "Kopieren")
                MessageBox::Show("Kontextmenü/Kopieren", "Befehl");
            else if (mi->Text == "Einfügen")
                MessageBox::Show("Kontextmenü/Einfügen", "Befehl");
        }
};
}

