Log Window - support Ctrl+C for Copy Selection

This commit is contained in:
adelikat 2014-04-03 21:03:30 +00:00
parent a946beb40f
commit 72b3ca7204
2 changed files with 119 additions and 108 deletions

View File

@ -103,6 +103,7 @@
//
// virtualListView1
//
this.virtualListView1.BlazingFast = false;
this.virtualListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1});
this.virtualListView1.Dock = System.Windows.Forms.DockStyle.Fill;
@ -111,6 +112,7 @@
this.virtualListView1.ItemCount = 0;
this.virtualListView1.Location = new System.Drawing.Point(0, 0);
this.virtualListView1.Name = "virtualListView1";
this.virtualListView1.SelectAllInProgress = false;
this.virtualListView1.selectedItem = -1;
this.virtualListView1.Size = new System.Drawing.Size(675, 368);
this.virtualListView1.TabIndex = 8;
@ -119,6 +121,7 @@
this.virtualListView1.VirtualMode = true;
this.virtualListView1.QueryItemText += new BizHawk.Client.EmuHawk.QueryItemTextHandler(this.virtualListView1_QueryItemText);
this.virtualListView1.ClientSizeChanged += new System.EventHandler(this.virtualListView1_ClientSizeChanged);
this.virtualListView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.virtualListView1_KeyDown);
//
// LogWindow
//

View File

@ -118,5 +118,13 @@ namespace BizHawk.Client.EmuHawk
if (sb.Length > 0)
Clipboard.SetText(sb.ToString(), TextDataFormat.Text);
}
private void virtualListView1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.C && e.Control && !e.Alt && !e.Shift)
{
buttonCopy_Click(null, null);
}
}
}
}