Play Movie - add an Edit context menu item

This commit is contained in:
adelikat 2014-04-22 00:59:21 +00:00
parent c74019a54d
commit 0456639816
3 changed files with 304 additions and 269 deletions

View File

@ -46,12 +46,15 @@
this.Scan = new System.Windows.Forms.Button();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.MatchGameNameCheckBox = new System.Windows.Forms.CheckBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MovieView = new BizHawk.Client.EmuHawk.VirtualListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.groupBox1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// Cancel
@ -228,6 +231,21 @@
this.MatchGameNameCheckBox.UseVisualStyleBackColor = true;
this.MatchGameNameCheckBox.CheckedChanged += new System.EventHandler(this.MatchGameNameCheckBox_CheckedChanged);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.editToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(153, 48);
//
// editToolStripMenuItem
//
this.editToolStripMenuItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.CutHS;
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.editToolStripMenuItem.Text = "&Edit";
this.editToolStripMenuItem.Click += new System.EventHandler(this.EditMenuItem_Click);
//
// MovieView
//
this.MovieView.AllowDrop = true;
@ -240,6 +258,7 @@
this.columnHeader2,
this.columnHeader3,
this.columnHeader4});
this.MovieView.ContextMenuStrip = this.contextMenuStrip1;
this.MovieView.FullRowSelect = true;
this.MovieView.GridLines = true;
this.MovieView.HideSelection = false;
@ -247,6 +266,7 @@
this.MovieView.Location = new System.Drawing.Point(12, 28);
this.MovieView.MultiSelect = false;
this.MovieView.Name = "MovieView";
this.MovieView.SelectAllInProgress = false;
this.MovieView.selectedItem = -1;
this.MovieView.Size = new System.Drawing.Size(480, 303);
this.MovieView.TabIndex = 5;
@ -306,6 +326,7 @@
this.Text = "Play Movie";
this.Load += new System.EventHandler(this.PlayMovie_Load);
this.groupBox1.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -334,5 +355,7 @@
private System.Windows.Forms.Button Scan;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.CheckBox MatchGameNameCheckBox;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
}
}

View File

@ -484,6 +484,15 @@ namespace BizHawk.Client.EmuHawk
SubtitlesBtn.Enabled = _movieList[firstIndex].Header.Subtitles.Any();
}
private void EditMenuItem_Click(object sender, EventArgs e)
{
MovieView.SelectedIndices
.Cast<int>()
.Select(index => _movieList[index])
.ToList()
.ForEach(movie => System.Diagnostics.Process.Start(movie.Filename));
}
#endregion
#region Details

View File

@ -120,6 +120,9 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>114, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>