summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/frmActivityWindow.Designer.cs31
-rw-r--r--win/C#/frmActivityWindow.cs14
-rw-r--r--win/C#/frmActivityWindow.resx15
-rw-r--r--win/C#/frmMain.cs59
-rw-r--r--win/C#/frmQueue.cs6
5 files changed, 111 insertions, 14 deletions
diff --git a/win/C#/frmActivityWindow.Designer.cs b/win/C#/frmActivityWindow.Designer.cs
index 1eb48fc44..d4e5ee33c 100644
--- a/win/C#/frmActivityWindow.Designer.cs
+++ b/win/C#/frmActivityWindow.Designer.cs
@@ -45,6 +45,8 @@ namespace Handbrake
this.panel1 = new System.Windows.Forms.Panel();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.txt_log = new System.Windows.Forms.ToolStripStatusLabel();
+ this.btn_copy = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
@@ -69,7 +71,9 @@ namespace Handbrake
//
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.toolStripDropDownButton1});
+ this.toolStripDropDownButton1,
+ this.toolStripSeparator1,
+ this.btn_copy});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
@@ -86,14 +90,14 @@ namespace Handbrake
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
- this.toolStripDropDownButton1.Size = new System.Drawing.Size(69, 22);
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(78, 22);
this.toolStripDropDownButton1.Text = "Select Log";
//
// btn_encode_log
//
this.btn_encode_log.Image = global::Handbrake.Properties.Resources.ActivityWindow_small;
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);
//
@@ -101,7 +105,7 @@ namespace Handbrake
//
this.btn_scan_log.Image = global::Handbrake.Properties.Resources.Movies_Small;
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);
//
@@ -127,9 +131,24 @@ namespace Handbrake
//
this.txt_log.BackColor = System.Drawing.Color.Transparent;
this.txt_log.Name = "txt_log";
- this.txt_log.Size = new System.Drawing.Size(74, 17);
+ this.txt_log.Size = new System.Drawing.Size(85, 17);
this.txt_log.Text = "{selected log}";
//
+ // btn_copy
+ //
+ this.btn_copy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.btn_copy.Image = ((System.Drawing.Image)(resources.GetObject("btn_copy.Image")));
+ this.btn_copy.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btn_copy.Name = "btn_copy";
+ this.btn_copy.Size = new System.Drawing.Size(106, 22);
+ this.btn_copy.Text = "Copy to clipboard";
+ this.btn_copy.Click += new System.EventHandler(this.btn_copy_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+ //
// frmActivityWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
@@ -168,5 +187,7 @@ namespace Handbrake
private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1;
private System.Windows.Forms.ToolStripMenuItem btn_encode_log;
private System.Windows.Forms.ToolStripMenuItem btn_scan_log;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripButton btn_copy;
}
} \ No newline at end of file
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index 7587d6ca2..6d46a449c 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -132,6 +132,16 @@ namespace Handbrake
}
/// <summary>
+ /// Copy to Clipboard
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void btn_copy_Click(object sender, EventArgs e)
+ {
+ Clipboard.SetDataObject(rtf_actLog.Text, true);
+ }
+
+ /// <summary>
/// Updates the log window with any new data which is in the log file.
/// This is done every 5 seconds.
/// </summary>
@@ -255,9 +265,5 @@ namespace Handbrake
this.Close();
}
-
-
-
-
}
} \ No newline at end of file
diff --git a/win/C#/frmActivityWindow.resx b/win/C#/frmActivityWindow.resx
index 627b5a9e2..0b13bb7d5 100644
--- a/win/C#/frmActivityWindow.resx
+++ b/win/C#/frmActivityWindow.resx
@@ -139,6 +139,21 @@
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
</value>
</data>
+ <data name="btn_copy.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
+ U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI
+ VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ
+ QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4
+ /g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9
+ cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j
+ 3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR
+ dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
+ NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
+ s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
+</value>
+ </data>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>204, 17</value>
</metadata>
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 18ba21460..f7b06a428 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -30,8 +30,9 @@ namespace Handbrake
Parsing.Title selectedTitle;
internal Process hbProc;
private Parsing.DVD thisDVD;
- private frmQueue queueWindow = new frmQueue();
+ private frmQueue queueWindow;
private delegate void updateStatusChanger();
+ private string lastAction = null;
// Applicaiton Startup ************************************************
@@ -43,6 +44,9 @@ namespace Handbrake
Form splash = new frmSplashScreen();
splash.Show();
+ // Initialize the queue window.
+ queueWindow = new frmQueue(this);
+
//Create a label that can be updated from the parent thread.
Label lblStatus = new Label();
lblStatus.Size = new Size(250, 20);
@@ -201,7 +205,13 @@ namespace Handbrake
}
private void mnu_encodeLog_Click(object sender, EventArgs e)
{
- frmActivityWindow dvdInfoWindow = new frmActivityWindow("hb_encode_log.dat", this, queueWindow);
+ String file = String.Empty;
+ if (lastAction == "scan")
+ file = "dvdinfo.dat";
+ else
+ file = "hb_encode_log.dat";
+
+ frmActivityWindow dvdInfoWindow = new frmActivityWindow(file, this, queueWindow);
dvdInfoWindow.Show();
}
private void mnu_options_Click(object sender, EventArgs e)
@@ -297,6 +307,10 @@ namespace Handbrake
MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
{
+ // Set the last action to encode.
+ // This is used for tracking which file to load in the activity window
+ lastAction = "encode";
+
String query;
if (rtf_query.Text != "")
query = rtf_query.Text;
@@ -337,13 +351,23 @@ namespace Handbrake
}
private void btn_ActivityWindow_Click(object sender, EventArgs e)
{
- frmActivityWindow ActivityWindow = new frmActivityWindow("hb_encode_log.dat", this, queueWindow);
+ String file = String.Empty;
+ if (lastAction == "scan")
+ file = "dvdinfo.dat";
+ else
+ file = "hb_encode_log.dat";
+
+ frmActivityWindow ActivityWindow = new frmActivityWindow(file, this, queueWindow);
ActivityWindow.Show();
}
//Source
private void btn_dvd_source_Click(object sender, EventArgs e)
{
+ // Set the last action to scan.
+ // This is used for tracking which file to load in the activity window
+ lastAction = "scan";
+
String filename = "";
text_source.Text = "";
@@ -373,6 +397,10 @@ namespace Handbrake
}
private void btn_file_source_Click(object sender, EventArgs e)
{
+ // Set the last action to scan.
+ // This is used for tracking which file to load in the activity window
+ lastAction = "scan";
+
String filename = "";
text_source.Text = "";
@@ -402,6 +430,10 @@ namespace Handbrake
}
private void mnu_dvd_drive_Click(object sender, EventArgs e)
{
+ // Set the last action to scan.
+ // This is used for tracking which file to load in the activity window
+ lastAction = "scan";
+
String filename = "";
if (mnu_dvd_drive.Text.Contains("VIDEO_TS"))
{
@@ -1826,6 +1858,16 @@ namespace Handbrake
btn_start.ToolTipText = "Start the encoding process";
btn_start.Image = Properties.Resources.Play;
}
+
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
+ /// Is the mainWindow currently monitoring an encoding session
+ /// </summary>
+ /// <returns>boolean</returns>
public Boolean isEncoding()
{
if (hbProc == null)
@@ -1833,7 +1875,16 @@ namespace Handbrake
else
return true;
}
-
+ /// <summary>
+ /// Action can be "encode" or "scan"
+ /// Set the last action varible in the main window.
+ /// This is used to control which log file is displayed when the Activity window is displayed.
+ /// </summary>
+ /// <param name="last">String</param>
+ public void setLastAction(string last)
+ {
+ this.lastAction = last;
+ }
#endregion
#region Taskbar Tray Icon
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 42cf72629..2ba5b2b2c 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -27,10 +27,12 @@ namespace Handbrake
Boolean cancel = false;
Process hbProc = null;
Functions.Queue queue;
+ frmMain mainWindow = null;
- public frmQueue()
+ public frmQueue(frmMain main)
{
InitializeComponent();
+ mainWindow = main;
}
/// <summary>
@@ -99,6 +101,8 @@ namespace Handbrake
// Initializes the encode process
private void btn_encode_Click(object sender, EventArgs e)
{
+ mainWindow.setLastAction("encode");
+
if (queue.count() != 0)
{
btn_encode.Enabled = false;