From f863bc41edd2f5e20bc5c5606d7483297c832c7a Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Mon, 12 Mar 2012 22:05:53 +0000 Subject: [PATCH] PCE GB Viewer - start a menu strip --- .../PCEtools/PCEBGViewer.Designer.cs | 132 +++++++++++++----- BizHawk.MultiClient/PCEtools/PCEBGViewer.cs | 5 + BizHawk.MultiClient/PCEtools/PCEBGViewer.resx | 3 + 3 files changed, 107 insertions(+), 33 deletions(-) diff --git a/BizHawk.MultiClient/PCEtools/PCEBGViewer.Designer.cs b/BizHawk.MultiClient/PCEtools/PCEBGViewer.Designer.cs index af8167a953..9284023e0f 100644 --- a/BizHawk.MultiClient/PCEtools/PCEBGViewer.Designer.cs +++ b/BizHawk.MultiClient/PCEtools/PCEBGViewer.Designer.cs @@ -28,39 +28,99 @@ /// private void InitializeComponent() { - this.vdcComboBox = new System.Windows.Forms.ComboBox(); - this.canvas = new BizHawk.MultiClient.PCEBGCanvas(); - this.SuspendLayout(); - // - // vdcComboBox - // - this.vdcComboBox.FormattingEnabled = true; - this.vdcComboBox.Location = new System.Drawing.Point(13, 13); - this.vdcComboBox.Name = "vdcComboBox"; - this.vdcComboBox.Size = new System.Drawing.Size(121, 20); - this.vdcComboBox.TabIndex = 1; - this.vdcComboBox.SelectedIndexChanged += new System.EventHandler(this.vdcComboBox_SelectedIndexChanged); - // - // canvas - // - this.canvas.Location = new System.Drawing.Point(12, 49); - this.canvas.Name = "canvas"; - this.canvas.Size = new System.Drawing.Size(1024, 512); - this.canvas.TabIndex = 0; - // - // PCEBGViewer - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1056, 573); - this.Controls.Add(this.vdcComboBox); - this.Controls.Add(this.canvas); - this.Name = "PCEBGViewer"; - this.ShowIcon = false; - this.Text = "PCE BG Viewer (interim)"; - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.PCEBGViewer_FormClosed); - this.Load += new System.EventHandler(this.PCEBGViewer_Load); - this.ResumeLayout(false); + this.vdcComboBox = new System.Windows.Forms.ComboBox(); + this.canvas = new BizHawk.MultiClient.PCEBGCanvas(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.autoloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // vdcComboBox + // + this.vdcComboBox.FormattingEnabled = true; + this.vdcComboBox.Location = new System.Drawing.Point(12, 27); + this.vdcComboBox.Name = "vdcComboBox"; + this.vdcComboBox.Size = new System.Drawing.Size(121, 21); + this.vdcComboBox.TabIndex = 1; + this.vdcComboBox.SelectedIndexChanged += new System.EventHandler(this.vdcComboBox_SelectedIndexChanged); + // + // canvas + // + this.canvas.Location = new System.Drawing.Point(12, 65); + this.canvas.Name = "canvas"; + this.canvas.Size = new System.Drawing.Size(1024, 543); + this.canvas.TabIndex = 0; + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.optionsToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(1056, 24); + this.menuStrip1.TabIndex = 2; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.exitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(54, 20); + this.fileToolStripMenuItem.Text = "&Viewer"; + // + // optionsToolStripMenuItem + // + this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.autoloadToolStripMenuItem, + this.saveWindowPositionToolStripMenuItem}); + this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; + this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 20); + this.optionsToolStripMenuItem.Text = "&Options"; + // + // autoloadToolStripMenuItem + // + this.autoloadToolStripMenuItem.Name = "autoloadToolStripMenuItem"; + this.autoloadToolStripMenuItem.Size = new System.Drawing.Size(191, 22); + this.autoloadToolStripMenuItem.Text = "&Auto-load"; + // + // saveWindowPositionToolStripMenuItem + // + this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem"; + this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(191, 22); + this.saveWindowPositionToolStripMenuItem.Text = "&Save Window position"; + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.ShortcutKeyDisplayString = "Alt+F4"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.exitToolStripMenuItem.Text = "E&xit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // PCEBGViewer + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1056, 649); + this.Controls.Add(this.vdcComboBox); + this.Controls.Add(this.canvas); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "PCEBGViewer"; + this.ShowIcon = false; + this.Text = "PCE BG Viewer (interim)"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.PCEBGViewer_FormClosed); + this.Load += new System.EventHandler(this.PCEBGViewer_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -68,5 +128,11 @@ private PCEBGCanvas canvas; private System.Windows.Forms.ComboBox vdcComboBox; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem autoloadToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveWindowPositionToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/PCEtools/PCEBGViewer.cs b/BizHawk.MultiClient/PCEtools/PCEBGViewer.cs index 75748377ea..5c7ec9e5df 100644 --- a/BizHawk.MultiClient/PCEtools/PCEBGViewer.cs +++ b/BizHawk.MultiClient/PCEtools/PCEBGViewer.cs @@ -110,5 +110,10 @@ namespace BizHawk.MultiClient { Generate(); } + + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + this.Close(); + } } } diff --git a/BizHawk.MultiClient/PCEtools/PCEBGViewer.resx b/BizHawk.MultiClient/PCEtools/PCEBGViewer.resx index 29dcb1b3a3..0f6d8eb42b 100644 --- a/BizHawk.MultiClient/PCEtools/PCEBGViewer.resx +++ b/BizHawk.MultiClient/PCEtools/PCEBGViewer.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file