summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-07-04 14:24:59 +0000
committersr55 <[email protected]>2009-07-04 14:24:59 +0000
commitbdf19259ac2d6ac94abf0fad38ce6c98e3e58460 (patch)
tree3b92fa3d9ef24eeb3e71a45574b1c7f96d720558 /win
parentf3ea70992ab591a46754f68f5b7b02ca9d0529cc (diff)
WinGui:
- Update checker code cleaned up and multi-threaded. (Thanks to darkassassin ) Made some minor changes to this code to fit it in. http://forum.handbrake.fr/viewtopic.php?f=4&t=11353 - Queue window no longer takes focus on each new addition to the queue. ( Quite annoying otherwise ) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2661 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/Controls/x264Panel.Designer.cs1
-rw-r--r--win/C#/Controls/x264Panel.resx3
-rw-r--r--win/C#/Functions/AppcastReader.cs11
-rw-r--r--win/C#/Functions/Main.cs122
-rw-r--r--win/C#/Functions/UpdateCheckInformation.cs23
-rw-r--r--win/C#/HandBrakeCS.csproj1
-rw-r--r--win/C#/frmMain.Designer.cs29
-rw-r--r--win/C#/frmMain.cs78
-rw-r--r--win/C#/frmMain.resx10
-rw-r--r--win/C#/frmQueue.cs17
-rw-r--r--win/C#/frmUpdater.cs8
11 files changed, 216 insertions, 87 deletions
diff --git a/win/C#/Controls/x264Panel.Designer.cs b/win/C#/Controls/x264Panel.Designer.cs
index 379b3dcbc..2c7d6cf42 100644
--- a/win/C#/Controls/x264Panel.Designer.cs
+++ b/win/C#/Controls/x264Panel.Designer.cs
@@ -698,6 +698,7 @@ namespace Handbrake.Controls
// x264Panel
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.slider_psytrellis);
this.Controls.Add(this.lbl_psytrellis);
this.Controls.Add(this.lbl_psyrd);
diff --git a/win/C#/Controls/x264Panel.resx b/win/C#/Controls/x264Panel.resx
index 8dca4f1d7..dbd32d12a 100644
--- a/win/C#/Controls/x264Panel.resx
+++ b/win/C#/Controls/x264Panel.resx
@@ -120,9 +120,6 @@
<metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 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>
<data name="slider_psyrd.ToolTip" xml:space="preserve">
<value>Psychovisual Rate Distortion Optimization sure is a mouthful, isn't it? Basically, it means x264 tries to retain detail, for better quality to the human eye,
as opposed to trying to maximize quality the way a computer understands it, through signal-to-noise ratios that have trouble telling apart fine detail and noise.</value>
diff --git a/win/C#/Functions/AppcastReader.cs b/win/C#/Functions/AppcastReader.cs
index 944258597..861bd0bae 100644
--- a/win/C#/Functions/AppcastReader.cs
+++ b/win/C#/Functions/AppcastReader.cs
@@ -7,6 +7,7 @@
using System;
using System.Xml;
using System.Text.RegularExpressions;
+using System.IO;
namespace Handbrake.Functions
{
@@ -15,15 +16,15 @@ namespace Handbrake.Functions
/// <summary>
/// Get the build information from the required appcasts. Run before accessing the public vars.
/// </summary>
- public void getInfo()
+ public void getInfo(string input)
{
// Get the correct Appcast and set input.
- XmlNode nodeItem = Properties.Settings.Default.hb_build.ToString().EndsWith("1") ? readRss(new XmlTextReader(Properties.Settings.Default.appcast_unstable)) : readRss(new XmlTextReader(Properties.Settings.Default.appcast));
- string input = nodeItem.InnerXml;
+ XmlNode nodeItem = readRss(new XmlTextReader(new StringReader(input)));
+ string result = nodeItem.InnerXml;
// Regular Expressions
- Match ver = Regex.Match(input, @"sparkle:version=""([0-9]*)\""");
- Match verShort = Regex.Match(input, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");
+ Match ver = Regex.Match(result, @"sparkle:version=""([0-9]*)\""");
+ Match verShort = Regex.Match(result, @"sparkle:shortVersionString=""([0-9].[0-9].[0-9]*)\""");
build = ver.ToString().Replace("sparkle:version=", "").Replace("\"", "");
version = verShort.ToString().Replace("sparkle:shortVersionString=", "").Replace("\"", "");
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 04d4d16b4..1b223babd 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -13,6 +13,7 @@ using System.Collections.Generic;
using System.Xml.Serialization;
using System.Threading;
using Handbrake.EncodeQueue;
+using System.Net;
namespace Handbrake.Functions
{
@@ -189,40 +190,6 @@ namespace Handbrake.Functions
}
/// <summary>
- /// Checks for updates and returns true if an update is available.
- /// </summary>
- /// <param name="debug">Turns on debug mode. Don't use on program startup</param>
- /// <returns>Boolean True = Update available</returns>
- public static Boolean updateCheck(Boolean debug)
- {
- try
- {
- AppcastReader rssRead = new AppcastReader();
- rssRead.getInfo(); // Initializes the class.
- string build = rssRead.build;
-
- int latest = int.Parse(build);
- int current = Properties.Settings.Default.hb_build;
- int skip = Properties.Settings.Default.skipversion;
-
- if (latest == skip)
- return false;
-
- Properties.Settings.Default.lastUpdateCheckDate = DateTime.Now;
- Properties.Settings.Default.Save();
-
- Boolean update = (latest > current);
- return update;
- }
- catch (Exception exc)
- {
- if (debug)
- MessageBox.Show("Unable to check for updates, Please try again later. \n" + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return false;
- }
- }
-
- /// <summary>
/// Get's HandBrakes version data from the CLI.
/// </summary>
/// <returns>Arraylist of Version Data. 0 = hb_version 1 = hb_build</returns>
@@ -370,5 +337,92 @@ namespace Handbrake.Functions
}
}
+ /// <summary>
+ /// Begins checking for an update to HandBrake.
+ /// </summary>
+ /// <param name="callback">The method that will be called when the check is finished.</param>
+ /// <param name="debug">Whether or not to execute this in debug mode.</param>
+ public static void BeginCheckForUpdates(AsyncCallback callback, bool debug)
+ {
+ ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
+ {
+ try
+ {
+ // Is this a stable or unstable build?
+ string url = Properties.Settings.Default.hb_build.ToString().EndsWith("1") ? Properties.Settings.Default.appcast_unstable : Properties.Settings.Default.appcast;
+
+ // Initialize variables
+ WebRequest request = WebRequest.Create(url);
+ WebResponse response = request.GetResponse();
+ AppcastReader reader = new AppcastReader();
+
+ // Get the data, convert it to a string, and parse it into the AppcastReader
+ reader.getInfo(new StreamReader(response.GetResponseStream()).ReadToEnd());
+
+ // Further parse the information
+ string build = reader.build;
+
+ int latest = int.Parse(build);
+ int current = Properties.Settings.Default.hb_build;
+ int skip = Properties.Settings.Default.skipversion;
+
+ // If the user wanted to skip this version, don't report the update
+ if (latest == skip)
+ {
+ UpdateCheckInformation info = new UpdateCheckInformation() { NewVersionAvailable = false, BuildInformation = null };
+ callback(new UpdateCheckResult(debug, info));
+ return;
+ }
+
+ // Set when the last update was
+ Properties.Settings.Default.lastUpdateCheckDate = DateTime.Now;
+ Properties.Settings.Default.Save();
+
+ UpdateCheckInformation info2 = new UpdateCheckInformation() { NewVersionAvailable = latest > current, BuildInformation = reader };
+ callback(new UpdateCheckResult(debug, info2));
+ }
+ catch (Exception exc)
+ {
+ callback(new UpdateCheckResult(debug, new UpdateCheckInformation() { Error = exc }));
+ }
+ }));
+ }
+
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="result"></param>
+ /// <returns></returns>
+ public static UpdateCheckInformation EndCheckForUpdates(IAsyncResult result)
+ {
+ UpdateCheckResult checkResult = (UpdateCheckResult)result;
+ return checkResult.Result;
+ }
+
+ /// <summary>
+ /// Used in EndUpdateCheck() for update checking and the IAsyncResult design pattern.
+ /// </summary>
+ private class UpdateCheckResult : IAsyncResult
+ {
+ public UpdateCheckResult(object asyncState, UpdateCheckInformation info)
+ {
+ AsyncState = asyncState;
+ Result = info;
+ }
+
+ /// <summary>
+ /// Gets whether the check was executed in debug mode.
+ /// </summary>
+ public object AsyncState { get; private set; }
+
+ /// <summary>
+ /// Gets the result of the update check.
+ /// </summary>
+ public UpdateCheckInformation Result { get; private set; }
+
+ public WaitHandle AsyncWaitHandle { get { throw new NotImplementedException(); } }
+ public bool CompletedSynchronously { get { throw new NotImplementedException(); } }
+ public bool IsCompleted { get { throw new NotImplementedException(); } }
+ }
}
}
diff --git a/win/C#/Functions/UpdateCheckInformation.cs b/win/C#/Functions/UpdateCheckInformation.cs
new file mode 100644
index 000000000..253817866
--- /dev/null
+++ b/win/C#/Functions/UpdateCheckInformation.cs
@@ -0,0 +1,23 @@
+using System;
+
+namespace Handbrake.Functions
+{
+ /// <summary>
+ /// Provides information about an update check.
+ /// </summary>
+ public struct UpdateCheckInformation
+ {
+ public bool NewVersionAvailable { get; set; }
+ public bool ErrorOccured { get { return Error != null; } }
+
+ /// <summary>
+ /// Gets information about the new build, if any. This will be null if there is no new verison.
+ /// </summary>
+ public AppcastReader BuildInformation { get; set; }
+
+ /// <summary>
+ /// Gets the error that occurred, if any. This will be null if no error occured.
+ /// </summary>
+ public Exception Error { get; set; }
+ }
+}
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj
index 824d97084..76666f2b7 100644
--- a/win/C#/HandBrakeCS.csproj
+++ b/win/C#/HandBrakeCS.csproj
@@ -193,6 +193,7 @@
<Compile Include="Functions\PresetLoader.cs" />
<Compile Include="Functions\QueryGenerator.cs" />
<Compile Include="Functions\Main.cs" />
+ <Compile Include="Functions\UpdateCheckInformation.cs" />
<Compile Include="Functions\Win32.cs" />
<Compile Include="Presets\preset.cs" />
<Compile Include="Presets\PresetsHandler.cs" />
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 83751198e..d7b522eb3 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -158,6 +158,7 @@ namespace Handbrake
this.lbl_source = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.groupBox_output = new System.Windows.Forms.Label();
+ this.lbl_updateCheck = new System.Windows.Forms.ToolStripStatusLabel();
this.PictureSettings = new Handbrake.Controls.PictureSettings();
this.Filters = new Handbrake.Controls.Filters();
this.AudioSettings = new Handbrake.Controls.AudioPanel();
@@ -793,6 +794,7 @@ namespace Handbrake
// Label47
//
this.Label47.AutoSize = true;
+ this.Label47.BackColor = System.Drawing.Color.Transparent;
this.Label47.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label47.ForeColor = System.Drawing.Color.Black;
this.Label47.Location = new System.Drawing.Point(13, 39);
@@ -859,17 +861,19 @@ namespace Handbrake
// radio_cq
//
this.radio_cq.AutoSize = true;
+ this.radio_cq.BackColor = System.Drawing.Color.Transparent;
this.radio_cq.Location = new System.Drawing.Point(336, 97);
this.radio_cq.Name = "radio_cq";
this.radio_cq.Size = new System.Drawing.Size(125, 17);
this.radio_cq.TabIndex = 18;
this.radio_cq.Text = "Constant Quality:";
- this.radio_cq.UseVisualStyleBackColor = true;
+ this.radio_cq.UseVisualStyleBackColor = false;
this.radio_cq.CheckedChanged += new System.EventHandler(this.radio_cq_CheckedChanged);
//
// radio_avgBitrate
//
this.radio_avgBitrate.AutoSize = true;
+ this.radio_avgBitrate.BackColor = System.Drawing.Color.Transparent;
this.radio_avgBitrate.Checked = true;
this.radio_avgBitrate.Location = new System.Drawing.Point(336, 64);
this.radio_avgBitrate.Name = "radio_avgBitrate";
@@ -877,18 +881,19 @@ namespace Handbrake
this.radio_avgBitrate.TabIndex = 17;
this.radio_avgBitrate.TabStop = true;
this.radio_avgBitrate.Text = "Avg Bitrate (kbps):";
- this.radio_avgBitrate.UseVisualStyleBackColor = true;
+ this.radio_avgBitrate.UseVisualStyleBackColor = false;
this.radio_avgBitrate.CheckedChanged += new System.EventHandler(this.radio_avgBitrate_CheckedChanged);
//
// radio_targetFilesize
//
this.radio_targetFilesize.AutoSize = true;
+ this.radio_targetFilesize.BackColor = System.Drawing.Color.Transparent;
this.radio_targetFilesize.Location = new System.Drawing.Point(336, 37);
this.radio_targetFilesize.Name = "radio_targetFilesize";
this.radio_targetFilesize.Size = new System.Drawing.Size(126, 17);
this.radio_targetFilesize.TabIndex = 16;
this.radio_targetFilesize.Text = "Target Size (MB):";
- this.radio_targetFilesize.UseVisualStyleBackColor = true;
+ this.radio_targetFilesize.UseVisualStyleBackColor = false;
this.radio_targetFilesize.CheckedChanged += new System.EventHandler(this.radio_targetFilesize_CheckedChanged);
//
// label25
@@ -1370,10 +1375,12 @@ namespace Handbrake
// StatusStrip
//
this.StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.lbl_encode});
+ this.lbl_encode,
+ this.lbl_updateCheck});
this.StatusStrip.Location = new System.Drawing.Point(0, 599);
this.StatusStrip.Name = "StatusStrip";
this.StatusStrip.Size = new System.Drawing.Size(1000, 22);
+ this.StatusStrip.SizingGrip = false;
this.StatusStrip.TabIndex = 7;
this.StatusStrip.Text = "statusStrip1";
//
@@ -1434,6 +1441,16 @@ namespace Handbrake
this.groupBox_output.TabIndex = 47;
this.groupBox_output.Text = "Output Settings: (Preset: None)";
//
+ // lbl_updateCheck
+ //
+ this.lbl_updateCheck.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_updateCheck.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
+ this.lbl_updateCheck.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_updateCheck.Name = "lbl_updateCheck";
+ this.lbl_updateCheck.Size = new System.Drawing.Size(139, 17);
+ this.lbl_updateCheck.Text = "Checking for Updates ...";
+ this.lbl_updateCheck.Visible = false;
+ //
// PictureSettings
//
this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
@@ -1468,6 +1485,7 @@ namespace Handbrake
//
// x264Panel
//
+ this.x264Panel.BackColor = System.Drawing.Color.Transparent;
this.x264Panel.Location = new System.Drawing.Point(0, 0);
this.x264Panel.Name = "x264Panel";
this.x264Panel.Size = new System.Drawing.Size(720, 306);
@@ -1509,7 +1527,9 @@ namespace Handbrake
this.Controls.Add(this.frmMainMenu);
this.Controls.Add(this.StatusStrip);
this.DoubleBuffered = true;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MaximizeBox = false;
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "HandBrake";
@@ -1668,6 +1688,7 @@ namespace Handbrake
internal Label lbl_source;
private Label label4;
internal Label groupBox_output;
+ private ToolStripStatusLabel lbl_updateCheck;
}
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index cf919abc4..5da52c61d 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -36,7 +36,6 @@ namespace Handbrake
// Delegates **********************************************************
private delegate void UpdateWindowHandler();
- private delegate void UpdateStatusChanger();
// Applicaiton Startup ************************************************
@@ -72,8 +71,7 @@ namespace Handbrake
lblStatus.Text = "Checking for updates ...";
Application.DoEvents();
- Thread updateCheckThread = new Thread(startupUpdateCheck);
- updateCheckThread.Start();
+ Main.BeginCheckForUpdates(new AsyncCallback(UpdateCheckDone), false);
}
}
@@ -131,29 +129,34 @@ namespace Handbrake
queueRecovery();
}
- // Startup Functions
- private void startupUpdateCheck()
+ private void UpdateCheckDone(IAsyncResult result)
{
+ if (InvokeRequired)
+ {
+ Invoke(new MethodInvoker(() => UpdateCheckDone(result)));
+ return;
+ }
+
+ UpdateCheckInformation info;
+
try
{
- if (InvokeRequired)
- {
- BeginInvoke(new UpdateStatusChanger(startupUpdateCheck));
- return;
- }
+ info = Main.EndCheckForUpdates(result);
- Boolean update = Main.updateCheck(false);
- if (update)
+ if (info.NewVersionAvailable)
{
- frmUpdater updateWindow = new frmUpdater();
- updateWindow.Show();
+ frmUpdater updateWindow = new frmUpdater(info.BuildInformation);
+ updateWindow.ShowDialog();
}
}
- catch (Exception exc)
+ catch (Exception ex)
{
- MessageBox.Show(splash, "Unable to perform update check. If this problem persists, you can turn of update checking in the program options. \nError Information: \n\n" + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ if ((bool)result.AsyncState)
+ MessageBox.Show("Unable to check for updates, Please try again later. \n" + ex, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
+
+ // Startup Functions
private void queueRecovery()
{
if (Main.check_queue_recovery())
@@ -393,19 +396,46 @@ namespace Handbrake
}
private void mnu_UpdateCheck_Click(object sender, EventArgs e)
{
- Boolean update = Main.updateCheck(true);
- if (update)
+ Main.BeginCheckForUpdates(new AsyncCallback(updateCheckDoneMenu), false);
+ }
+ private void updateCheckDoneMenu(IAsyncResult result)
+ {
+ // Make sure it's running on the calling thread
+ if (InvokeRequired)
{
- frmUpdater updateWindow = new frmUpdater();
- updateWindow.Show();
+ Invoke(new MethodInvoker(() => updateCheckDoneMenu(result)));
+ return;
+ }
+
+ UpdateCheckInformation info;
+
+ try
+ {
+ // Get the information about the new build, if any, and close the window
+ info = Main.EndCheckForUpdates(result);
+ lbl_updateCheck.Visible = true;
+ if (info.NewVersionAvailable && info.BuildInformation != null)
+ {
+ frmUpdater updateWindow = new frmUpdater(info.BuildInformation);
+ updateWindow.ShowDialog();
+ }
+ else
+ MessageBox.Show("There are no new updates at this time.", "Update Check", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ lbl_updateCheck.Visible = false;
+ return;
+ }
+ catch (Exception ex)
+ {
+ if ((bool)result.AsyncState)
+ MessageBox.Show("Unable to check for updates, Please try again later. \n" + ex, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
- else
- MessageBox.Show("There are no new updates at this time.", "Update Check", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void mnu_about_Click(object sender, EventArgs e)
{
- Form About = new frmAbout();
- About.ShowDialog();
+ using (frmAbout About = new frmAbout())
+ {
+ About.ShowDialog();
+ }
}
#endregion
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx
index 400badbaa..ffd42bef2 100644
--- a/win/C#/frmMain.resx
+++ b/win/C#/frmMain.resx
@@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="notifyIconMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>977, 15</value>
+ <value>17, 54</value>
</metadata>
<metadata name="notifyIconMenu.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
@@ -157,10 +157,10 @@ Note: Do not change any of the chapter numbers!</value>
<value>106, 15</value>
</metadata>
<metadata name="AudioMenuRowHeightHack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>123, 52</value>
+ <value>392, 54</value>
</metadata>
<metadata name="presets_menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>1224, 15</value>
+ <value>265, 54</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>767, 15</value>
@@ -566,10 +566,10 @@ Note: Do not change any of the chapter numbers!</value>
</value>
</data>
<metadata name="StatusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>1113, 15</value>
+ <value>155, 54</value>
</metadata>
<metadata name="hbproc.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>308, 52</value>
+ <value>595, 54</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>98</value>
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 13c0e1f3e..c7b280ef3 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -22,21 +22,21 @@ namespace Handbrake
InitializeComponent();
this.queue = q;
- queue.OnEncodeStart += new EventHandler(queue_OnEncodeStart);
- queue.OnQueueFinished += new EventHandler(queue_OnQueueFinished);
- queue.OnPaused += new EventHandler(queue_OnPaused);
+ queue.OnEncodeStart += new EventHandler(queueOnEncodeStart);
+ queue.OnQueueFinished += new EventHandler(queueOnQueueFinished);
+ queue.OnPaused += new EventHandler(queueOnPaused);
}
- void queue_OnPaused(object sender, EventArgs e)
+ void queueOnPaused(object sender, EventArgs e)
{
setUIEncodeFinished();
updateUIElements();
}
- void queue_OnQueueFinished(object sender, EventArgs e)
+ void queueOnQueueFinished(object sender, EventArgs e)
{
setUIEncodeFinished();
resetQueue(); // Reset the Queue Window
}
- void queue_OnEncodeStart(object sender, EventArgs e)
+ void queueOnEncodeStart(object sender, EventArgs e)
{
setUIEncodeStarted(); // make sure the UI is set correctly
setCurrentEncodeInformation();
@@ -56,7 +56,7 @@ namespace Handbrake
/// </summary>
public new void Show()
{
- Show(true);
+ Show(true);
}
/// <summary>
@@ -67,7 +67,8 @@ namespace Handbrake
{
if (doSetQueue) setQueue();
base.Show();
- Activate();
+
+ //Activate();
}
// Start and Stop Controls
diff --git a/win/C#/frmUpdater.cs b/win/C#/frmUpdater.cs
index 97a5c9a64..789a620fc 100644
--- a/win/C#/frmUpdater.cs
+++ b/win/C#/frmUpdater.cs
@@ -12,12 +12,12 @@ namespace Handbrake
{
public partial class frmUpdater : Form
{
- AppcastReader appcast = new AppcastReader();
- public frmUpdater()
+ AppcastReader appcast;
+ public frmUpdater(AppcastReader reader)
{
InitializeComponent();
- appcast.getInfo(); // Initializes the appcast
+ appcast = reader;
getRss();
setVersions();
}
@@ -37,7 +37,7 @@ namespace Handbrake
private void btn_installUpdate_Click(object sender, EventArgs e)
{
frmDownload download = new frmDownload(appcast.downloadFile);
- download.Show();
+ download.ShowDialog();
this.Close();
}