OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 30 Oct 2008 22:34:13 +0000 (22:34 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 30 Oct 2008 22:34:13 +0000 (22:34 +0000)
- Simple right click context menu for the activity window. Allows users to copy text.

git-svn-id: svn://localhost/HandBrake/trunk@1885 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/frmActivityWindow.Designer.cs
win/C#/frmActivityWindow.cs
win/C#/frmActivityWindow.resx

index b6bb55e..837bf37 100644 (file)
@@ -39,20 +39,24 @@ namespace Handbrake
             this.rtf_actLog = new System.Windows.Forms.RichTextBox();\r
             this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
             this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
-            this.panel1 = new System.Windows.Forms.Panel();\r
-            this.statusStrip1 = new System.Windows.Forms.StatusStrip();\r
-            this.txt_log = new System.Windows.Forms.ToolStripStatusLabel();\r
             this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();\r
             this.btn_encode_log = new System.Windows.Forms.ToolStripMenuItem();\r
             this.btn_scan_log = new System.Windows.Forms.ToolStripMenuItem();\r
             this.btn_copy = new System.Windows.Forms.ToolStripButton();\r
+            this.panel1 = new System.Windows.Forms.Panel();\r
+            this.statusStrip1 = new System.Windows.Forms.StatusStrip();\r
             this.lbl_slb = new System.Windows.Forms.ToolStripStatusLabel();\r
+            this.txt_log = new System.Windows.Forms.ToolStripStatusLabel();\r
+            this.rightClickMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
+            this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\r
             this.toolStrip1.SuspendLayout();\r
             this.statusStrip1.SuspendLayout();\r
+            this.rightClickMenu.SuspendLayout();\r
             this.SuspendLayout();\r
             // \r
             // rtf_actLog\r
             // \r
+            this.rtf_actLog.ContextMenuStrip = this.rightClickMenu;\r
             this.rtf_actLog.Cursor = System.Windows.Forms.Cursors.IBeam;\r
             this.rtf_actLog.DetectUrls = false;\r
             this.rtf_actLog.Dock = System.Windows.Forms.DockStyle.Fill;\r
@@ -80,32 +84,6 @@ namespace Handbrake
             this.toolStrip1.TabIndex = 96;\r
             this.toolStrip1.Text = "toolStrip1";\r
             // \r
-            // panel1\r
-            // \r
-            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
-            this.panel1.Location = new System.Drawing.Point(0, 25);\r
-            this.panel1.Name = "panel1";\r
-            this.panel1.Size = new System.Drawing.Size(471, 552);\r
-            this.panel1.TabIndex = 97;\r
-            // \r
-            // statusStrip1\r
-            // \r
-            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
-            this.lbl_slb,\r
-            this.txt_log});\r
-            this.statusStrip1.Location = new System.Drawing.Point(0, 555);\r
-            this.statusStrip1.Name = "statusStrip1";\r
-            this.statusStrip1.Size = new System.Drawing.Size(471, 22);\r
-            this.statusStrip1.TabIndex = 98;\r
-            this.statusStrip1.Text = "statusStrip1";\r
-            // \r
-            // txt_log\r
-            // \r
-            this.txt_log.BackColor = System.Drawing.Color.Transparent;\r
-            this.txt_log.Name = "txt_log";\r
-            this.txt_log.Size = new System.Drawing.Size(85, 17);\r
-            this.txt_log.Text = "{selected log}";\r
-            // \r
             // toolStripDropDownButton1\r
             // \r
             this.toolStripDropDownButton1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;\r
@@ -123,7 +101,7 @@ namespace Handbrake
             // \r
             this.btn_encode_log.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
             this.btn_encode_log.Name = "btn_encode_log";\r
-            this.btn_encode_log.Size = new System.Drawing.Size(152, 22);\r
+            this.btn_encode_log.Size = new System.Drawing.Size(151, 22);\r
             this.btn_encode_log.Text = "Encode Log";\r
             this.btn_encode_log.Click += new System.EventHandler(this.btn_encode_log_Click);\r
             // \r
@@ -131,7 +109,7 @@ namespace Handbrake
             // \r
             this.btn_scan_log.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
             this.btn_scan_log.Name = "btn_scan_log";\r
-            this.btn_scan_log.Size = new System.Drawing.Size(152, 22);\r
+            this.btn_scan_log.Size = new System.Drawing.Size(151, 22);\r
             this.btn_scan_log.Text = "Scan Log";\r
             this.btn_scan_log.Click += new System.EventHandler(this.btn_scan_log_Click);\r
             // \r
@@ -145,6 +123,25 @@ namespace Handbrake
             this.btn_copy.Text = "Copy to clipboard";\r
             this.btn_copy.Click += new System.EventHandler(this.btn_copy_Click);\r
             // \r
+            // panel1\r
+            // \r
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.panel1.Location = new System.Drawing.Point(0, 25);\r
+            this.panel1.Name = "panel1";\r
+            this.panel1.Size = new System.Drawing.Size(471, 552);\r
+            this.panel1.TabIndex = 97;\r
+            // \r
+            // statusStrip1\r
+            // \r
+            this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.lbl_slb,\r
+            this.txt_log});\r
+            this.statusStrip1.Location = new System.Drawing.Point(0, 555);\r
+            this.statusStrip1.Name = "statusStrip1";\r
+            this.statusStrip1.Size = new System.Drawing.Size(471, 22);\r
+            this.statusStrip1.TabIndex = 98;\r
+            this.statusStrip1.Text = "statusStrip1";\r
+            // \r
             // lbl_slb\r
             // \r
             this.lbl_slb.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
@@ -152,6 +149,28 @@ namespace Handbrake
             this.lbl_slb.Size = new System.Drawing.Size(94, 17);\r
             this.lbl_slb.Text = "Selected Log: ";\r
             // \r
+            // txt_log\r
+            // \r
+            this.txt_log.BackColor = System.Drawing.Color.Transparent;\r
+            this.txt_log.Name = "txt_log";\r
+            this.txt_log.Size = new System.Drawing.Size(85, 17);\r
+            this.txt_log.Text = "{selected log}";\r
+            // \r
+            // rightClickMenu\r
+            // \r
+            this.rightClickMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.copyToolStripMenuItem});\r
+            this.rightClickMenu.Name = "rightClickMenu";\r
+            this.rightClickMenu.Size = new System.Drawing.Size(153, 48);\r
+            // \r
+            // copyToolStripMenuItem\r
+            // \r
+            this.copyToolStripMenuItem.Image = global::Handbrake.Properties.Resources.copy;\r
+            this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";\r
+            this.copyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);\r
+            this.copyToolStripMenuItem.Text = "Copy";\r
+            this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);\r
+            // \r
             // frmActivityWindow\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);\r
@@ -174,6 +193,7 @@ namespace Handbrake
             this.toolStrip1.PerformLayout();\r
             this.statusStrip1.ResumeLayout(false);\r
             this.statusStrip1.PerformLayout();\r
+            this.rightClickMenu.ResumeLayout(false);\r
             this.ResumeLayout(false);\r
             this.PerformLayout();\r
 \r
@@ -192,5 +212,7 @@ namespace Handbrake
         private System.Windows.Forms.ToolStripMenuItem btn_scan_log;\r
         private System.Windows.Forms.ToolStripButton btn_copy;\r
         private System.Windows.Forms.ToolStripStatusLabel lbl_slb;\r
+        private System.Windows.Forms.ContextMenuStrip rightClickMenu;\r
+        private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;\r
     }\r
 }
\ No newline at end of file
index cb2bbc2..17ec856 100644 (file)
@@ -268,5 +268,13 @@ namespace Handbrake
 \r
             this.Close();\r
         }\r
+\r
+        private void copyToolStripMenuItem_Click(object sender, EventArgs e)\r
+        {\r
+            if (rtf_actLog.SelectedText != "")\r
+                Clipboard.SetDataObject(rtf_actLog.SelectedText, true);\r
+            else\r
+                Clipboard.SetDataObject(rtf_actLog.Text, true);\r
+        }\r
     }\r
 }
\ No newline at end of file
index f35a715..3d9888b 100644 (file)
   <resheader name="writer">\r
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
   </resheader>\r
+  <metadata name="rightClickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>320, 17</value>\r
+  </metadata>\r
   <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
     <value>17, 17</value>\r
   </metadata>\r