summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-10-30 22:34:13 +0000
committersr55 <[email protected]>2008-10-30 22:34:13 +0000
commit16fbfc0272961f9bcb59ff42f34118c92545a312 (patch)
treea18f03f05c6335b084c52159c3273a97751b72da /win/C#
parent8c79730a0cb1feeec9e2abf8bb6fc1168e043484 (diff)
WinGui:
- Simple right click context menu for the activity window. Allows users to copy text. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1885 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/frmActivityWindow.Designer.cs84
-rw-r--r--win/C#/frmActivityWindow.cs8
-rw-r--r--win/C#/frmActivityWindow.resx3
3 files changed, 64 insertions, 31 deletions
diff --git a/win/C#/frmActivityWindow.Designer.cs b/win/C#/frmActivityWindow.Designer.cs
index b6bb55eb8..837bf372f 100644
--- a/win/C#/frmActivityWindow.Designer.cs
+++ b/win/C#/frmActivityWindow.Designer.cs
@@ -39,20 +39,24 @@ namespace Handbrake
this.rtf_actLog = new System.Windows.Forms.RichTextBox();
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
- this.panel1 = new System.Windows.Forms.Panel();
- this.statusStrip1 = new System.Windows.Forms.StatusStrip();
- this.txt_log = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
this.btn_encode_log = new System.Windows.Forms.ToolStripMenuItem();
this.btn_scan_log = new System.Windows.Forms.ToolStripMenuItem();
this.btn_copy = new System.Windows.Forms.ToolStripButton();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lbl_slb = new System.Windows.Forms.ToolStripStatusLabel();
+ this.txt_log = new System.Windows.Forms.ToolStripStatusLabel();
+ this.rightClickMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
+ this.rightClickMenu.SuspendLayout();
this.SuspendLayout();
//
// rtf_actLog
//
+ this.rtf_actLog.ContextMenuStrip = this.rightClickMenu;
this.rtf_actLog.Cursor = System.Windows.Forms.Cursors.IBeam;
this.rtf_actLog.DetectUrls = false;
this.rtf_actLog.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -80,32 +84,6 @@ namespace Handbrake
this.toolStrip1.TabIndex = 96;
this.toolStrip1.Text = "toolStrip1";
//
- // panel1
- //
- this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel1.Location = new System.Drawing.Point(0, 25);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(471, 552);
- this.panel1.TabIndex = 97;
- //
- // statusStrip1
- //
- this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.lbl_slb,
- this.txt_log});
- this.statusStrip1.Location = new System.Drawing.Point(0, 555);
- this.statusStrip1.Name = "statusStrip1";
- this.statusStrip1.Size = new System.Drawing.Size(471, 22);
- this.statusStrip1.TabIndex = 98;
- this.statusStrip1.Text = "statusStrip1";
- //
- // txt_log
- //
- this.txt_log.BackColor = System.Drawing.Color.Transparent;
- this.txt_log.Name = "txt_log";
- this.txt_log.Size = new System.Drawing.Size(85, 17);
- this.txt_log.Text = "{selected log}";
- //
// toolStripDropDownButton1
//
this.toolStripDropDownButton1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
@@ -123,7 +101,7 @@ namespace Handbrake
//
this.btn_encode_log.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.btn_encode_log.Name = "btn_encode_log";
- this.btn_encode_log.Size = new System.Drawing.Size(152, 22);
+ this.btn_encode_log.Size = new System.Drawing.Size(151, 22);
this.btn_encode_log.Text = "Encode Log";
this.btn_encode_log.Click += new System.EventHandler(this.btn_encode_log_Click);
//
@@ -131,7 +109,7 @@ namespace Handbrake
//
this.btn_scan_log.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.btn_scan_log.Name = "btn_scan_log";
- this.btn_scan_log.Size = new System.Drawing.Size(152, 22);
+ this.btn_scan_log.Size = new System.Drawing.Size(151, 22);
this.btn_scan_log.Text = "Scan Log";
this.btn_scan_log.Click += new System.EventHandler(this.btn_scan_log_Click);
//
@@ -145,6 +123,25 @@ namespace Handbrake
this.btn_copy.Text = "Copy to clipboard";
this.btn_copy.Click += new System.EventHandler(this.btn_copy_Click);
//
+ // panel1
+ //
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(0, 25);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(471, 552);
+ this.panel1.TabIndex = 97;
+ //
+ // statusStrip1
+ //
+ this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.lbl_slb,
+ this.txt_log});
+ this.statusStrip1.Location = new System.Drawing.Point(0, 555);
+ this.statusStrip1.Name = "statusStrip1";
+ this.statusStrip1.Size = new System.Drawing.Size(471, 22);
+ this.statusStrip1.TabIndex = 98;
+ this.statusStrip1.Text = "statusStrip1";
+ //
// lbl_slb
//
this.lbl_slb.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -152,6 +149,28 @@ namespace Handbrake
this.lbl_slb.Size = new System.Drawing.Size(94, 17);
this.lbl_slb.Text = "Selected Log: ";
//
+ // txt_log
+ //
+ this.txt_log.BackColor = System.Drawing.Color.Transparent;
+ this.txt_log.Name = "txt_log";
+ this.txt_log.Size = new System.Drawing.Size(85, 17);
+ this.txt_log.Text = "{selected log}";
+ //
+ // rightClickMenu
+ //
+ this.rightClickMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.copyToolStripMenuItem});
+ this.rightClickMenu.Name = "rightClickMenu";
+ this.rightClickMenu.Size = new System.Drawing.Size(153, 48);
+ //
+ // copyToolStripMenuItem
+ //
+ this.copyToolStripMenuItem.Image = global::Handbrake.Properties.Resources.copy;
+ this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
+ this.copyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.copyToolStripMenuItem.Text = "Copy";
+ this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
+ //
// frmActivityWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
@@ -174,6 +193,7 @@ namespace Handbrake
this.toolStrip1.PerformLayout();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
+ this.rightClickMenu.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -192,5 +212,7 @@ namespace Handbrake
private System.Windows.Forms.ToolStripMenuItem btn_scan_log;
private System.Windows.Forms.ToolStripButton btn_copy;
private System.Windows.Forms.ToolStripStatusLabel lbl_slb;
+ private System.Windows.Forms.ContextMenuStrip rightClickMenu;
+ private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
}
} \ No newline at end of file
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index cb2bbc222..17ec856a8 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -268,5 +268,13 @@ namespace Handbrake
this.Close();
}
+
+ private void copyToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (rtf_actLog.SelectedText != "")
+ Clipboard.SetDataObject(rtf_actLog.SelectedText, true);
+ else
+ Clipboard.SetDataObject(rtf_actLog.Text, true);
+ }
}
} \ No newline at end of file
diff --git a/win/C#/frmActivityWindow.resx b/win/C#/frmActivityWindow.resx
index f35a715fb..3d9888b14 100644
--- a/win/C#/frmActivityWindow.resx
+++ b/win/C#/frmActivityWindow.resx
@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <metadata name="rightClickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>320, 17</value>
+ </metadata>
<metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>