summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-07-10 15:55:37 +0000
committersr55 <[email protected]>2008-07-10 15:55:37 +0000
commitca09da86966397b6467b4dcf912673386b63170a (patch)
tree9df7a05bc78e010cad1dcebef44ae7331dee8a9a /win
parent6affb8475cbf438da4ee2a6ac218295f63d8414c (diff)
WinGui:
- Activity log window code changed significantly. Now, instead of refeshing the whole log every 5 seconds, it only adds the new lines of log output. - Fixed bugs where the autoUpdate thread could keep running after the windows had been closed, causing exceptions to occur. - Removed some debug code from frmMain git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1562 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/frmActivityWindow.Designer.cs7
-rw-r--r--win/C#/frmActivityWindow.cs96
-rw-r--r--win/C#/frmMain.Designer.cs233
-rw-r--r--win/C#/frmMain.cs2
4 files changed, 192 insertions, 146 deletions
diff --git a/win/C#/frmActivityWindow.Designer.cs b/win/C#/frmActivityWindow.Designer.cs
index 7191e29dc..865bf3c05 100644
--- a/win/C#/frmActivityWindow.Designer.cs
+++ b/win/C#/frmActivityWindow.Designer.cs
@@ -50,10 +50,9 @@ namespace Handbrake
this.rtf_actLog.Location = new System.Drawing.Point(0, 0);
this.rtf_actLog.Name = "rtf_actLog";
this.rtf_actLog.ReadOnly = true;
- this.rtf_actLog.Size = new System.Drawing.Size(390, 390);
+ this.rtf_actLog.Size = new System.Drawing.Size(441, 512);
this.rtf_actLog.TabIndex = 29;
this.rtf_actLog.Text = "";
-
//
// ToolTip
//
@@ -65,7 +64,7 @@ namespace Handbrake
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(390, 390);
+ this.panel1.Size = new System.Drawing.Size(441, 512);
this.panel1.TabIndex = 95;
//
// frmActivityWindow
@@ -73,7 +72,7 @@ namespace Handbrake
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ClientSize = new System.Drawing.Size(390, 390);
+ this.ClientSize = new System.Drawing.Size(441, 512);
this.Controls.Add(this.panel1);
this.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index 6ec70d7dc..e23ff0aa5 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -5,7 +5,7 @@
It may be used under the terms of the GNU General Public License. */
using System;
-using System.Collections.Generic;
+using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
@@ -27,6 +27,8 @@ namespace Handbrake
String read_file;
frmMain mainWindow;
frmQueue queueWindow;
+ int position = 0; // Position in the arraylist reached by the current log output in the rtf box.
+
/// <summary>
/// This window should be used to display the RAW output of the handbrake CLI which is produced during an encode.
@@ -38,34 +40,61 @@ namespace Handbrake
mainWindow = fm;
queueWindow = fq;
+ read_file = file;
+ // Reset some varibles
this.rtf_actLog.Text = string.Empty;
-
- read_file = file;
+ position = 0;
string logFile = Path.Combine(Path.GetTempPath(), read_file);
if (File.Exists(logFile))
{
- if (read_file == "dvdinfo.dat") // No need to refresh the window if we are viwing dvdinfo.dat
- updateTextFromThread();
- else // however, we should refresh when reading the encode log file.
- {
- monitorFile = new Thread(autoUpdate);
- monitorFile.Start();
- }
+ // Add a header to the log file indicating that it's from the Windows GUI and display the windows version
+ rtf_actLog.AppendText("### Windows GUI \n");
+ rtf_actLog.AppendText(String.Format("### Running: {0} \n###\n", Environment.OSVersion.ToString()));
+
+ // Start a new thread to run the autoUpdate process
+ monitorFile = new Thread(autoUpdate);
+ monitorFile.Start();
}
else
MessageBox.Show("The log file could not be found. Maybe you cleared your system's tempory folder or maybe you just havn't run an encode yet.", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+
+ // Handle the event of the window being disposed. This is needed to make sure HandBrake exit's cleanly.
+ this.Disposed += new EventHandler(forceQuit);
+ }
+
+ // Ok, so, this function is called when someone closes frmMain but didn't close frmActivitWindow first.
+ // When you close frmMain, the activity window gets closed (disposed of) but, this doens't kill the threads that it started.
+ // When that thread tries to access the disposed rich text box, it causes an exception.
+ // Basically, this function is called when the window is disposed of, to kill the thread and close the window properly.
+ // This allows HandBrake to close cleanly.
+ private void forceQuit(object sender, EventArgs e)
+ {
+ if (monitorFile != null)
+ monitorFile.Abort();
+
+ this.Close();
}
// Update the Activity window every 5 seconds with the latest log data.
private void autoUpdate(object state)
{
+ Boolean lastUpdate = false;
updateTextFromThread();
while (true)
- {
+ {
if ((mainWindow.isEncoding() == true) || (queueWindow.isEncoding() == true))
updateTextFromThread();
+ else
+ {
+ // The encode may just have stoped, so, refresh the log one more time before restarting it.
+ if (lastUpdate == false)
+ updateTextFromThread();
+
+ lastUpdate = true;
+ position = 0;
+ }
Thread.Sleep(5000);
}
}
@@ -80,27 +109,41 @@ namespace Handbrake
this.BeginInvoke(new UpdateUIHandler(updateTextFromThread));
return;
}
- rtf_actLog.Text = readFile();
- this.rtf_actLog.SelectionStart = this.rtf_actLog.Text.Length - 1;
- this.rtf_actLog.ScrollToCaret();
+ // Initialize a pointer and get the log data arraylist
+ ArrayList data = readFile();
+
+ while (position < data.Count)
+ {
+ rtf_actLog.AppendText(data[position].ToString());
+ if (data[position].ToString().Contains("has exited"))
+ {
+ rtf_actLog.AppendText("\n ############ End of Encode ############## \n");
+ }
+ position++;
+ }
+
+ // this.rtf_actLog.SelectionStart = this.rtf_actLog.Text.Length - 1;
+ // this.rtf_actLog.ScrollToCaret();
}
catch (Exception exc)
{
- MessageBox.Show(exc.ToString());
+ MessageBox.Show("An error has occured in: updateTextFromThread(). \n You may have to restart HandBrake. \n Error Information: \n\n" + exc.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
- private string readFile()
+ private ArrayList readFile()
{
- string log = "";
+ // Ok, the task here is to, Get an arraylist of log data.
+ // And update some global varibles which are pointers to the last displayed log line.
+ ArrayList logData = new ArrayList();
+
try
{
- // hb_encode_log.dat is the primary log file. Since .NET can't read this file whilst the CLI is outputing to it,
+ // hb_encode_log.dat is the primary log file. Since .NET can't read this file whilst the CLI is outputing to it (Not even in read only mode),
// we'll need to make a copy of it.
string logFile = Path.Combine(Path.GetTempPath(), read_file);
string logFile2 = Path.Combine(Path.GetTempPath(), "hb_encode_log_AppReadable.dat");
-
// Make sure the application readable log file does not already exist. FileCopy fill fail if it does.
if (File.Exists(logFile2))
File.Delete(logFile2);
@@ -108,25 +151,30 @@ namespace Handbrake
// Copy the log file.
File.Copy(logFile, logFile2);
- // Begin processing the log file.
+ // Open the copied log file for reading
StreamReader sr = new StreamReader(logFile2);
string line = sr.ReadLine();
while (line != null)
{
- log = log + (line + System.Environment.NewLine);
+ if (line.Trim() != "")
+ logData.Add(line + System.Environment.NewLine);
+
line = sr.ReadLine();
}
sr.Close();
sr.Dispose();
+
+ return logData;
}
catch (Exception exc)
{
- MessageBox.Show("An Error has occured! \n\n" + exc.ToString(), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show("Error in readFile() \n Unable to read the log file.\n You may have to restart HandBrake.\n Error Information: \n\n" + exc.ToString(), "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
-
- return log;
+ return null;
}
+
+ // Ok, We need to make sure the monitor thread is dead when we close the window.
protected override void OnClosing(CancelEventArgs e)
{
if (monitorFile != null)
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index aec3f8fc9..b2ca12981 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -86,15 +86,21 @@ namespace Handbrake
this.lbl_src_res = new System.Windows.Forms.Label();
this.lbl_duration = new System.Windows.Forms.Label();
this.label_duration = new System.Windows.Forms.Label();
+ this.drop_format = new System.Windows.Forms.ComboBox();
this.DVD_Open = new System.Windows.Forms.FolderBrowserDialog();
this.File_Open = new System.Windows.Forms.OpenFileDialog();
this.ISO_Open = new System.Windows.Forms.OpenFileDialog();
this.FileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_open = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.mnu_exit = new System.Windows.Forms.ToolStripMenuItem();
this.mnu_open3 = new System.Windows.Forms.ToolStripMenuItem();
this.ToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_encode = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_encodeLog = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_viewDVDdata = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
+ this.mnu_options = new System.Windows.Forms.ToolStripMenuItem();
this.PresetsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mnu_presetReset = new System.Windows.Forms.ToolStripMenuItem();
this.mnu_delete_preset = new System.Windows.Forms.ToolStripMenuItem();
@@ -116,6 +122,7 @@ namespace Handbrake
this.Label9 = new System.Windows.Forms.Label();
this.Label10 = new System.Windows.Forms.Label();
this.groupBox_output = new System.Windows.Forms.GroupBox();
+ this.label5 = new System.Windows.Forms.Label();
this.Label47 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
this.TabPage2 = new System.Windows.Forms.TabPage();
@@ -244,29 +251,22 @@ namespace Handbrake
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.treeView_presets = new System.Windows.Forms.TreeView();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
- this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
- this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
- this.lbl_encode = new System.Windows.Forms.ToolStripLabel();
- this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
- this.drop_format = new System.Windows.Forms.ComboBox();
- this.label5 = new System.Windows.Forms.Label();
this.btn_source = new System.Windows.Forms.ToolStripDropDownButton();
this.btn_file_source = new System.Windows.Forms.ToolStripMenuItem();
this.btn_dvd_source = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.mnu_dvd_drive = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.btn_start = new System.Windows.Forms.ToolStripButton();
this.btn_add2Queue = new System.Windows.Forms.ToolStripButton();
this.btn_showQueue = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.btn_ActivityWindow = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.btn_minimize = new System.Windows.Forms.ToolStripButton();
- this.mnu_open = new System.Windows.Forms.ToolStripMenuItem();
- this.mnu_encode = new System.Windows.Forms.ToolStripMenuItem();
- this.mnu_encodeLog = new System.Windows.Forms.ToolStripMenuItem();
- this.mnu_viewDVDdata = new System.Windows.Forms.ToolStripMenuItem();
- this.mnu_options = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
+ this.lbl_encode = new System.Windows.Forms.ToolStripLabel();
+ this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
Label38 = new System.Windows.Forms.Label();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
@@ -997,6 +997,24 @@ namespace Handbrake
this.label_duration.Text = "Duration:";
this.ToolTip.SetToolTip(this.label_duration, "Top / Bottom / Left / Right");
//
+ // drop_format
+ //
+ this.drop_format.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_format.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.drop_format.FormattingEnabled = true;
+ this.drop_format.Items.AddRange(new object[] {
+ "MP4 File",
+ "M4V File",
+ "MKV File",
+ "AVI File",
+ "OGM File"});
+ this.drop_format.Location = new System.Drawing.Point(75, 19);
+ this.drop_format.Name = "drop_format";
+ this.drop_format.Size = new System.Drawing.Size(106, 21);
+ this.drop_format.TabIndex = 28;
+ this.ToolTip.SetToolTip(this.drop_format, "Select a video encoder");
+ this.drop_format.SelectedIndexChanged += new System.EventHandler(this.drop_format_SelectedIndexChanged);
+ //
// DVD_Open
//
this.DVD_Open.Description = "Select the \"VIDEO_TS\" folder from your DVD Drive.";
@@ -1024,6 +1042,16 @@ namespace Handbrake
this.FileToolStripMenuItem.Size = new System.Drawing.Size(38, 20);
this.FileToolStripMenuItem.Text = "&File";
//
+ // mnu_open
+ //
+ this.mnu_open.Image = ((System.Drawing.Image)(resources.GetObject("mnu_open.Image")));
+ this.mnu_open.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.mnu_open.Name = "mnu_open";
+ this.mnu_open.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
+ this.mnu_open.Size = new System.Drawing.Size(210, 22);
+ this.mnu_open.Text = "&Import Preset";
+ this.mnu_open.Click += new System.EventHandler(this.mnu_open_Click);
+ //
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
@@ -1053,11 +1081,44 @@ namespace Handbrake
this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(49, 20);
this.ToolsToolStripMenuItem.Text = "&Tools";
//
+ // mnu_encode
+ //
+ this.mnu_encode.Image = global::Handbrake.Properties.Resources.Queue_Small;
+ this.mnu_encode.Name = "mnu_encode";
+ this.mnu_encode.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));
+ this.mnu_encode.Size = new System.Drawing.Size(251, 22);
+ this.mnu_encode.Text = "Show Queue";
+ this.mnu_encode.Click += new System.EventHandler(this.mnu_encode_Click);
+ //
+ // mnu_encodeLog
+ //
+ this.mnu_encodeLog.Image = global::Handbrake.Properties.Resources.ActivityWindow_small;
+ this.mnu_encodeLog.Name = "mnu_encodeLog";
+ this.mnu_encodeLog.Size = new System.Drawing.Size(251, 22);
+ this.mnu_encodeLog.Text = "Activity Window (Encode log)";
+ this.mnu_encodeLog.Click += new System.EventHandler(this.mnu_encodeLog_Click);
+ //
+ // mnu_viewDVDdata
+ //
+ this.mnu_viewDVDdata.Image = global::Handbrake.Properties.Resources.Movies_Small;
+ this.mnu_viewDVDdata.Name = "mnu_viewDVDdata";
+ this.mnu_viewDVDdata.Size = new System.Drawing.Size(251, 22);
+ this.mnu_viewDVDdata.Text = "Activity Window (Scan log)";
+ this.mnu_viewDVDdata.Click += new System.EventHandler(this.mnu_viewDVDdata_Click);
+ //
// ToolStripSeparator5
//
this.ToolStripSeparator5.Name = "ToolStripSeparator5";
this.ToolStripSeparator5.Size = new System.Drawing.Size(248, 6);
//
+ // mnu_options
+ //
+ this.mnu_options.Image = global::Handbrake.Properties.Resources.Pref_Small;
+ this.mnu_options.Name = "mnu_options";
+ this.mnu_options.Size = new System.Drawing.Size(251, 22);
+ this.mnu_options.Text = "Options";
+ this.mnu_options.Click += new System.EventHandler(this.mnu_options_Click);
+ //
// PresetsToolStripMenuItem
//
this.PresetsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -1259,6 +1320,17 @@ namespace Handbrake
this.groupBox_output.TabStop = false;
this.groupBox_output.Text = "Output Settings (Preset: None)";
//
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label5.ForeColor = System.Drawing.Color.Black;
+ this.label5.Location = new System.Drawing.Point(17, 23);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(52, 13);
+ this.label5.TabIndex = 27;
+ this.label5.Text = "Format:";
+ //
// Label47
//
this.Label47.AutoSize = true;
@@ -1636,6 +1708,7 @@ namespace Handbrake
this.drp_track1Audio.Name = "drp_track1Audio";
this.drp_track1Audio.Size = new System.Drawing.Size(194, 20);
this.drp_track1Audio.TabIndex = 3;
+
//
// Label32
//
@@ -2859,72 +2932,6 @@ namespace Handbrake
this.toolStrip1.TabIndex = 0;
this.toolStrip1.Text = "toolStrip1";
//
- // toolStripSeparator10
- //
- this.toolStripSeparator10.Name = "toolStripSeparator10";
- this.toolStripSeparator10.Size = new System.Drawing.Size(6, 39);
- //
- // toolStripSeparator4
- //
- this.toolStripSeparator4.Name = "toolStripSeparator4";
- this.toolStripSeparator4.Size = new System.Drawing.Size(6, 39);
- //
- // toolStripSeparator8
- //
- this.toolStripSeparator8.Name = "toolStripSeparator8";
- this.toolStripSeparator8.Size = new System.Drawing.Size(6, 39);
- //
- // toolStripSeparator9
- //
- this.toolStripSeparator9.Name = "toolStripSeparator9";
- this.toolStripSeparator9.Size = new System.Drawing.Size(6, 39);
- //
- // lbl_encode
- //
- this.lbl_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_encode.Name = "lbl_encode";
- this.lbl_encode.Size = new System.Drawing.Size(148, 36);
- this.lbl_encode.Text = "Encoding: Not Started";
- //
- // notifyIcon
- //
- this.notifyIcon.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;
- this.notifyIcon.BalloonTipText = "HandBrake Status Here";
- this.notifyIcon.BalloonTipTitle = "HandBrake";
- this.notifyIcon.ContextMenuStrip = notifyIconMenu;
- this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));
- this.notifyIcon.Text = "HandBrake";
- this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);
- //
- // drop_format
- //
- this.drop_format.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_format.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.drop_format.FormattingEnabled = true;
- this.drop_format.Items.AddRange(new object[] {
- "MP4 File",
- "M4V File",
- "MKV File",
- "AVI File",
- "OGM File"});
- this.drop_format.Location = new System.Drawing.Point(75, 19);
- this.drop_format.Name = "drop_format";
- this.drop_format.Size = new System.Drawing.Size(106, 21);
- this.drop_format.TabIndex = 28;
- this.ToolTip.SetToolTip(this.drop_format, "Select a video encoder");
- this.drop_format.SelectedIndexChanged += new System.EventHandler(this.drop_format_SelectedIndexChanged);
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label5.ForeColor = System.Drawing.Color.Black;
- this.label5.Location = new System.Drawing.Point(17, 23);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(52, 13);
- this.label5.TabIndex = 27;
- this.label5.Text = "Format:";
- //
// btn_source
//
this.btn_source.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -2971,6 +2978,11 @@ namespace Handbrake
this.mnu_dvd_drive.Visible = false;
this.mnu_dvd_drive.Click += new System.EventHandler(this.mnu_dvd_drive_Click);
//
+ // toolStripSeparator10
+ //
+ this.toolStripSeparator10.Name = "toolStripSeparator10";
+ this.toolStripSeparator10.Size = new System.Drawing.Size(6, 39);
+ //
// btn_start
//
this.btn_start.Image = global::Handbrake.Properties.Resources.Play;
@@ -3004,6 +3016,11 @@ namespace Handbrake
this.btn_showQueue.Text = "Show Queue";
this.btn_showQueue.Click += new System.EventHandler(this.btn_showQueue_Click);
//
+ // toolStripSeparator4
+ //
+ this.toolStripSeparator4.Name = "toolStripSeparator4";
+ this.toolStripSeparator4.Size = new System.Drawing.Size(6, 39);
+ //
// btn_ActivityWindow
//
this.btn_ActivityWindow.Image = global::Handbrake.Properties.Resources.ActivityWindow;
@@ -3016,6 +3033,11 @@ namespace Handbrake
"ently running encode.";
this.btn_ActivityWindow.Click += new System.EventHandler(this.btn_ActivityWindow_Click);
//
+ // toolStripSeparator8
+ //
+ this.toolStripSeparator8.Name = "toolStripSeparator8";
+ this.toolStripSeparator8.Size = new System.Drawing.Size(6, 39);
+ //
// btn_minimize
//
this.btn_minimize.Image = ((System.Drawing.Image)(resources.GetObject("btn_minimize.Image")));
@@ -3025,48 +3047,27 @@ namespace Handbrake
this.btn_minimize.Text = "Minimize To Taskbar";
this.btn_minimize.Click += new System.EventHandler(this.btn_minimize_Click);
//
- // mnu_open
- //
- this.mnu_open.Image = ((System.Drawing.Image)(resources.GetObject("mnu_open.Image")));
- this.mnu_open.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.mnu_open.Name = "mnu_open";
- this.mnu_open.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
- this.mnu_open.Size = new System.Drawing.Size(210, 22);
- this.mnu_open.Text = "&Import Preset";
- this.mnu_open.Click += new System.EventHandler(this.mnu_open_Click);
- //
- // mnu_encode
- //
- this.mnu_encode.Image = global::Handbrake.Properties.Resources.Queue_Small;
- this.mnu_encode.Name = "mnu_encode";
- this.mnu_encode.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));
- this.mnu_encode.Size = new System.Drawing.Size(251, 22);
- this.mnu_encode.Text = "Show Queue";
- this.mnu_encode.Click += new System.EventHandler(this.mnu_encode_Click);
- //
- // mnu_encodeLog
+ // toolStripSeparator9
//
- this.mnu_encodeLog.Image = global::Handbrake.Properties.Resources.ActivityWindow_small;
- this.mnu_encodeLog.Name = "mnu_encodeLog";
- this.mnu_encodeLog.Size = new System.Drawing.Size(251, 22);
- this.mnu_encodeLog.Text = "Activity Window (Encode log)";
- this.mnu_encodeLog.Click += new System.EventHandler(this.mnu_encodeLog_Click);
+ this.toolStripSeparator9.Name = "toolStripSeparator9";
+ this.toolStripSeparator9.Size = new System.Drawing.Size(6, 39);
//
- // mnu_viewDVDdata
+ // lbl_encode
//
- this.mnu_viewDVDdata.Image = global::Handbrake.Properties.Resources.Movies_Small;
- this.mnu_viewDVDdata.Name = "mnu_viewDVDdata";
- this.mnu_viewDVDdata.Size = new System.Drawing.Size(251, 22);
- this.mnu_viewDVDdata.Text = "Activity Window (Scan log)";
- this.mnu_viewDVDdata.Click += new System.EventHandler(this.mnu_viewDVDdata_Click);
+ this.lbl_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_encode.Name = "lbl_encode";
+ this.lbl_encode.Size = new System.Drawing.Size(148, 36);
+ this.lbl_encode.Text = "Encoding: Not Started";
//
- // mnu_options
+ // notifyIcon
//
- this.mnu_options.Image = global::Handbrake.Properties.Resources.Pref_Small;
- this.mnu_options.Name = "mnu_options";
- this.mnu_options.Size = new System.Drawing.Size(251, 22);
- this.mnu_options.Text = "Options";
- this.mnu_options.Click += new System.EventHandler(this.mnu_options_Click);
+ this.notifyIcon.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;
+ this.notifyIcon.BalloonTipText = "HandBrake Status Here";
+ this.notifyIcon.BalloonTipTitle = "HandBrake";
+ this.notifyIcon.ContextMenuStrip = notifyIconMenu;
+ this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));
+ this.notifyIcon.Text = "HandBrake";
+ this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);
//
// frmMain
//
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 70b5649bb..2b05d5018 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -1970,7 +1970,6 @@ namespace Handbrake
hbProc = cliObj.runCli(this, (string)state);
hbProc.WaitForExit();
- //MessageBox.Show(hbProc.ExitCode.ToString());
setEncodeLabelFinished();
hbProc = null;
@@ -2045,7 +2044,6 @@ namespace Handbrake
#endregion
-
// This is the END of the road ------------------------------------------------------------------------------
}
} \ No newline at end of file