summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-04-17 13:44:35 +0000
committersr55 <[email protected]>2010-04-17 13:44:35 +0000
commitf2826248fce3d14896de6a02e5f59c9ecc69d1f8 (patch)
tree60648fb7932324d400b8c2d74490183e515cc6af
parent39c24561af3b8dd56ad689567af834faf2a6a3da (diff)
WinGui:
- More stylecop warnings cleaned up git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3235 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Controls/AudioPanel.Designer.cs6
-rw-r--r--win/C#/Controls/Filters.cs6
-rw-r--r--win/C#/Controls/Subtitles.cs6
-rw-r--r--win/C#/Parsing/AudioTrack.cs142
-rw-r--r--win/C#/Parsing/Chapter.cs64
-rw-r--r--win/C#/Parsing/DVD.cs14
-rw-r--r--win/C#/Parsing/Parser.cs1
-rw-r--r--win/C#/Parsing/Title.cs21
-rw-r--r--win/C#/Presets/PlistPresetHandler.cs7
-rw-r--r--win/C#/Properties/AssemblyInfo.cs7
-rw-r--r--win/C#/frmAbout.Designer.cs6
-rw-r--r--win/C#/frmAbout.cs6
-rw-r--r--win/C#/frmActivityWindow.Designer.cs6
-rw-r--r--win/C#/frmAddPreset.Designer.cs10
-rw-r--r--win/C#/frmAddPreset.cs71
-rw-r--r--win/C#/frmDownload.Designer.cs6
-rw-r--r--win/C#/frmDownload.cs6
-rw-r--r--win/C#/frmMain.Designer.cs7
-rw-r--r--win/C#/frmMain.cs7
-rw-r--r--win/C#/frmOptions.Designer.cs7
-rw-r--r--win/C#/frmOptions.cs7
-rw-r--r--win/C#/frmQueue.Designer.cs35
-rw-r--r--win/C#/frmQueue.cs301
-rw-r--r--win/C#/frmSplashScreen.Designer.cs7
-rw-r--r--win/C#/frmSplashScreen.cs13
-rw-r--r--win/C#/frmUpdater.Designer.cs13
-rw-r--r--win/C#/frmUpdater.cs70
27 files changed, 602 insertions, 250 deletions
diff --git a/win/C#/Controls/AudioPanel.Designer.cs b/win/C#/Controls/AudioPanel.Designer.cs
index 04bcbd2a8..42d3858a9 100644
--- a/win/C#/Controls/AudioPanel.Designer.cs
+++ b/win/C#/Controls/AudioPanel.Designer.cs
@@ -1,8 +1,8 @@
/* AudioPanel.Designer.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake.Controls
{
diff --git a/win/C#/Controls/Filters.cs b/win/C#/Controls/Filters.cs
index 47657b57e..c8427bb98 100644
--- a/win/C#/Controls/Filters.cs
+++ b/win/C#/Controls/Filters.cs
@@ -1,8 +1,8 @@
/* Filters.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake.Controls
{
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs
index af4f5d89c..c511133ae 100644
--- a/win/C#/Controls/Subtitles.cs
+++ b/win/C#/Controls/Subtitles.cs
@@ -1,8 +1,8 @@
/* Subtitles.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake.Controls
{
diff --git a/win/C#/Parsing/AudioTrack.cs b/win/C#/Parsing/AudioTrack.cs
index a28e01737..544eecf6c 100644
--- a/win/C#/Parsing/AudioTrack.cs
+++ b/win/C#/Parsing/AudioTrack.cs
@@ -1,12 +1,10 @@
/* AudioTrack.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake.Parsing
{
- using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
@@ -16,87 +14,114 @@ namespace Handbrake.Parsing
/// </summary>
public class AudioTrack
{
- private int m_bitrate;
- private string m_format;
- private int m_frequency;
- private string m_language;
- private string m_subFormat;
- private int m_trackNumber;
- private string m_iso639_2;
+ /// <summary>
+ /// The Track bitrate
+ /// </summary>
+ private int bitrate;
+
+ /// <summary>
+ /// The track format
+ /// </summary>
+ private string format;
+
+ /// <summary>
+ /// The Frequency
+ /// </summary>
+ private int frequency;
+
+ /// <summary>
+ /// Track Language
+ /// </summary>
+ private string language;
+
+ /// <summary>
+ /// Sub Format
+ /// </summary>
+ private string subFormat;
+
+ /// <summary>
+ /// Track Number
+ /// </summary>
+ private int trackNumber;
+
+ /// <summary>
+ /// The ISO639_2 code
+ /// </summary>
+ private string iso639_2;
/// <summary>
- /// The track number of this Audio Track
+ /// Gets The track number of this Audio Track
/// </summary>
public int TrackNumber
{
- get { return m_trackNumber; }
+ get { return trackNumber; }
}
/// <summary>
- /// The language (if detected) of this Audio Track
+ /// Gets The language (if detected) of this Audio Track
/// </summary>
public string Language
{
- get { return m_language; }
+ get { return language; }
}
/// <summary>
- /// The primary format of this Audio Track
+ /// Gets The primary format of this Audio Track
/// </summary>
public string Format
{
- get { return m_format; }
+ get { return format; }
}
/// <summary>
- /// Additional format info for this Audio Track
+ /// Gets Additional format info for this Audio Track
/// </summary>
public string SubFormat
{
- get { return m_subFormat; }
+ get { return subFormat; }
}
/// <summary>
- /// The frequency (in MHz) of this Audio Track
+ /// Gets The frequency (in MHz) of this Audio Track
/// </summary>
public int Frequency
{
- get { return m_frequency; }
+ get { return frequency; }
}
/// <summary>
- /// The bitrate (in kbps) of this Audio Track
+ /// Gets The bitrate (in kbps) of this Audio Track
/// </summary>
public int Bitrate
{
- get { return m_bitrate; }
+ get { return bitrate; }
}
+ /// <summary>
+ /// Gets ISO639_2.
+ /// </summary>
public string ISO639_2
{
- get { return m_iso639_2; }
+ get { return iso639_2; }
}
/// <summary>
- /// Override of the ToString method to make this object easier to use in the UI
+ /// Parse the CLI input to an Audio Track object
/// </summary>
- /// <returns>A string formatted as: {track #} {language} ({format}) ({sub-format})</returns>
- public override string ToString()
- {
- if (m_subFormat == null)
- return string.Format("{0} {1} ({2})", m_trackNumber, m_language, m_format);
-
- return string.Format("{0} {1} ({2}) ({3})", m_trackNumber, m_language, m_format, m_subFormat);
- }
-
+ /// <param name="output">
+ /// The output.
+ /// </param>
+ /// <returns>
+ /// An Audio Track obkect
+ /// </returns>
public static AudioTrack Parse(StringReader output)
{
- string audio_track = output.ReadLine();
- Match m = Regex.Match(audio_track, @"^ \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\) \((.*)\)");
- Match track = Regex.Match(audio_track, @"^ \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\)"); // ID and Language
- Match iso639_2 = Regex.Match(audio_track, @"iso639-2: ([a-zA-Z]*)\)");
- Match samplerate = Regex.Match(audio_track, @"([0-9]*)Hz");
- Match bitrate = Regex.Match(audio_track, @"([0-9]*)bps");
+ string audioTrack = output.ReadLine();
+ Match m = Regex.Match(audioTrack, @"^ \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\) \((.*)\)");
+ Match track = Regex.Match(audioTrack, @"^ \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\)"); // ID and Language
+ Match iso639_2 = Regex.Match(audioTrack, @"iso639-2: ([a-zA-Z]*)\)");
+ Match samplerate = Regex.Match(audioTrack, @"([0-9]*)Hz");
+ Match bitrate = Regex.Match(audioTrack, @"([0-9]*)bps");
string subformat = m.Groups[4].Value.Trim().Contains("iso639") ? null : m.Groups[4].Value;
string samplerateVal = samplerate.Success ? samplerate.Groups[0].Value.Replace("Hz", string.Empty).Trim() : "0";
@@ -106,13 +131,13 @@ namespace Handbrake.Parsing
{
var thisTrack = new AudioTrack
{
- m_trackNumber = int.Parse(track.Groups[1].Value.Trim()),
- m_language = track.Groups[2].Value,
- m_format = m.Groups[3].Value,
- m_subFormat = subformat,
- m_frequency = int.Parse(samplerateVal),
- m_bitrate = int.Parse(bitrateVal),
- m_iso639_2 =
+ trackNumber = int.Parse(track.Groups[1].Value.Trim()),
+ language = track.Groups[2].Value,
+ format = m.Groups[3].Value,
+ subFormat = subformat,
+ frequency = int.Parse(samplerateVal),
+ bitrate = int.Parse(bitrateVal),
+ iso639_2 =
iso639_2.Value.Replace("iso639-2: ", string.Empty).Replace(")", string.Empty)
};
return thisTrack;
@@ -121,6 +146,15 @@ namespace Handbrake.Parsing
return null;
}
+ /// <summary>
+ /// Pase a list of audio tracks
+ /// </summary>
+ /// <param name="output">
+ /// The output.
+ /// </param>
+ /// <returns>
+ /// An array of audio tracks
+ /// </returns>
public static AudioTrack[] ParseList(StringReader output)
{
var tracks = new List<AudioTrack>();
@@ -134,5 +168,17 @@ namespace Handbrake.Parsing
}
return tracks.ToArray();
}
+
+ /// <summary>
+ /// Override of the ToString method to make this object easier to use in the UI
+ /// </summary>
+ /// <returns>A string formatted as: {track #} {language} ({format}) ({sub-format})</returns>
+ public override string ToString()
+ {
+ if (subFormat == null)
+ return string.Format("{0} {1} ({2})", trackNumber, language, format);
+
+ return string.Format("{0} {1} ({2}) ({3})", trackNumber, language, format, subFormat);
+ }
}
} \ No newline at end of file
diff --git a/win/C#/Parsing/Chapter.cs b/win/C#/Parsing/Chapter.cs
index 31d57aa26..01aced03a 100644
--- a/win/C#/Parsing/Chapter.cs
+++ b/win/C#/Parsing/Chapter.cs
@@ -1,8 +1,7 @@
/* Chapter.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake.Parsing
{
@@ -16,51 +15,67 @@ namespace Handbrake.Parsing
/// </summary>
public class Chapter
{
- private int m_chapterNumber;
+ /// <summary>
+ /// Chapter Number
+ /// </summary>
+ private int chapterNumber;
- private TimeSpan m_duration;
+ /// <summary>
+ /// The Duration of the chapter
+ /// </summary>
+ private TimeSpan duration;
/// <summary>
- /// The number of this Chapter, in regards to it's parent Title
+ /// Gets The number of this Chapter, in regards to it's parent Title
/// </summary>
public int ChapterNumber
{
- get { return m_chapterNumber; }
+ get { return chapterNumber; }
}
/// <summary>
- /// The length in time this Chapter spans
+ /// Gets The length in time this Chapter spans
/// </summary>
public TimeSpan Duration
{
- get { return m_duration; }
+ get { return duration; }
}
/// <summary>
- /// Override of the ToString method to make this object easier to use in the UI
+ /// Parse a CLI string to a Chapter object
/// </summary>
- /// <returns>A string formatted as: {chapter #}</returns>
- public override string ToString()
- {
- return m_chapterNumber.ToString();
- }
-
+ /// <param name="output">
+ /// The output.
+ /// </param>
+ /// <returns>
+ /// A chapter Object
+ /// </returns>
public static Chapter Parse(StringReader output)
{
- Match m = Regex.Match(output.ReadLine(),
+ Match m = Regex.Match(
+ output.ReadLine(),
@"^ \+ ([0-9]*): cells ([0-9]*)->([0-9]*), ([0-9]*) blocks, duration ([0-9]{2}:[0-9]{2}:[0-9]{2})");
if (m.Success)
{
var thisChapter = new Chapter
{
- m_chapterNumber = int.Parse(m.Groups[1].Value.Trim()),
- m_duration = TimeSpan.Parse(m.Groups[5].Value)
+ chapterNumber = int.Parse(m.Groups[1].Value.Trim()),
+ duration = TimeSpan.Parse(m.Groups[5].Value)
};
return thisChapter;
}
return null;
}
+ /// <summary>
+ /// Prase a list of strings / chatpers
+ /// </summary>
+ /// <param name="output">
+ /// The output.
+ /// </param>
+ /// <returns>
+ /// An array of chapter objects
+ /// </returns>
public static Chapter[] ParseList(StringReader output)
{
var chapters = new List<Chapter>();
@@ -81,5 +96,14 @@ namespace Handbrake.Parsing
}
return chapters.ToArray();
}
+
+ /// <summary>
+ /// Override of the ToString method to make this object easier to use in the UI
+ /// </summary>
+ /// <returns>A string formatted as: {chapter #}</returns>
+ public override string ToString()
+ {
+ return chapterNumber.ToString();
+ }
}
} \ No newline at end of file
diff --git a/win/C#/Parsing/DVD.cs b/win/C#/Parsing/DVD.cs
index 348da3190..336ff6d94 100644
--- a/win/C#/Parsing/DVD.cs
+++ b/win/C#/Parsing/DVD.cs
@@ -1,8 +1,8 @@
/* DVD.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake.Parsing
{
@@ -14,7 +14,7 @@ namespace Handbrake.Parsing
/// </summary>
public class DVD
{
- private readonly List<Title> m_titles;
+ private readonly List<Title> titles;
/// <summary>
/// Initializes a new instance of the <see cref="DVD"/> class.
@@ -22,7 +22,7 @@ namespace Handbrake.Parsing
/// </summary>
public DVD()
{
- m_titles = new List<Title>();
+ titles = new List<Title>();
}
/// <summary>
@@ -30,7 +30,7 @@ namespace Handbrake.Parsing
/// </summary>
public List<Title> Titles
{
- get { return m_titles; }
+ get { return titles; }
}
public static DVD Parse(StreamReader output)
@@ -40,7 +40,7 @@ namespace Handbrake.Parsing
while (!output.EndOfStream)
{
if ((char) output.Peek() == '+')
- thisDVD.m_titles.AddRange(Title.ParseList(output.ReadToEnd()));
+ thisDVD.titles.AddRange(Title.ParseList(output.ReadToEnd()));
else
output.ReadLine();
}
diff --git a/win/C#/Parsing/Parser.cs b/win/C#/Parsing/Parser.cs
index 3dd2fdeb4..72a4695bb 100644
--- a/win/C#/Parsing/Parser.cs
+++ b/win/C#/Parsing/Parser.cs
@@ -38,7 +38,6 @@ namespace Handbrake.Parsing
/// <param name="timeRemaining">The estimated time remaining for this task to complete</param>
public delegate void EncodeProgressEventHandler(object sender, int currentTask, int taskCount, float percentComplete, float currentFps, float averageFps, TimeSpan timeRemaining);
-
/// <summary>
/// A simple wrapper around a StreamReader to keep track of the entire output from a cli process
/// </summary>
diff --git a/win/C#/Parsing/Title.cs b/win/C#/Parsing/Title.cs
index 0494f5be5..c4b8cc14f 100644
--- a/win/C#/Parsing/Title.cs
+++ b/win/C#/Parsing/Title.cs
@@ -118,7 +118,7 @@ namespace Handbrake.Parsing
}
/// <summary>
- /// The track number of this Title
+ /// Gets The track number of this Title
/// </summary>
public int TitleNumber
{
@@ -186,7 +186,6 @@ namespace Handbrake.Parsing
get { return angles; }
}
-
/// <summary>
/// Gets the FPS of the source.
/// </summary>
@@ -196,15 +195,6 @@ namespace Handbrake.Parsing
}
/// <summary>
- /// Override of the ToString method to provide an easy way to use this object in the UI
- /// </summary>
- /// <returns>A string representing this track in the format: {title #} (00:00:00)</returns>
- public override string ToString()
- {
- return string.Format("{0} ({1:00}:{2:00}:{3:00})", titleNumber, duration.Hours, duration.Minutes, duration.Seconds);
- }
-
- /// <summary>
/// Parse the Title Information
/// </summary>
/// <param name="output">A stingreader of output data</param>
@@ -293,5 +283,14 @@ namespace Handbrake.Parsing
return titles.ToArray();
}
+
+ /// <summary>
+ /// Override of the ToString method to provide an easy way to use this object in the UI
+ /// </summary>
+ /// <returns>A string representing this track in the format: {title #} (00:00:00)</returns>
+ public override string ToString()
+ {
+ return string.Format("{0} ({1:00}:{2:00}:{3:00})", titleNumber, duration.Hours, duration.Minutes, duration.Seconds);
+ }
}
} \ No newline at end of file
diff --git a/win/C#/Presets/PlistPresetHandler.cs b/win/C#/Presets/PlistPresetHandler.cs
index 142662fd8..53b0d8c91 100644
--- a/win/C#/Presets/PlistPresetHandler.cs
+++ b/win/C#/Presets/PlistPresetHandler.cs
@@ -1,8 +1,7 @@
/* PlistPresetHandler.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake.Presets
{
diff --git a/win/C#/Properties/AssemblyInfo.cs b/win/C#/Properties/AssemblyInfo.cs
index 421c1cc1d..0068ddd25 100644
--- a/win/C#/Properties/AssemblyInfo.cs
+++ b/win/C#/Properties/AssemblyInfo.cs
@@ -1,8 +1,7 @@
/* AssemblyInfo.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
using System.Reflection;
using System.Resources;
diff --git a/win/C#/frmAbout.Designer.cs b/win/C#/frmAbout.Designer.cs
index 05cdaeb11..2c2fc3f73 100644
--- a/win/C#/frmAbout.Designer.cs
+++ b/win/C#/frmAbout.Designer.cs
@@ -1,8 +1,8 @@
/* frmAbout.Designer.cs
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
diff --git a/win/C#/frmAbout.cs b/win/C#/frmAbout.cs
index cae109d72..d5576210d 100644
--- a/win/C#/frmAbout.cs
+++ b/win/C#/frmAbout.cs
@@ -1,8 +1,8 @@
/* frmAbout.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
diff --git a/win/C#/frmActivityWindow.Designer.cs b/win/C#/frmActivityWindow.Designer.cs
index 4d2d081b0..536a13115 100644
--- a/win/C#/frmActivityWindow.Designer.cs
+++ b/win/C#/frmActivityWindow.Designer.cs
@@ -1,8 +1,8 @@
/* frmDvdInfo.Designer.cs
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
diff --git a/win/C#/frmAddPreset.Designer.cs b/win/C#/frmAddPreset.Designer.cs
index 83783908a..348c430b9 100644
--- a/win/C#/frmAddPreset.Designer.cs
+++ b/win/C#/frmAddPreset.Designer.cs
@@ -1,8 +1,8 @@
/* AudioTrack.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
@@ -79,7 +79,7 @@ namespace Handbrake
this.btn_add.TabIndex = 2;
this.btn_add.Text = "Add";
this.btn_add.UseVisualStyleBackColor = false;
- this.btn_add.Click += new System.EventHandler(this.btn_add_Click);
+ this.btn_add.Click += new System.EventHandler(this.BtnAddClick);
//
// btn_cancel
//
@@ -93,7 +93,7 @@ namespace Handbrake
this.btn_cancel.TabIndex = 3;
this.btn_cancel.Text = "Cancel";
this.btn_cancel.UseVisualStyleBackColor = false;
- this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);
+ this.btn_cancel.Click += new System.EventHandler(this.BtnCancelClick);
//
// check_pictureSettings
//
diff --git a/win/C#/frmAddPreset.cs b/win/C#/frmAddPreset.cs
index 30537f9e1..a04b07428 100644
--- a/win/C#/frmAddPreset.cs
+++ b/win/C#/frmAddPreset.cs
@@ -1,8 +1,7 @@
/* frmAddPreset.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
@@ -11,26 +10,61 @@ namespace Handbrake
using System.Windows.Forms;
using Presets;
+ /// <summary>
+ /// The Add Preset Window
+ /// </summary>
public partial class frmAddPreset : Form
{
- private readonly frmMain _frmMainWindow;
- private readonly PresetsHandler _presetCode;
- private readonly string _query = string.Empty;
+ /// <summary>
+ /// The Main Window
+ /// </summary>
+ private readonly frmMain mainWindow;
+ /// <summary>
+ /// The Preset Handler
+ /// </summary>
+ private readonly PresetsHandler presetCode;
+
+ /// <summary>
+ /// The CLI Query
+ /// </summary>
+ private readonly string query = string.Empty;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="frmAddPreset"/> class.
+ /// </summary>
+ /// <param name="fmw">
+ /// The fmw.
+ /// </param>
+ /// <param name="queryString">
+ /// The query string.
+ /// </param>
+ /// <param name="presetHandler">
+ /// The preset handler.
+ /// </param>
public frmAddPreset(frmMain fmw, string queryString, PresetsHandler presetHandler)
{
InitializeComponent();
- _frmMainWindow = fmw;
- _presetCode = presetHandler;
- this._query = queryString;
+ mainWindow = fmw;
+ presetCode = presetHandler;
+ this.query = queryString;
}
- private void btn_add_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Add button event.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void BtnAddClick(object sender, EventArgs e)
{
- if (_presetCode.Add(txt_preset_name.Text.Trim(), _query, check_pictureSettings.Checked))
+ if (presetCode.Add(txt_preset_name.Text.Trim(), query, check_pictureSettings.Checked))
{
TreeNode presetTreeview = new TreeNode(txt_preset_name.Text.Trim()) {ForeColor = Color.Black};
- _frmMainWindow.treeView_presets.Nodes.Add(presetTreeview);
+ mainWindow.treeView_presets.Nodes.Add(presetTreeview);
this.Close();
}
else
@@ -38,7 +72,16 @@ namespace Handbrake
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- private void btn_cancel_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Cancel button event
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void BtnCancelClick(object sender, EventArgs e)
{
this.Close();
}
diff --git a/win/C#/frmDownload.Designer.cs b/win/C#/frmDownload.Designer.cs
index d48172bfd..9fd186f82 100644
--- a/win/C#/frmDownload.Designer.cs
+++ b/win/C#/frmDownload.Designer.cs
@@ -1,8 +1,8 @@
/* frmDownload.Designer.cs
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
diff --git a/win/C#/frmDownload.cs b/win/C#/frmDownload.cs
index 17ce3ec48..fb2b8ab06 100644
--- a/win/C#/frmDownload.cs
+++ b/win/C#/frmDownload.cs
@@ -1,8 +1,8 @@
/* frmDownload.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 445498c07..da7d433cd 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -1,8 +1,7 @@
/* frmMain.Designer.cs
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
using System;
using System.Windows.Forms;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index a369543a1..42f0cd4ee 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -1,8 +1,7 @@
/* frmMain.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs
index 86bdc09ff..1f227867c 100644
--- a/win/C#/frmOptions.Designer.cs
+++ b/win/C#/frmOptions.Designer.cs
@@ -1,8 +1,7 @@
/* frmOptions.Designer.cs
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs
index b5b742963..1a25c9f9d 100644
--- a/win/C#/frmOptions.cs
+++ b/win/C#/frmOptions.cs
@@ -1,8 +1,7 @@
/* frmOptions.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
diff --git a/win/C#/frmQueue.Designer.cs b/win/C#/frmQueue.Designer.cs
index bff81f0af..73d3146bc 100644
--- a/win/C#/frmQueue.Designer.cs
+++ b/win/C#/frmQueue.Designer.cs
@@ -1,8 +1,7 @@
/* frmQueue.Designer.cs
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
@@ -106,7 +105,7 @@ namespace Handbrake
this.btn_down.Text = "Down";
this.toolTip1.SetToolTip(this.btn_down, "Move the selected item down 1 place in the queue");
this.btn_down.UseVisualStyleBackColor = true;
- this.btn_down.Click += new System.EventHandler(this.btn_down_Click);
+ this.btn_down.Click += new System.EventHandler(this.BtnDownClick);
//
// btn_up
//
@@ -124,7 +123,7 @@ namespace Handbrake
this.btn_up.Text = "Up";
this.toolTip1.SetToolTip(this.btn_up, "Move the selected item up 1 place in the queue.");
this.btn_up.UseVisualStyleBackColor = true;
- this.btn_up.Click += new System.EventHandler(this.btn_up_Click);
+ this.btn_up.Click += new System.EventHandler(this.BtnUpClick);
//
// btn_delete
//
@@ -142,7 +141,7 @@ namespace Handbrake
this.btn_delete.Text = "Delete";
this.toolTip1.SetToolTip(this.btn_delete, "Remove the selected item from the queue");
this.btn_delete.UseVisualStyleBackColor = true;
- this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click);
+ this.btn_delete.Click += new System.EventHandler(this.BtnDeleteClick);
//
// label4
//
@@ -257,7 +256,7 @@ namespace Handbrake
this.btn_encode.Name = "btn_encode";
this.btn_encode.Size = new System.Drawing.Size(82, 36);
this.btn_encode.Text = "Encode";
- this.btn_encode.Click += new System.EventHandler(this.btn_encode_Click);
+ this.btn_encode.Click += new System.EventHandler(this.BtnEncodeClick);
//
// btn_pause
//
@@ -269,7 +268,7 @@ namespace Handbrake
this.btn_pause.Size = new System.Drawing.Size(74, 36);
this.btn_pause.Text = "Pause";
this.btn_pause.Visible = false;
- this.btn_pause.Click += new System.EventHandler(this.btn_pause_Click);
+ this.btn_pause.Click += new System.EventHandler(this.BtnPauseClick);
//
// toolStripSeparator1
//
@@ -298,7 +297,7 @@ namespace Handbrake
this.mnu_batch.Name = "mnu_batch";
this.mnu_batch.Size = new System.Drawing.Size(238, 22);
this.mnu_batch.Text = "Generate Batch Script";
- this.mnu_batch.Click += new System.EventHandler(this.mnu_batch_Click);
+ this.mnu_batch.Click += new System.EventHandler(this.MnuBatchClick);
//
// mnu_import
//
@@ -306,7 +305,7 @@ namespace Handbrake
this.mnu_import.Name = "mnu_import";
this.mnu_import.Size = new System.Drawing.Size(238, 22);
this.mnu_import.Text = "Import Queue";
- this.mnu_import.Click += new System.EventHandler(this.mnu_import_Click);
+ this.mnu_import.Click += new System.EventHandler(this.MnuImportClick);
//
// mnu_export
//
@@ -314,7 +313,7 @@ namespace Handbrake
this.mnu_export.Name = "mnu_export";
this.mnu_export.Size = new System.Drawing.Size(238, 22);
this.mnu_export.Text = "Export Queue";
- this.mnu_export.Click += new System.EventHandler(this.mnu_export_Click);
+ this.mnu_export.Click += new System.EventHandler(this.MnuExportClick);
//
// toolStripSeparator2
//
@@ -329,7 +328,7 @@ namespace Handbrake
this.mnu_readd.Size = new System.Drawing.Size(238, 22);
this.mnu_readd.Text = "Re-Add Currently Running Job";
this.mnu_readd.ToolTipText = "Readds the currently encoding job back onto the queue.";
- this.mnu_readd.Click += new System.EventHandler(this.mnu_readd_Click);
+ this.mnu_readd.Click += new System.EventHandler(this.MnuReaddClick);
//
// mnu_reconfigureJob
//
@@ -338,7 +337,7 @@ namespace Handbrake
this.mnu_reconfigureJob.Text = "Reconfigure Job (Experimental)";
this.mnu_reconfigureJob.ToolTipText = "Removes the job from the queue and sends it back to the main window.\r\nFrom there," +
" you can change settings then re-add it to the queue";
- this.mnu_reconfigureJob.Click += new System.EventHandler(this.mnu_reconfigureJob_Click);
+ this.mnu_reconfigureJob.Click += new System.EventHandler(this.MnuReconfigureJobClick);
//
// SaveFile
//
@@ -365,7 +364,7 @@ namespace Handbrake
this.list_queue.TabIndex = 72;
this.list_queue.UseCompatibleStateImageBehavior = false;
this.list_queue.View = System.Windows.Forms.View.Details;
- this.list_queue.KeyUp += new System.Windows.Forms.KeyEventHandler(this.list_queue_deleteKey);
+ this.list_queue.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ListQueueDeleteKey);
//
// Title
//
@@ -412,14 +411,14 @@ namespace Handbrake
this.mnu_up.Name = "mnu_up";
this.mnu_up.Size = new System.Drawing.Size(138, 22);
this.mnu_up.Text = "Move Up";
- this.mnu_up.Click += new System.EventHandler(this.mnu_up_Click);
+ this.mnu_up.Click += new System.EventHandler(this.MnuUpClick);
//
// mnu_Down
//
this.mnu_Down.Name = "mnu_Down";
this.mnu_Down.Size = new System.Drawing.Size(138, 22);
this.mnu_Down.Text = "Move Down";
- this.mnu_Down.Click += new System.EventHandler(this.mnu_Down_Click);
+ this.mnu_Down.Click += new System.EventHandler(this.MnuDownClick);
//
// toolStripSeparator3
//
@@ -431,7 +430,7 @@ namespace Handbrake
this.mnu_delete.Name = "mnu_delete";
this.mnu_delete.Size = new System.Drawing.Size(138, 22);
this.mnu_delete.Text = "Delete";
- this.mnu_delete.Click += new System.EventHandler(this.mnu_delete_Click);
+ this.mnu_delete.Click += new System.EventHandler(this.MnuDeleteClick);
//
// statusStrip1
//
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 51dafd032..8bb0e1910 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -1,8 +1,7 @@
/* frmQueue.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
@@ -15,13 +14,35 @@ namespace Handbrake
using Model;
using Services;
+ /// <summary>
+ /// The Queue Window
+ /// </summary>
public partial class frmQueue : Form
{
+ /// <summary>
+ /// Update Handler Delegate
+ /// </summary>
private delegate void UpdateHandler();
- private Queue queue;
- private frmMain mainWindow;
+ /// <summary>
+ /// An instance of the Queue service
+ /// </summary>
+ private readonly Queue queue;
+ /// <summary>
+ /// A reference to the main application window
+ /// </summary>
+ private readonly frmMain mainWindow;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="frmQueue"/> class.
+ /// </summary>
+ /// <param name="q">
+ /// An instance of the queue service.
+ /// </param>
+ /// <param name="mw">
+ /// The main window.
+ /// </param>
public frmQueue(Queue q, frmMain mw)
{
InitializeComponent();
@@ -34,23 +55,50 @@ namespace Handbrake
queue.QueuePauseRequested += new EventHandler(QueueOnPaused);
}
+ /// <summary>
+ /// Handle the Queue Paused event
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The EventArgs.
+ /// </param>
private void QueueOnPaused(object sender, EventArgs e)
{
- SetUIEncodeFinished();
- UpdateUIElements();
+ SetUiEncodeFinished();
+ UpdateUiElements();
}
+ /// <summary>
+ /// Handle the Queue Finished event.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The EventArgs.
+ /// </param>
private void QueueOnQueueFinished(object sender, EventArgs e)
{
- SetUIEncodeFinished();
+ SetUiEncodeFinished();
ResetQueue(); // Reset the Queue Window
}
+ /// <summary>
+ /// Handle the Encode Started event
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
private void QueueOnEncodeStart(object sender, EventArgs e)
{
- SetUIEncodeStarted(); // make sure the UI is set correctly
+ SetUiEncodeStarted(); // make sure the UI is set correctly
SetCurrentEncodeInformation();
- UpdateUIElements(); // Redraw the Queue, a new encode has started.
+ UpdateUiElements(); // Redraw the Queue, a new encode has started.
}
/// <summary>
@@ -58,7 +106,7 @@ namespace Handbrake
/// </summary>
public void SetQueue()
{
- UpdateUIElements();
+ UpdateUiElements();
}
/// <summary>
@@ -81,12 +129,16 @@ namespace Handbrake
// Activate();
}
- // Start and Stop Controls
- private void btn_encode_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Encode button Click event
+ /// </summary>
+ /// <param name="sender">The sender</param>
+ /// <param name="e">the EventArgs</param>
+ private void BtnEncodeClick(object sender, EventArgs e)
{
if (queue.PauseRequested)
{
- SetUIEncodeStarted();
+ SetUiEncodeStarted();
MessageBox.Show("Encoding restarted", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
@@ -94,40 +146,58 @@ namespace Handbrake
queue.Start();
}
- private void btn_pause_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Pause button click event.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The EventArgs.
+ /// </param>
+ private void BtnPauseClick(object sender, EventArgs e)
{
queue.Pause();
- SetUIEncodeFinished();
+ SetUiEncodeFinished();
ResetQueue();
MessageBox.Show(
- "No further items on the queue will start. The current encode process will continue until it is finished. \nClick 'Encode' when you wish to continue encoding the queue.",
+ "No further items on the queue will start. The current encode process will continue until it is finished. \nClick 'Encode' when you wish to continue encoding the queue.",
"Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
+ // UI Work
- // Window Display Management
- private void SetUIEncodeStarted()
+ /// <summary>
+ /// Setup the UI to show that an encode has started
+ /// </summary>
+ private void SetUiEncodeStarted()
{
if (InvokeRequired)
{
- BeginInvoke(new UpdateHandler(SetUIEncodeStarted));
+ BeginInvoke(new UpdateHandler(SetUiEncodeStarted));
return;
}
btn_encode.Enabled = false;
btn_pause.Visible = true;
}
- private void SetUIEncodeFinished()
+ /// <summary>
+ /// Setup the UI to indicate that an encode has finished.
+ /// </summary>
+ private void SetUiEncodeFinished()
{
if (InvokeRequired)
{
- BeginInvoke(new UpdateHandler(SetUIEncodeFinished));
+ BeginInvoke(new UpdateHandler(SetUiEncodeFinished));
return;
}
btn_pause.Visible = false;
btn_encode.Enabled = true;
}
+ /// <summary>
+ /// Reset the Queue Window display
+ /// </summary>
private void ResetQueue()
{
if (InvokeRequired)
@@ -148,6 +218,9 @@ namespace Handbrake
lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";
}
+ /// <summary>
+ /// Redraw the Queue window with the latest information about HandBrakes status
+ /// </summary>
private void RedrawQueue()
{
if (InvokeRequired)
@@ -158,10 +231,10 @@ namespace Handbrake
list_queue.Items.Clear();
ReadOnlyCollection<Job> theQueue = queue.CurrentQueue;
- foreach (Job queue_item in theQueue)
+ foreach (Job queueItem in theQueue)
{
- string q_item = queue_item.Query;
- QueryParser parsed = Functions.QueryParser.Parse(q_item);
+ string qItem = queueItem.Query;
+ QueryParser parsed = Functions.QueryParser.Parse(qItem);
// Get the DVD Title
string title = parsed.DVDTitle == 0 ? "Auto" : parsed.DVDTitle.ToString();
@@ -180,8 +253,8 @@ namespace Handbrake
ListViewItem item = new ListViewItem();
item.Text = title; // Title
item.SubItems.Add(chapters); // Chapters
- item.SubItems.Add(queue_item.Source); // Source
- item.SubItems.Add(queue_item.Destination); // Destination
+ item.SubItems.Add(queueItem.Source); // Source
+ item.SubItems.Add(queueItem.Destination); // Destination
item.SubItems.Add(parsed.VideoEncoder); // Video
// Display The Audio Track Information
@@ -199,11 +272,14 @@ namespace Handbrake
}
}
- private void UpdateUIElements()
+ /// <summary>
+ /// Update the UI elements
+ /// </summary>
+ private void UpdateUiElements()
{
if (InvokeRequired)
{
- BeginInvoke(new UpdateHandler(UpdateUIElements));
+ BeginInvoke(new UpdateHandler(UpdateUiElements));
return;
}
@@ -211,6 +287,9 @@ namespace Handbrake
lbl_encodesPending.Text = list_queue.Items.Count + " encode(s) pending";
}
+ /// <summary>
+ /// Set the window up with the current encode information
+ /// </summary>
private void SetCurrentEncodeInformation()
{
try
@@ -256,6 +335,9 @@ namespace Handbrake
}
}
+ /// <summary>
+ /// Delete the currently selected items on the queue
+ /// </summary>
private void DeleteSelectedItems()
{
// If there are selected items
@@ -275,7 +357,7 @@ namespace Handbrake
foreach (int selectedIndex in selectedIndices)
queue.Remove(selectedIndex);
- UpdateUIElements();
+ UpdateUiElements();
// Select the item where the first deleted item was previously
if (firstSelectedIndex < list_queue.Items.Count)
@@ -286,42 +368,108 @@ namespace Handbrake
}
// Queue Management
- private void mnu_up_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Move Up Menu Item
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void MnuUpClick(object sender, EventArgs e)
{
MoveUp();
}
- private void mnu_Down_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Move down Menu Item
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void MnuDownClick(object sender, EventArgs e)
{
MoveDown();
}
- private void mnu_delete_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the delete Menu Item
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void MnuDeleteClick(object sender, EventArgs e)
{
DeleteSelectedItems();
}
- private void btn_up_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Button Up Click
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void BtnUpClick(object sender, EventArgs e)
{
MoveUp();
}
- private void btn_down_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the button down click
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void BtnDownClick(object sender, EventArgs e)
{
MoveDown();
}
- private void btn_delete_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the delete button click
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void BtnDeleteClick(object sender, EventArgs e)
{
DeleteSelectedItems();
}
- private void list_queue_deleteKey(object sender, KeyEventArgs e)
+ /// <summary>
+ /// Handle the delete keyboard press
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void ListQueueDeleteKey(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Delete)
DeleteSelectedItems();
}
+ /// <summary>
+ /// Move items up in the queue
+ /// </summary>
private void MoveUp()
{
// If there are selected items and the first item is not selected
@@ -336,7 +484,7 @@ namespace Handbrake
foreach (int selectedIndex in selectedIndices)
queue.MoveUp(selectedIndex);
- UpdateUIElements();
+ UpdateUiElements();
// Keep the selected item(s) selected, now moved up one index
foreach (int selectedIndex in selectedIndices)
@@ -347,6 +495,9 @@ namespace Handbrake
list_queue.Select(); // Activate the control to show the selected items
}
+ /// <summary>
+ /// Move items down in the queue
+ /// </summary>
private void MoveDown()
{
// If there are selected items and the last item is not selected
@@ -365,7 +516,7 @@ namespace Handbrake
foreach (int selectedIndex in selectedIndices)
queue.MoveDown(selectedIndex);
- UpdateUIElements();
+ UpdateUiElements();
// Keep the selected item(s) selected, now moved down one index
foreach (int selectedIndex in selectedIndices)
@@ -377,7 +528,17 @@ namespace Handbrake
}
// Queue Import/Export Features
- private void mnu_batch_Click(object sender, EventArgs e)
+
+ /// <summary>
+ /// Create a batch script
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void MnuBatchClick(object sender, EventArgs e)
{
SaveFile.FileName = string.Empty;
SaveFile.Filter = "Batch|.bat";
@@ -386,7 +547,16 @@ namespace Handbrake
queue.WriteBatchScriptToFile(SaveFile.FileName);
}
- private void mnu_export_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Export Queue
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void MnuExportClick(object sender, EventArgs e)
{
SaveFile.FileName = string.Empty;
SaveFile.Filter = "HandBrake Queue|*.queue";
@@ -395,26 +565,53 @@ namespace Handbrake
queue.WriteQueueStateToFile(SaveFile.FileName);
}
- private void mnu_import_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Import Queue
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void MnuImportClick(object sender, EventArgs e)
{
OpenFile.FileName = string.Empty;
OpenFile.ShowDialog();
if (OpenFile.FileName != String.Empty)
queue.LoadQueueFromFile(OpenFile.FileName);
- UpdateUIElements();
+ UpdateUiElements();
}
- private void mnu_readd_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Readd current job to queue
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void MnuReaddClick(object sender, EventArgs e)
{
if (!queue.LastEncode.IsEmpty)
{
- queue.Add(queue.LastEncode.Query, queue.LastEncode.Source, queue.LastEncode.Destination,
+ queue.Add(queue.LastEncode.Query, queue.LastEncode.Source, queue.LastEncode.Destination,
queue.LastEncode.CustomQuery);
- UpdateUIElements();
+ UpdateUiElements();
}
}
- private void mnu_reconfigureJob_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Edit Job
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void MnuReconfigureJobClick(object sender, EventArgs e)
{
if (list_queue.SelectedIndices != null)
{
@@ -431,8 +628,12 @@ namespace Handbrake
}
}
-
- // Hide's the window when the user tries to "x" out of the window instead of closing it.
+ /// <summary>
+ /// Hide's the window when the user tries to "x" out of the window instead of closing it.
+ /// </summary>
+ /// <param name="e">
+ /// The e.
+ /// </param>
protected override void OnClosing(CancelEventArgs e)
{
e.Cancel = true;
diff --git a/win/C#/frmSplashScreen.Designer.cs b/win/C#/frmSplashScreen.Designer.cs
index b447c382c..f33c176ac 100644
--- a/win/C#/frmSplashScreen.Designer.cs
+++ b/win/C#/frmSplashScreen.Designer.cs
@@ -1,8 +1,7 @@
/* frmSplashScreen.Designer.cs
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
diff --git a/win/C#/frmSplashScreen.cs b/win/C#/frmSplashScreen.cs
index 68441d4d0..e9540e486 100644
--- a/win/C#/frmSplashScreen.cs
+++ b/win/C#/frmSplashScreen.cs
@@ -1,15 +1,20 @@
/* frmSplashScreen.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
using System.Windows.Forms;
+ /// <summary>
+ /// The Splash Screen
+ /// </summary>
public partial class frmSplashScreen : Form
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="frmSplashScreen"/> class.
+ /// </summary>
public frmSplashScreen()
{
InitializeComponent();
diff --git a/win/C#/frmUpdater.Designer.cs b/win/C#/frmUpdater.Designer.cs
index 3e2f8708c..cf8a2b37f 100644
--- a/win/C#/frmUpdater.Designer.cs
+++ b/win/C#/frmUpdater.Designer.cs
@@ -1,8 +1,7 @@
/* frmUpdater.Designer.cs
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
@@ -94,7 +93,7 @@ namespace Handbrake
this.btn_skip.TabIndex = 54;
this.btn_skip.Text = "Skip This Version";
this.btn_skip.UseVisualStyleBackColor = false;
- this.btn_skip.Click += new System.EventHandler(this.btn_skip_Click);
+ this.btn_skip.Click += new System.EventHandler(this.BtnSkipClick);
//
// btn_installUpdate
//
@@ -110,7 +109,7 @@ namespace Handbrake
this.btn_installUpdate.TabIndex = 55;
this.btn_installUpdate.Text = "Install Update";
this.btn_installUpdate.UseVisualStyleBackColor = false;
- this.btn_installUpdate.Click += new System.EventHandler(this.btn_installUpdate_Click);
+ this.btn_installUpdate.Click += new System.EventHandler(this.BtnInstallUpdateClick);
//
// btn_remindLater
//
@@ -126,7 +125,7 @@ namespace Handbrake
this.btn_remindLater.TabIndex = 56;
this.btn_remindLater.Text = "Remind me Later";
this.btn_remindLater.UseVisualStyleBackColor = false;
- this.btn_remindLater.Click += new System.EventHandler(this.btn_remindLater_Click);
+ this.btn_remindLater.Click += new System.EventHandler(this.BtnRemindLaterClick);
//
// label3
//
diff --git a/win/C#/frmUpdater.cs b/win/C#/frmUpdater.cs
index f2e7c02d6..7d56c587e 100644
--- a/win/C#/frmUpdater.cs
+++ b/win/C#/frmUpdater.cs
@@ -1,8 +1,7 @@
/* frmUpdater.cs $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr>.
+ It may be used under the terms of the GNU General Public License. */
namespace Handbrake
{
@@ -10,47 +9,92 @@ namespace Handbrake
using System.Windows.Forms;
using Functions;
+ /// <summary>
+ /// A window to display update information.
+ /// </summary>
public partial class frmUpdater : Form
{
- private readonly AppcastReader Appcast;
+ /// <summary>
+ /// An instance of the Appcast Reader
+ /// </summary>
+ private readonly AppcastReader appcast;
+ /// <summary>
+ /// Initializes a new instance of the <see cref="frmUpdater"/> class.
+ /// </summary>
+ /// <param name="reader">
+ /// The appcast reader.
+ /// </param>
public frmUpdater(AppcastReader reader)
{
InitializeComponent();
- Appcast = reader;
+ appcast = reader;
GetRss();
SetVersions();
}
+ /// <summary>
+ /// Get the RSS feed
+ /// </summary>
private void GetRss()
{
- wBrowser.Url = Appcast.DescriptionUrl;
+ wBrowser.Url = appcast.DescriptionUrl;
}
+ /// <summary>
+ /// Set the versions
+ /// </summary>
private void SetVersions()
{
string old = "(You have: " + Properties.Settings.Default.hb_version.Trim() + " / " +
Properties.Settings.Default.hb_build.ToString().Trim() + ")";
- string newBuild = Appcast.Version.Trim() + " (" + Appcast.Build + ")";
+ string newBuild = appcast.Version.Trim() + " (" + appcast.Build + ")";
lbl_update_text.Text = "HandBrake " + newBuild + " is now available. " + old;
}
- private void btn_installUpdate_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Install Update button click event.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The EventArgs.
+ /// </param>
+ private void BtnInstallUpdateClick(object sender, EventArgs e)
{
- frmDownload download = new frmDownload(Appcast.DownloadFile);
+ frmDownload download = new frmDownload(appcast.DownloadFile);
download.ShowDialog();
this.Close();
}
- private void btn_remindLater_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Remind Later button click event
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The EventArgs.
+ /// </param>
+ private void BtnRemindLaterClick(object sender, EventArgs e)
{
this.Close();
}
- private void btn_skip_Click(object sender, EventArgs e)
+ /// <summary>
+ /// Handle the Skip update button click event
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void BtnSkipClick(object sender, EventArgs e)
{
- Properties.Settings.Default.skipversion = int.Parse(Appcast.Build);
+ Properties.Settings.Default.skipversion = int.Parse(appcast.Build);
Properties.Settings.Default.Save();
this.Close();