summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-06-27 14:42:17 +0000
committersr55 <[email protected]>2008-06-27 14:42:17 +0000
commit45ce65f74863a7ee8d3ccf8978608794f2c91f42 (patch)
treed0ea243d7b678484994c22a66027008d93e12e21
parent345c583574d3db3a664347304b8eb0495369ea69 (diff)
WinGui:
- Added: Resolution calculation for non anamorphic encodes in the GUI. - Added: Ability to minimize to the system tray. Includes popup notifications of encoding status. - Added: Duration calculation based on Title and selected chapters. - Added: Some more code comments and summaries - Change: Activity window now only refreshes if there is an active HandBrakeCLI.exe running. - Change: Browse button/ File mode checkbox for Source Selection Removed. Replaced with a Source Dropdown button in the main toolbar. (works a bit like the magui but still uses the 2 different dialog boxes) - Change: Removed "Recommended Crop" label and simply let the dropdown set the cropping values. Added DVD resolution Label. - Fixed: Preset loader now selects longest title and set's chapters to Auto. Before it would load in the last setting used which is bad. - Fixed bug in the presetLoader() function with the 2nd audio channel track selection. Final Note: Quite a bit of code has been moved around in this checkin to clear things up a bit. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1541 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Functions/CLI.cs65
-rw-r--r--win/C#/Functions/Common.cs285
-rw-r--r--win/C#/Functions/QueryParser.cs11
-rw-r--r--win/C#/Functions/RssReader.cs23
-rw-r--r--win/C#/Parsing/DVD.cs2
-rw-r--r--win/C#/frmActivityWindow.Designer.cs1
-rw-r--r--win/C#/frmActivityWindow.cs19
-rw-r--r--win/C#/frmAddPreset.cs1
-rw-r--r--win/C#/frmMain.Designer.cs374
-rw-r--r--win/C#/frmMain.cs301
-rw-r--r--win/C#/frmMain.resx409
-rw-r--r--win/C#/frmQueue.cs128
-rw-r--r--win/C#/frmReadDVD.cs36
13 files changed, 1212 insertions, 443 deletions
diff --git a/win/C#/Functions/CLI.cs b/win/C#/Functions/CLI.cs
index c511953f0..b0ad57a70 100644
--- a/win/C#/Functions/CLI.cs
+++ b/win/C#/Functions/CLI.cs
@@ -11,11 +11,12 @@ using System.Diagnostics;
using System.Windows.Forms;
using System.Globalization;
using System.IO;
+using System.Runtime.InteropServices;
namespace Handbrake.Functions
{
- class CLI
- {
+ public class CLI
+ {
/// <summary>
/// CLI output is based on en-US locale,
/// we use this CultureInfo as IFormatProvider to *.Parse() calls
@@ -24,7 +25,17 @@ namespace Handbrake.Functions
Process hbProc = new Process();
- public Process runCli(object s, string query, bool stderr, bool stdout, bool useShellExec, bool noWindow)
+ /// <summary>
+ /// Execute a HandBrakeCLI process.
+ /// </summary>
+ /// <param name="s"></param>
+ /// <param name="query">The CLI Query</param>
+ /// <param name="stderr">Rediect standard error</param>
+ /// <param name="stdout">Redirect Standard output</param>
+ /// <param name="useShellExec"> Use Shell Executable</param>
+ /// <param name="noWindow">Display No Window</param>
+ /// <returns>Returns a process</returns>
+ public Process runCli(object s, string query)
{
try
{
@@ -34,6 +45,7 @@ namespace Handbrake.Functions
string strCmdLine = String.Format(@"cmd /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);
ProcessStartInfo cliStart = new ProcessStartInfo("CMD.exe", strCmdLine);
+
hbProc = Process.Start(cliStart);
// Set the process Priority
@@ -65,5 +77,52 @@ namespace Handbrake.Functions
}
return hbProc;
}
+
+ [DllImport("user32.dll")]
+ public static extern void LockWorkStation();
+ [DllImport("user32.dll")]
+ public static extern int ExitWindowsEx(int uFlags, int dwReason);
+
+ public void afterEncodeAction()
+ {
+ // Do something whent he encode ends.
+ switch (Properties.Settings.Default.CompletionOption)
+ {
+ case "Shutdown":
+ System.Diagnostics.Process.Start("Shutdown", "-s -t 60");
+ break;
+ case "Log Off":
+ ExitWindowsEx(0, 0);
+ break;
+ case "Suspend":
+ Application.SetSuspendState(PowerState.Suspend, true, true);
+ break;
+ case "Hibernate":
+ Application.SetSuspendState(PowerState.Hibernate, true, true);
+ break;
+ case "Lock System":
+ LockWorkStation();
+ break;
+ case "Quit HandBrake":
+ Application.Exit();
+ break;
+ default:
+ break;
+ }
+ }
+
+ /// <summary>
+ /// Update the presets.dat file with the latest version of HandBrak's presets from the CLI
+ /// </summary>
+ public void grabCLIPresets()
+ {
+ // Gets the presets from the CLI and stores them in presets.dat
+ string appPath = Application.StartupPath.ToString() + "\\";
+ string strCmdLine = "cmd /c " + '"' + '"' + appPath + "HandBrakeCLI.exe" + '"' + " --preset-list >" + '"' + appPath + "presets.dat" + '"' + " 2>&1" + '"';
+ Process hbproc = Process.Start("CMD.exe", strCmdLine);
+ hbproc.WaitForExit();
+ hbproc.Dispose();
+ hbproc.Close();
+ }
}
}
diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs
index 0e772cfb3..fc2b3c23a 100644
--- a/win/C#/Functions/Common.cs
+++ b/win/C#/Functions/Common.cs
@@ -16,9 +16,12 @@ namespace Handbrake.Functions
{
class Common
{
- /*
- * Checks for updates and returns "true" boolean if one exists.
- */
+
+ /// <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 Boolean updateCheck(Boolean debug)
{
try
@@ -46,9 +49,11 @@ namespace Handbrake.Functions
}
}
- /*
- * Function which generates the filename and path automatically based on the Source Name, DVD title and DVD Chapters
- */
+ /// <summary>
+ /// Function which generates the filename and path automatically based on
+ /// the Source Name, DVD title and DVD Chapters
+ /// </summary>
+ /// <param name="mainWindow"></param>
public void autoName(frmMain mainWindow)
{
if (Properties.Settings.Default.autoNaming == "Checked")
@@ -114,9 +119,13 @@ namespace Handbrake.Functions
}
}
- /*
- * This function takes in a Query which has been parsed by QueryParser and sets up the GUI.
- */
+ /// <summary>
+ /// This function takes in a Query which has been parsed by QueryParser and
+ /// set's all the GUI widgets correctly.
+ /// </summary>
+ /// <param name="mainWindow"></param>
+ /// <param name="presetQuery">The Parsed CLI Query</param>
+ /// <param name="name">Name of the preset</param>
public void presetLoader(frmMain mainWindow, Functions.QueryParser presetQuery, string name)
{
// ---------------------------
@@ -132,14 +141,9 @@ namespace Handbrake.Functions
if (presetQuery.Source != "")
mainWindow.text_source.Text = presetQuery.Source;
- if (presetQuery.DVDTitle != 0)
- mainWindow.drp_dvdtitle.Text = presetQuery.DVDTitle.ToString();
-
- if (presetQuery.DVDChapterStart != 0)
- mainWindow.drop_chapterStart.Text = presetQuery.DVDChapterStart.ToString();
-
- if (presetQuery.DVDChapterFinish != 0)
- mainWindow.drop_chapterFinish.Text = presetQuery.DVDChapterFinish.ToString();
+ selectLongestTitle(mainWindow);
+ mainWindow.drop_chapterStart.Text = "Auto";
+ mainWindow.drop_chapterFinish.Text = "Auto";
if (presetQuery.Format != null)
{
@@ -304,11 +308,12 @@ namespace Handbrake.Functions
mainWindow.drp_audsr_2.Text = "48";
if ((presetQuery.AudioTrack2 != null) && (presetQuery.AudioTrack2 != "None"))
mainWindow.drp_track2Audio.Text = presetQuery.AudioTrack2;
- else
+ else
mainWindow.drp_track2Audio.Text = "Automatic";
}
else if (presetQuery.AudioTrack2 == "None")
{
+ mainWindow.drp_track2Audio.Text = "None";
mainWindow.drp_track2Audio.SelectedIndex = 0;
mainWindow.drp_audsr_2.Enabled = false;
mainWindow.drp_audmix_2.Enabled = false;
@@ -460,12 +465,13 @@ namespace Handbrake.Functions
#endregion
}
- /*
- * This takes all the widgets on frmMain
- */
+ /// <summary>
+ /// Generates a CLI query based on the GUI widgets.
+ /// </summary>
+ /// <param name="mainWindow"></param>
+ /// <returns>The CLI String</returns>
public string GenerateTheQuery(frmMain mainWindow)
{
-
// Source tab
#region source
string source = mainWindow.text_source.Text;
@@ -507,8 +513,7 @@ namespace Handbrake.Functions
string height = mainWindow.text_height.Text;
if (destination != "")
- destination = " -o " + '"' + destination + '"'; //'"'+
-
+ destination = " -o " + '"' + destination + '"';
switch (videoEncoder)
{
@@ -532,20 +537,193 @@ namespace Handbrake.Functions
if (width != "")
width = " -w " + width;
-
if (height == "Auto")
- {
height = "";
- }
else if (height != "")
- {
height = " -l " + height;
+
+ string queryDestination = destination + videoEncoder + width + height;
+ #endregion
+
+ string query = querySource + queryDestination;
+ query = query + generateTabbedComponentsQuery(mainWindow, source);
+ return query;
+ }
+
+ /// <summary>
+ /// Generates a CLI query for the preview function.
+ /// This basically forces a shortened version of the encdode.
+ /// </summary>
+ /// <param name="mainWindow"></param>
+ /// <returns>Returns a CLI query String.</returns>
+ public string GeneratePreview(frmMain mainWindow)
+ {
+ // Source tab
+ #region source
+ string source = mainWindow.text_source.Text;
+ string dvdTitle = mainWindow.drp_dvdtitle.Text;
+ string chapterStart = mainWindow.drop_chapterStart.Text;
+ string chapterFinish = mainWindow.drop_chapterFinish.Text;
+ int totalChapters = mainWindow.drop_chapterFinish.Items.Count - 1;
+ string dvdChapter = "";
+
+ if ((source != "") && (source.Trim() != "Click 'Browse' to continue"))
+ source = " -i " + '"' + source + '"';
+ else
+ source = "";
+
+ if (dvdTitle == "Automatic")
+ dvdTitle = "";
+ else
+ {
+ string[] titleInfo = dvdTitle.Split(' ');
+ dvdTitle = " -t " + titleInfo[0];
}
+ dvdChapter = " -c 2 ";
+
+ string querySource = source + dvdTitle + dvdChapter;
+ #endregion
+
+ // Destination tab
+ #region Destination
+
+ string destination = mainWindow.text_destination.Text;
+ string videoEncoder = mainWindow.drp_videoEncoder.Text;
+ string width = mainWindow.text_width.Text;
+ string height = mainWindow.text_height.Text;
+
+ if (destination != "")
+ destination = " -o " + '"' + destination.Replace(".m", "_sample.m").Replace(".avi", "_sample.avi").Replace(".ogm", "_sample.ogm") + '"';
+
+
+ switch (videoEncoder)
+ {
+ case "MPEG-4 (FFmpeg)":
+ videoEncoder = " -e ffmpeg";
+ break;
+ case "MPEG-4 (XviD)":
+ videoEncoder = " -e xvid";
+ break;
+ case "H.264 (x264)":
+ videoEncoder = " -e x264";
+ break;
+ case "VP3 (Theora)":
+ videoEncoder = " -e theora";
+ break;
+ default:
+ videoEncoder = " -e x264";
+ break;
+ }
+
+ if (width != "")
+ width = " -w " + width;
+
+ if (height == "Auto")
+ height = "";
+ else if (height != "")
+ height = " -l " + height;
string queryDestination = destination + videoEncoder + width + height;
#endregion
+ string query = querySource + queryDestination;
+ query = query + generateTabbedComponentsQuery(mainWindow, source);
+ return query;
+ }
+
+ /// <summary>
+ /// Set's up the DataGridView on the Chapters tab (frmMain)
+ /// </summary>
+ /// <param name="mainWindow"></param>
+ public void chapterNaming(frmMain mainWindow)
+ {
+ try
+ {
+ mainWindow.data_chpt.Rows.Clear();
+ int i = 0;
+ int rowCount = 0;
+ int start = 0;
+ int finish = 0;
+ if (mainWindow.drop_chapterFinish.Text != "Auto")
+ finish = int.Parse(mainWindow.drop_chapterFinish.Text);
+
+ if (mainWindow.drop_chapterStart.Text != "Auto")
+ start = int.Parse(mainWindow.drop_chapterStart.Text);
+
+ rowCount = finish - (start - 1);
+
+ while (i < rowCount)
+ {
+ DataGridViewRow row = new DataGridViewRow();
+
+ mainWindow.data_chpt.Rows.Insert(i, row);
+ mainWindow.data_chpt.Rows[i].Cells[0].Value = (i + 1);
+ mainWindow.data_chpt.Rows[i].Cells[1].Value = "Chapter " + (i + 1);
+ i++;
+ }
+ }
+ catch (Exception exc)
+ {
+ MessageBox.Show("chapterNaming() Error has occured: \n" + exc.ToString());
+ }
+ }
+
+ /// <summary>
+ /// Select the longest title in the DVD title dropdown menu on frmMain
+ /// </summary>
+ public void selectLongestTitle(frmMain mainWindow)
+ {
+ int current_largest = 0;
+ Handbrake.Parsing.Title title2Select;
+
+ // Check if there are titles in the DVD title dropdown menu and make sure, it's not just "Automatic"
+ if (mainWindow.drp_dvdtitle.Items[0].ToString() != "Automatic")
+ title2Select = (Handbrake.Parsing.Title)mainWindow.drp_dvdtitle.Items[0];
+ else
+ title2Select = null;
+
+ // So, If there are titles in the DVD Title dropdown menu, lets select the longest.
+ if (title2Select != null)
+ {
+ foreach (Handbrake.Parsing.Title x in mainWindow.drp_dvdtitle.Items)
+ {
+ string title = x.ToString();
+ if (title != "Automatic")
+ {
+ string[] y = title.Split(' ');
+ string time = y[1].Replace("(", "").Replace(")", "");
+ string[] z = time.Split(':');
+
+ int hours = int.Parse(z[0]) * 60 * 60;
+ int minutes = int.Parse(z[1]) * 60;
+ int seconds = int.Parse(z[2]);
+ int total_sec = hours + minutes + seconds;
+
+ if (current_largest == 0)
+ {
+ current_largest = hours + minutes + seconds;
+ title2Select = x;
+ }
+ else
+ {
+ if (total_sec > current_largest)
+ {
+ current_largest = total_sec;
+ title2Select = x;
+ }
+ }
+ }
+ }
+
+ // Now set the longest title in the gui.
+ mainWindow.drp_dvdtitle.SelectedItem = title2Select;
+ }
+ }
+
+ // Generates part of the CLI query, for the tabbed components only.
+ private string generateTabbedComponentsQuery(frmMain mainWindow, string source)
+ {
// Picture Settings Tab
#region Picture Settings Tab
@@ -868,7 +1046,7 @@ namespace Handbrake.Functions
{
// All this is a hack, because when AppleTV is selected, there is no sample rate selected. so just add a 48
// It should probably be setup later so the GUI widget has the value 48 in it.
-
+
if ((track2 != "") && (track2 != "None"))
{
if (audioSampleRate == "")
@@ -1066,49 +1244,11 @@ namespace Handbrake.Functions
string verbose = " -v ";
#endregion
- return querySource + queryDestination + queryPictureSettings + queryVideoSettings + h264Settings + queryAudioSettings + ChapterMarkers + queryAdvancedSettings + verbose;
- }
-
- /*
- * Set's up the DataGridView on the Chapters tab (frmMain)
- */
- public void chapterNaming(frmMain mainWindow)
- {
- try
- {
- mainWindow.data_chpt.Rows.Clear();
- int i = 0;
- int rowCount = 0;
- int start = 0;
- int finish = 0;
- if (mainWindow.drop_chapterFinish.Text != "Auto")
- finish = int.Parse(mainWindow.drop_chapterFinish.Text);
-
- if (mainWindow.drop_chapterStart.Text != "Auto")
- start = int.Parse(mainWindow.drop_chapterStart.Text);
-
- rowCount = finish - (start - 1);
-
- while (i < rowCount)
- {
- DataGridViewRow row = new DataGridViewRow();
-
- mainWindow.data_chpt.Rows.Insert(i, row);
- mainWindow.data_chpt.Rows[i].Cells[0].Value = (i + 1);
- mainWindow.data_chpt.Rows[i].Cells[1].Value = "Chapter " + (i + 1);
- i++;
- }
- }
- catch (Exception exc)
- {
- MessageBox.Show("chapterNaming() Error has occured: \n" + exc.ToString());
- }
+ return queryPictureSettings + queryVideoSettings + h264Settings + queryAudioSettings + ChapterMarkers + queryAdvancedSettings + verbose;
}
- /*
- * This function saves the data in the chapters tab, dataGridView into a CSV file called chapters.csv in this applications
- * running directory.
- */
+ // This function saves the data in the chapters tab, dataGridView into a CSV file called chapters.csv
+ // in a directory specified by file_path_name
private Boolean chapterCSVSave(frmMain mainWindow, string file_path_name)
{
try
@@ -1136,7 +1276,7 @@ namespace Handbrake.Functions
}
}
-
+ // Get the CLI equive of the audio mixdown from the widget name.
private string getMixDown(string selectedAudio)
{
switch (selectedAudio)
@@ -1158,6 +1298,7 @@ namespace Handbrake.Functions
}
}
+ // Get the CLI equiv of the audio encoder from the widget name.
private string getAudioEncoder(string selectedEncoder)
{
switch (selectedEncoder)
@@ -1175,7 +1316,5 @@ namespace Handbrake.Functions
}
}
-
- // End of Functions
}
}
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs
index a4b2f5a95..c7998c5be 100644
--- a/win/C#/Functions/QueryParser.cs
+++ b/win/C#/Functions/QueryParser.cs
@@ -771,7 +771,13 @@ namespace Handbrake.Functions
#endregion
- // Takes in a query which can be in any order and parses it. All varibles are then set so they can be used elsewhere.
+ /// <summary>
+ /// Takes in a query which can be in any order and parses it.
+ /// All varibles are then set so they can be used elsewhere.
+ /// </summary>
+ /// <param name="input">A ClI Query</param>
+ /// <returns>A Parsed Query</returns>
+
public static QueryParser Parse(String input)
{
QueryParser thisQuery = new QueryParser();
@@ -807,7 +813,7 @@ namespace Handbrake.Functions
Match videoBitrate = Regex.Match(input, @"-b ([0-9]*)");
Match videoQuality = Regex.Match(input, @"-q ([0-9.]*)");
Match videoFilesize = Regex.Match(input, @"-S ([0-9.]*)");
- Match twoPass = Regex.Match(input, @" -2 ");
+ Match twoPass = Regex.Match(input, @" -2");
Match turboFirstPass = Regex.Match(input, @" -T");
Match grayscale = Regex.Match(input, @" -g");
Match largerMp4 = Regex.Match(input, @" -4");
@@ -1251,7 +1257,6 @@ namespace Handbrake.Functions
return thisQuery;
}
-
private static string getMixDown(string mixdown)
{
switch (mixdown)
diff --git a/win/C#/Functions/RssReader.cs b/win/C#/Functions/RssReader.cs
index bf9a1f5ca..28acf8aa8 100644
--- a/win/C#/Functions/RssReader.cs
+++ b/win/C#/Functions/RssReader.cs
@@ -25,6 +25,7 @@ namespace Handbrake.Functions
XmlNode nodeChannel;
XmlNode nodeItem;
+ // Rss Reading Code.
private void readRss()
{
if (Properties.Settings.Default.hb_build.ToString().EndsWith("1"))
@@ -53,12 +54,14 @@ namespace Handbrake.Functions
}
}
+ // Some varibles.
private string hb_versionInfo;
private string hb_version;
private string hb_build;
private string hb_file;
-
- public void getInfo()
+
+ // Get's the information required out the RSS file.
+ private void getInfo()
{
readRss();
@@ -78,24 +81,40 @@ namespace Handbrake.Functions
hb_file = nodeItem["windows"].InnerText;
}
+ /// <summary>
+ /// Get Information about an update to HandBrake
+ /// </summary>
+ /// <returns></returns>
public string versionInfo()
{
getInfo();
return hb_versionInfo;
}
+ /// <summary>
+ /// Get HandBrake's version from the appcast.xml file.
+ /// </summary>
+ /// <returns></returns>
public string version()
{
getInfo();
return hb_version;
}
+ /// <summary>
+ /// Get HandBrake's Build from the appcast.xml file.
+ /// </summary>
+ /// <returns></returns>
public string build()
{
getInfo();
return hb_build;
}
+ /// <summary>
+ /// Get's the URL for update file.
+ /// </summary>
+ /// <returns></returns>
public string downloadFile()
{
getInfo();
diff --git a/win/C#/Parsing/DVD.cs b/win/C#/Parsing/DVD.cs
index 2ce211003..1637c9154 100644
--- a/win/C#/Parsing/DVD.cs
+++ b/win/C#/Parsing/DVD.cs
@@ -48,7 +48,7 @@ namespace Handbrake.Parsing
if ((char)output.Peek() == '+')
thisDVD.m_titles.AddRange(Title.ParseList(output.ReadToEnd()));
else
- output.ReadLine();
+ output.ReadLine();
}
}
catch (Exception exc)
diff --git a/win/C#/frmActivityWindow.Designer.cs b/win/C#/frmActivityWindow.Designer.cs
index dcd58d547..7191e29dc 100644
--- a/win/C#/frmActivityWindow.Designer.cs
+++ b/win/C#/frmActivityWindow.Designer.cs
@@ -53,6 +53,7 @@ namespace Handbrake
this.rtf_actLog.Size = new System.Drawing.Size(390, 390);
this.rtf_actLog.TabIndex = 29;
this.rtf_actLog.Text = "";
+
//
// ToolTip
//
diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs
index 73abbbe77..d0a413e5d 100644
--- a/win/C#/frmActivityWindow.cs
+++ b/win/C#/frmActivityWindow.cs
@@ -22,15 +22,23 @@ namespace Handbrake
{
public partial class frmActivityWindow : Form
{
+
+ Thread monitorFile;
+ String read_file;
+ frmMain mainWindow;
+ frmQueue queueWindow;
+
/// <summary>
/// This window should be used to display the RAW output of the handbrake CLI which is produced during an encode.
/// </summary>
///
- Thread monitorFile;
- String read_file;
- public frmActivityWindow(string file)
+ public frmActivityWindow(string file, frmMain fm, frmQueue fq)
{
InitializeComponent();
+
+ mainWindow = fm;
+ queueWindow = fq;
+
this.rtf_actLog.Text = string.Empty;
read_file = file;
@@ -53,9 +61,11 @@ namespace Handbrake
// Update the Activity window every 5 seconds with the latest log data.
private void autoUpdate(object state)
{
+ updateTextFromThread();
while (true)
{
- updateTextFromThread();
+ if ((mainWindow.isEncoding() == true) || (queueWindow.isEncoding() == true))
+ updateTextFromThread();
Thread.Sleep(5000);
}
}
@@ -125,5 +135,6 @@ namespace Handbrake
this.Hide();
base.OnClosing(e);
}
+
}
} \ No newline at end of file
diff --git a/win/C#/frmAddPreset.cs b/win/C#/frmAddPreset.cs
index f6a51fc6a..2a24d3331 100644
--- a/win/C#/frmAddPreset.cs
+++ b/win/C#/frmAddPreset.cs
@@ -12,7 +12,6 @@ using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
-using System.Windows.Forms;
namespace Handbrake
{
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index b03fec2e4..827114f9e 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -36,8 +36,10 @@ namespace Handbrake
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label Label38;
+ System.Windows.Forms.ContextMenuStrip notifyIconMenu;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();
this.File_Save = new System.Windows.Forms.SaveFileDialog();
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
@@ -72,7 +74,6 @@ namespace Handbrake
this.drp_audenc_2 = new System.Windows.Forms.ComboBox();
this.drp_audbit_2 = new System.Windows.Forms.ComboBox();
this.drp_audsr_2 = new System.Windows.Forms.ComboBox();
- this.check_fileMode = new System.Windows.Forms.CheckBox();
this.drp_audsr_3 = new System.Windows.Forms.ComboBox();
this.drp_audbit_3 = new System.Windows.Forms.ComboBox();
this.drp_audenc_3 = new System.Windows.Forms.ComboBox();
@@ -81,8 +82,10 @@ namespace Handbrake
this.drp_audbit_4 = new System.Windows.Forms.ComboBox();
this.drp_audenc_4 = new System.Windows.Forms.ComboBox();
this.drp_audmix_4 = new System.Windows.Forms.ComboBox();
- this.lbl_RecomendedCrop = new System.Windows.Forms.Label();
- this.Label8 = new System.Windows.Forms.Label();
+ this.label7 = new System.Windows.Forms.Label();
+ 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.DVD_Open = new System.Windows.Forms.FolderBrowserDialog();
this.File_Open = new System.Windows.Forms.OpenFileDialog();
this.ISO_Open = new System.Windows.Forms.OpenFileDialog();
@@ -112,7 +115,6 @@ namespace Handbrake
this.mnu_about = new System.Windows.Forms.ToolStripMenuItem();
this.frmMainMenu = new System.Windows.Forms.MenuStrip();
this.GroupBox1 = new System.Windows.Forms.GroupBox();
- this.btn_Browse = new System.Windows.Forms.Button();
this.Label13 = new System.Windows.Forms.Label();
this.Label17 = new System.Windows.Forms.Label();
this.Label9 = new System.Windows.Forms.Label();
@@ -120,7 +122,6 @@ namespace Handbrake
this.groupBox_output = new System.Windows.Forms.GroupBox();
this.Label47 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
- this.lbl_encode = new System.Windows.Forms.Label();
this.TabPage2 = new System.Windows.Forms.TabPage();
this.lbl_drc4 = new System.Windows.Forms.Label();
this.lbl_drc3 = new System.Windows.Forms.Label();
@@ -248,14 +249,23 @@ 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.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
+ this.btn_dvd_source = new System.Windows.Forms.ToolStripMenuItem();
+ this.btn_file_source = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.btn_start = new System.Windows.Forms.ToolStripButton();
- this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
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.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();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.data_chpt)).BeginInit();
this.frmMainMenu.SuspendLayout();
@@ -292,6 +302,21 @@ namespace Handbrake
Label38.TabIndex = 11;
Label38.Text = "Target Size (MB):";
//
+ // notifyIconMenu
+ //
+ notifyIconMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.btn_restore});
+ notifyIconMenu.Name = "notifyIconMenu";
+ notifyIconMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
+ notifyIconMenu.Size = new System.Drawing.Size(124, 26);
+ //
+ // btn_restore
+ //
+ this.btn_restore.Name = "btn_restore";
+ this.btn_restore.Size = new System.Drawing.Size(123, 22);
+ this.btn_restore.Text = "Restore";
+ this.btn_restore.Click += new System.EventHandler(this.btn_restore_Click);
+ //
// DVD_Save
//
this.DVD_Save.Filter = "mp4|*.mp4|m4v|*.m4v|avi|*.avi|ogm|*.ogm|mkv|*.mkv";
@@ -352,9 +377,9 @@ namespace Handbrake
this.text_source.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.text_source.Location = new System.Drawing.Point(99, 19);
this.text_source.Name = "text_source";
- this.text_source.Size = new System.Drawing.Size(429, 21);
+ this.text_source.Size = new System.Drawing.Size(584, 21);
this.text_source.TabIndex = 1;
- this.text_source.Text = "Click \'Browse\' to continue";
+ this.text_source.Text = "Click \'Source\' to continue";
this.ToolTip.SetToolTip(this.text_source, "The input source location.");
//
// text_destination
@@ -447,7 +472,7 @@ namespace Handbrake
this.check_turbo.Location = new System.Drawing.Point(37, 151);
this.check_turbo.Name = "check_turbo";
this.check_turbo.Size = new System.Drawing.Size(115, 17);
- this.check_turbo.TabIndex = 3;
+ this.check_turbo.TabIndex = 7;
this.check_turbo.Text = "Turbo first Pass";
this.ToolTip.SetToolTip(this.check_turbo, "Makes the first pass of a 2 pass encode faster.");
this.check_turbo.UseVisualStyleBackColor = false;
@@ -469,7 +494,7 @@ namespace Handbrake
this.drp_videoFramerate.Location = new System.Drawing.Point(125, 35);
this.drp_videoFramerate.Name = "drp_videoFramerate";
this.drp_videoFramerate.Size = new System.Drawing.Size(126, 21);
- this.drp_videoFramerate.TabIndex = 7;
+ this.drp_videoFramerate.TabIndex = 2;
this.drp_videoFramerate.Text = "Same as source";
this.ToolTip.SetToolTip(this.drp_videoFramerate, "Can be left to automcatic in most cases.");
//
@@ -558,20 +583,20 @@ namespace Handbrake
//
this.text_height.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.text_height.ForeColor = System.Drawing.SystemColors.InfoText;
- this.text_height.Location = new System.Drawing.Point(504, 35);
+ this.text_height.Location = new System.Drawing.Point(498, 81);
this.text_height.Name = "text_height";
this.text_height.Size = new System.Drawing.Size(64, 21);
- this.text_height.TabIndex = 28;
+ this.text_height.TabIndex = 19;
this.ToolTip.SetToolTip(this.text_height, "Video Resolution (Height)\r\nCan only be altered when Anamorphic is set to \"None\"");
this.text_height.TextChanged += new System.EventHandler(this.text_height_TextChanged);
//
// text_width
//
this.text_width.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.text_width.Location = new System.Drawing.Point(413, 35);
+ this.text_width.Location = new System.Drawing.Point(407, 81);
this.text_width.Name = "text_width";
this.text_width.Size = new System.Drawing.Size(64, 21);
- this.text_width.TabIndex = 26;
+ this.text_width.TabIndex = 17;
this.ToolTip.SetToolTip(this.text_width, "Video Resolution (Width)\r\nCan only be altered when Anamorphic is set to \"None\" or" +
" \"Loose\"");
this.text_width.TextChanged += new System.EventHandler(this.text_width_TextChanged);
@@ -622,9 +647,9 @@ namespace Handbrake
//
// number
//
- dataGridViewCellStyle3.Format = "N0";
- dataGridViewCellStyle3.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle1.Format = "N0";
+ dataGridViewCellStyle1.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle1;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
this.number.Name = "number";
@@ -761,20 +786,6 @@ namespace Handbrake
this.drp_audsr_2.Text = "Auto";
this.ToolTip.SetToolTip(this.drp_audsr_2, "Set the Audio Sample Rate");
//
- // check_fileMode
- //
- this.check_fileMode.AutoSize = true;
- this.check_fileMode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_fileMode.Location = new System.Drawing.Point(618, 21);
- this.check_fileMode.Name = "check_fileMode";
- this.check_fileMode.Size = new System.Drawing.Size(79, 17);
- this.check_fileMode.TabIndex = 11;
- this.check_fileMode.Text = "File Mode";
- this.ToolTip.SetToolTip(this.check_fileMode, "Displays a File selection dialog box instead of the standard folder selection.\r\nW" +
- "ith the file dialog box, you can select the folllowing file types:\r\n.vob, .ts, ." +
- "mpg, .mpeg and .m2t");
- this.check_fileMode.UseVisualStyleBackColor = true;
- //
// drp_audsr_3
//
this.drp_audsr_3.Enabled = false;
@@ -935,28 +946,52 @@ namespace Handbrake
this.ToolTip.SetToolTip(this.drp_audmix_4, "Please note: Some options require a 5.1 audio channel to be selected");
this.drp_audmix_4.SelectedIndexChanged += new System.EventHandler(this.drp_audmix_4_SelectedIndexChanged);
//
- // lbl_RecomendedCrop
- //
- this.lbl_RecomendedCrop.AutoSize = true;
- this.lbl_RecomendedCrop.BackColor = System.Drawing.Color.Transparent;
- this.lbl_RecomendedCrop.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_RecomendedCrop.Location = new System.Drawing.Point(116, 69);
- this.lbl_RecomendedCrop.Name = "lbl_RecomendedCrop";
- this.lbl_RecomendedCrop.Size = new System.Drawing.Size(72, 12);
- this.lbl_RecomendedCrop.TabIndex = 4;
- this.lbl_RecomendedCrop.Text = "Select a Title";
- this.ToolTip.SetToolTip(this.lbl_RecomendedCrop, "Top / Bottom / Left / Right");
- //
- // Label8
- //
- this.Label8.AutoSize = true;
- this.Label8.BackColor = System.Drawing.Color.Transparent;
- this.Label8.Location = new System.Drawing.Point(13, 68);
- this.Label8.Name = "Label8";
- this.Label8.Size = new System.Drawing.Size(70, 13);
- this.Label8.TabIndex = 2;
- this.Label8.Text = "Auto Crop:";
- this.ToolTip.SetToolTip(this.Label8, "Top / Bottom / Left / Right");
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.BackColor = System.Drawing.Color.Transparent;
+ this.label7.Location = new System.Drawing.Point(311, 34);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(52, 13);
+ this.label7.TabIndex = 12;
+ this.label7.Text = "Source:";
+ this.ToolTip.SetToolTip(this.label7, "Top / Bottom / Left / Right");
+ //
+ // lbl_src_res
+ //
+ this.lbl_src_res.AutoSize = true;
+ this.lbl_src_res.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_src_res.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_src_res.Location = new System.Drawing.Point(405, 34);
+ this.lbl_src_res.Name = "lbl_src_res";
+ this.lbl_src_res.Size = new System.Drawing.Size(72, 12);
+ this.lbl_src_res.TabIndex = 13;
+ this.lbl_src_res.Text = "Select a Title";
+ this.ToolTip.SetToolTip(this.lbl_src_res, "Top / Bottom / Left / Right");
+ //
+ // lbl_duration
+ //
+ this.lbl_duration.AutoSize = true;
+ this.lbl_duration.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_duration.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_duration.Location = new System.Drawing.Point(553, 56);
+ this.lbl_duration.Name = "lbl_duration";
+ this.lbl_duration.Size = new System.Drawing.Size(72, 12);
+ this.lbl_duration.TabIndex = 43;
+ this.lbl_duration.Text = "Select a Title";
+ this.ToolTip.SetToolTip(this.lbl_duration, "Top / Bottom / Left / Right");
+ //
+ // label_duration
+ //
+ this.label_duration.AutoSize = true;
+ this.label_duration.BackColor = System.Drawing.Color.Transparent;
+ this.label_duration.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label_duration.Location = new System.Drawing.Point(486, 55);
+ this.label_duration.Name = "label_duration";
+ this.label_duration.Size = new System.Drawing.Size(61, 13);
+ this.label_duration.TabIndex = 42;
+ this.label_duration.Text = "Duration:";
+ this.ToolTip.SetToolTip(this.label_duration, "Top / Bottom / Left / Right");
//
// DVD_Open
//
@@ -1177,8 +1212,8 @@ namespace Handbrake
//
// GroupBox1
//
- this.GroupBox1.Controls.Add(this.btn_Browse);
- this.GroupBox1.Controls.Add(this.check_fileMode);
+ this.GroupBox1.Controls.Add(this.lbl_duration);
+ this.GroupBox1.Controls.Add(this.label_duration);
this.GroupBox1.Controls.Add(this.Label13);
this.GroupBox1.Controls.Add(this.drop_chapterFinish);
this.GroupBox1.Controls.Add(this.drop_chapterStart);
@@ -1196,17 +1231,6 @@ namespace Handbrake
this.GroupBox1.TabStop = false;
this.GroupBox1.Text = "Source";
//
- // btn_Browse
- //
- this.btn_Browse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_Browse.Location = new System.Drawing.Point(534, 18);
- this.btn_Browse.Name = "btn_Browse";
- this.btn_Browse.Size = new System.Drawing.Size(75, 23);
- this.btn_Browse.TabIndex = 12;
- this.btn_Browse.Text = "Browse";
- this.btn_Browse.UseVisualStyleBackColor = true;
- this.btn_Browse.Click += new System.EventHandler(this.btn_Browse_Click);
- //
// Label13
//
this.Label13.AutoSize = true;
@@ -1288,18 +1312,6 @@ namespace Handbrake
this.Label3.TabIndex = 0;
this.Label3.Text = "File:";
//
- // lbl_encode
- //
- this.lbl_encode.AutoSize = true;
- this.lbl_encode.BackColor = System.Drawing.Color.Transparent;
- this.lbl_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_encode.Location = new System.Drawing.Point(448, 36);
- this.lbl_encode.Name = "lbl_encode";
- this.lbl_encode.Size = new System.Drawing.Size(129, 13);
- this.lbl_encode.TabIndex = 5;
- this.lbl_encode.Text = "Encoding started...";
- this.lbl_encode.Visible = false;
- //
// TabPage2
//
this.TabPage2.BackColor = System.Drawing.Color.Transparent;
@@ -1701,7 +1713,7 @@ namespace Handbrake
this.label25.Location = new System.Drawing.Point(13, 13);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(76, 13);
- this.label25.TabIndex = 28;
+ this.label25.TabIndex = 0;
this.label25.Text = "Framerate";
//
// lbl_vfr
@@ -1712,7 +1724,7 @@ namespace Handbrake
this.lbl_vfr.Location = new System.Drawing.Point(123, 64);
this.lbl_vfr.Name = "lbl_vfr";
this.lbl_vfr.Size = new System.Drawing.Size(52, 12);
- this.lbl_vfr.TabIndex = 27;
+ this.lbl_vfr.TabIndex = 3;
this.lbl_vfr.Text = "(VFR On)";
this.lbl_vfr.Visible = false;
//
@@ -1724,7 +1736,7 @@ namespace Handbrake
this.check_grayscale.Location = new System.Drawing.Point(16, 105);
this.check_grayscale.Name = "check_grayscale";
this.check_grayscale.Size = new System.Drawing.Size(138, 17);
- this.check_grayscale.TabIndex = 1;
+ this.check_grayscale.TabIndex = 5;
this.check_grayscale.Text = "Grayscale Encoding";
this.check_grayscale.UseVisualStyleBackColor = false;
//
@@ -1736,7 +1748,7 @@ namespace Handbrake
this.Label22.Location = new System.Drawing.Point(13, 85);
this.Label22.Name = "Label22";
this.Label22.Size = new System.Drawing.Size(191, 13);
- this.Label22.TabIndex = 0;
+ this.Label22.TabIndex = 4;
this.Label22.Text = "Advanced Encoding Settings";
//
// check_2PassEncode
@@ -1747,7 +1759,7 @@ namespace Handbrake
this.check_2PassEncode.Location = new System.Drawing.Point(16, 128);
this.check_2PassEncode.Name = "check_2PassEncode";
this.check_2PassEncode.Size = new System.Drawing.Size(119, 17);
- this.check_2PassEncode.TabIndex = 2;
+ this.check_2PassEncode.TabIndex = 6;
this.check_2PassEncode.Text = "2-Pass Encoding";
this.check_2PassEncode.UseVisualStyleBackColor = false;
this.check_2PassEncode.CheckedChanged += new System.EventHandler(this.check_2PassEncode_CheckedChanged);
@@ -1793,7 +1805,7 @@ namespace Handbrake
this.Label46.Location = new System.Drawing.Point(13, 38);
this.Label46.Name = "Label46";
this.Label46.Size = new System.Drawing.Size(106, 13);
- this.Label46.TabIndex = 6;
+ this.Label46.TabIndex = 1;
this.Label46.Text = "Framerate (FPS):";
//
// Label40
@@ -1810,6 +1822,8 @@ namespace Handbrake
// TabPage1
//
this.TabPage1.BackColor = System.Drawing.Color.Transparent;
+ this.TabPage1.Controls.Add(this.lbl_src_res);
+ this.TabPage1.Controls.Add(this.label7);
this.TabPage1.Controls.Add(this.label6);
this.TabPage1.Controls.Add(this.drp_anamorphic);
this.TabPage1.Controls.Add(this.text_bottom);
@@ -1831,8 +1845,6 @@ namespace Handbrake
this.TabPage1.Controls.Add(this.check_detelecine);
this.TabPage1.Controls.Add(this.label4);
this.TabPage1.Controls.Add(this.drp_deInterlace_option);
- this.TabPage1.Controls.Add(this.lbl_RecomendedCrop);
- this.TabPage1.Controls.Add(this.Label8);
this.TabPage1.Controls.Add(this.Label1);
this.TabPage1.Controls.Add(this.Label53);
this.TabPage1.Controls.Add(this.Label52);
@@ -1852,10 +1864,10 @@ namespace Handbrake
this.label6.AutoSize = true;
this.label6.BackColor = System.Drawing.Color.Transparent;
this.label6.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label6.Location = new System.Drawing.Point(311, 89);
+ this.label6.Location = new System.Drawing.Point(311, 111);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(80, 13);
- this.label6.TabIndex = 37;
+ this.label6.TabIndex = 20;
this.label6.Text = "Anamorphic:";
//
// drp_anamorphic
@@ -1867,15 +1879,15 @@ namespace Handbrake
"None",
"Strict",
"Loose"});
- this.drp_anamorphic.Location = new System.Drawing.Point(414, 86);
+ this.drp_anamorphic.Location = new System.Drawing.Point(407, 108);
this.drp_anamorphic.Name = "drp_anamorphic";
this.drp_anamorphic.Size = new System.Drawing.Size(110, 21);
- this.drp_anamorphic.TabIndex = 36;
+ this.drp_anamorphic.TabIndex = 21;
this.drp_anamorphic.SelectedIndexChanged += new System.EventHandler(this.drp_anamorphic_SelectedIndexChanged);
//
// text_bottom
//
- this.text_bottom.Location = new System.Drawing.Point(133, 146);
+ this.text_bottom.Location = new System.Drawing.Point(96, 130);
this.text_bottom.Maximum = new decimal(new int[] {
1080,
0,
@@ -1883,11 +1895,11 @@ namespace Handbrake
0});
this.text_bottom.Name = "text_bottom";
this.text_bottom.Size = new System.Drawing.Size(44, 21);
- this.text_bottom.TabIndex = 35;
+ this.text_bottom.TabIndex = 9;
//
// text_top
//
- this.text_top.Location = new System.Drawing.Point(133, 105);
+ this.text_top.Location = new System.Drawing.Point(96, 84);
this.text_top.Maximum = new decimal(new int[] {
1080,
0,
@@ -1895,11 +1907,11 @@ namespace Handbrake
0});
this.text_top.Name = "text_top";
this.text_top.Size = new System.Drawing.Size(44, 21);
- this.text_top.TabIndex = 34;
+ this.text_top.TabIndex = 6;
//
// text_left
//
- this.text_left.Location = new System.Drawing.Point(77, 126);
+ this.text_left.Location = new System.Drawing.Point(45, 106);
this.text_left.Maximum = new decimal(new int[] {
1920,
0,
@@ -1907,11 +1919,11 @@ namespace Handbrake
0});
this.text_left.Name = "text_left";
this.text_left.Size = new System.Drawing.Size(44, 21);
- this.text_left.TabIndex = 33;
+ this.text_left.TabIndex = 4;
//
// text_right
//
- this.text_right.Location = new System.Drawing.Point(187, 126);
+ this.text_right.Location = new System.Drawing.Point(147, 106);
this.text_right.Maximum = new decimal(new int[] {
1920,
0,
@@ -1919,7 +1931,7 @@ namespace Handbrake
0});
this.text_right.Name = "text_right";
this.text_right.Size = new System.Drawing.Size(44, 21);
- this.text_right.TabIndex = 32;
+ this.text_right.TabIndex = 7;
//
// label26
//
@@ -1929,7 +1941,7 @@ namespace Handbrake
this.label26.Location = new System.Drawing.Point(311, 13);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(34, 13);
- this.label26.TabIndex = 31;
+ this.label26.TabIndex = 11;
this.label26.Text = "Size";
//
// Label56
@@ -1938,10 +1950,10 @@ namespace Handbrake
this.Label56.BackColor = System.Drawing.Color.Transparent;
this.Label56.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label56.ForeColor = System.Drawing.Color.Black;
- this.Label56.Location = new System.Drawing.Point(483, 38);
+ this.Label56.Location = new System.Drawing.Point(477, 85);
this.Label56.Name = "Label56";
this.Label56.Size = new System.Drawing.Size(15, 13);
- this.Label56.TabIndex = 27;
+ this.Label56.TabIndex = 18;
this.Label56.Text = "x";
//
// lbl_Aspect
@@ -1949,10 +1961,10 @@ namespace Handbrake
this.lbl_Aspect.AutoSize = true;
this.lbl_Aspect.BackColor = System.Drawing.Color.Transparent;
this.lbl_Aspect.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lbl_Aspect.Location = new System.Drawing.Point(412, 62);
+ this.lbl_Aspect.Location = new System.Drawing.Point(405, 58);
this.lbl_Aspect.Name = "lbl_Aspect";
this.lbl_Aspect.Size = new System.Drawing.Size(72, 12);
- this.lbl_Aspect.TabIndex = 30;
+ this.lbl_Aspect.TabIndex = 15;
this.lbl_Aspect.Text = "Select a Title";
//
// Label91
@@ -1960,10 +1972,10 @@ namespace Handbrake
this.Label91.AutoSize = true;
this.Label91.BackColor = System.Drawing.Color.Transparent;
this.Label91.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Label91.Location = new System.Drawing.Point(311, 61);
+ this.Label91.Location = new System.Drawing.Point(311, 57);
this.Label91.Name = "Label91";
this.Label91.Size = new System.Drawing.Size(83, 13);
- this.Label91.TabIndex = 29;
+ this.Label91.TabIndex = 14;
this.Label91.Text = "Aspect Ratio:";
//
// Label55
@@ -1972,10 +1984,10 @@ namespace Handbrake
this.Label55.BackColor = System.Drawing.Color.Transparent;
this.Label55.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label55.ForeColor = System.Drawing.Color.Black;
- this.Label55.Location = new System.Drawing.Point(311, 37);
+ this.Label55.Location = new System.Drawing.Point(311, 84);
this.Label55.Name = "Label55";
this.Label55.Size = new System.Drawing.Size(85, 13);
- this.Label55.TabIndex = 25;
+ this.Label55.TabIndex = 16;
this.Label55.Text = "Width/Height:";
//
// check_vfr
@@ -1983,10 +1995,10 @@ namespace Handbrake
this.check_vfr.AutoSize = true;
this.check_vfr.BackColor = System.Drawing.Color.Transparent;
this.check_vfr.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_vfr.Location = new System.Drawing.Point(413, 143);
+ this.check_vfr.Location = new System.Drawing.Point(413, 169);
this.check_vfr.Name = "check_vfr";
this.check_vfr.Size = new System.Drawing.Size(48, 17);
- this.check_vfr.TabIndex = 23;
+ this.check_vfr.TabIndex = 24;
this.check_vfr.Text = "VFR";
this.check_vfr.UseVisualStyleBackColor = false;
this.check_vfr.CheckedChanged += new System.EventHandler(this.check_vfr_CheckedChanged);
@@ -1996,10 +2008,10 @@ namespace Handbrake
this.label24.AutoSize = true;
this.label24.BackColor = System.Drawing.Color.Transparent;
this.label24.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label24.Location = new System.Drawing.Point(311, 120);
+ this.label24.Location = new System.Drawing.Point(311, 146);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(49, 13);
- this.label24.TabIndex = 13;
+ this.label24.TabIndex = 22;
this.label24.Text = "Filters";
//
// drp_deNoise
@@ -2012,20 +2024,20 @@ namespace Handbrake
"Weak",
"Medium",
"Strong"});
- this.drp_deNoise.Location = new System.Drawing.Point(413, 218);
+ this.drp_deNoise.Location = new System.Drawing.Point(413, 244);
this.drp_deNoise.Name = "drp_deNoise";
this.drp_deNoise.Size = new System.Drawing.Size(161, 21);
- this.drp_deNoise.TabIndex = 19;
+ this.drp_deNoise.TabIndex = 29;
//
// label11
//
this.label11.AutoSize = true;
this.label11.BackColor = System.Drawing.Color.Transparent;
this.label11.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label11.Location = new System.Drawing.Point(311, 221);
+ this.label11.Location = new System.Drawing.Point(311, 247);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(58, 13);
- this.label11.TabIndex = 18;
+ this.label11.TabIndex = 28;
this.label11.Text = "Denoise:";
//
// check_deblock
@@ -2033,10 +2045,10 @@ namespace Handbrake
this.check_deblock.AutoSize = true;
this.check_deblock.BackColor = System.Drawing.Color.Transparent;
this.check_deblock.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_deblock.Location = new System.Drawing.Point(314, 166);
+ this.check_deblock.Location = new System.Drawing.Point(314, 192);
this.check_deblock.Name = "check_deblock";
this.check_deblock.Size = new System.Drawing.Size(72, 17);
- this.check_deblock.TabIndex = 15;
+ this.check_deblock.TabIndex = 25;
this.check_deblock.Text = "Deblock";
this.check_deblock.UseVisualStyleBackColor = false;
//
@@ -2045,10 +2057,10 @@ namespace Handbrake
this.check_detelecine.AutoSize = true;
this.check_detelecine.BackColor = System.Drawing.Color.Transparent;
this.check_detelecine.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.check_detelecine.Location = new System.Drawing.Point(314, 143);
+ this.check_detelecine.Location = new System.Drawing.Point(314, 169);
this.check_detelecine.Name = "check_detelecine";
this.check_detelecine.Size = new System.Drawing.Size(86, 17);
- this.check_detelecine.TabIndex = 14;
+ this.check_detelecine.TabIndex = 23;
this.check_detelecine.Text = "Detelecine";
this.check_detelecine.UseVisualStyleBackColor = false;
//
@@ -2057,10 +2069,10 @@ namespace Handbrake
this.label4.AutoSize = true;
this.label4.BackColor = System.Drawing.Color.Transparent;
this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label4.Location = new System.Drawing.Point(311, 193);
+ this.label4.Location = new System.Drawing.Point(311, 219);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(77, 13);
- this.label4.TabIndex = 16;
+ this.label4.TabIndex = 26;
this.label4.Text = "Deinterlace:";
//
// drp_deInterlace_option
@@ -2073,10 +2085,10 @@ namespace Handbrake
"Fast",
"Slow",
"Slower"});
- this.drp_deInterlace_option.Location = new System.Drawing.Point(413, 190);
+ this.drp_deInterlace_option.Location = new System.Drawing.Point(413, 216);
this.drp_deInterlace_option.Name = "drp_deInterlace_option";
this.drp_deInterlace_option.Size = new System.Drawing.Size(161, 21);
- this.drp_deInterlace_option.TabIndex = 17;
+ this.drp_deInterlace_option.TabIndex = 27;
//
// Label1
//
@@ -2094,7 +2106,7 @@ namespace Handbrake
this.Label53.AutoSize = true;
this.Label53.BackColor = System.Drawing.Color.Transparent;
this.Label53.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Label53.Location = new System.Drawing.Point(130, 174);
+ this.Label53.Location = new System.Drawing.Point(94, 154);
this.Label53.Name = "Label53";
this.Label53.Size = new System.Drawing.Size(48, 13);
this.Label53.TabIndex = 10;
@@ -2105,7 +2117,7 @@ namespace Handbrake
this.Label52.AutoSize = true;
this.Label52.BackColor = System.Drawing.Color.Transparent;
this.Label52.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Label52.Location = new System.Drawing.Point(139, 89);
+ this.Label52.Location = new System.Drawing.Point(103, 69);
this.Label52.Name = "Label52";
this.Label52.Size = new System.Drawing.Size(28, 13);
this.Label52.TabIndex = 5;
@@ -2116,10 +2128,10 @@ namespace Handbrake
this.Label51.AutoSize = true;
this.Label51.BackColor = System.Drawing.Color.Transparent;
this.Label51.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Label51.Location = new System.Drawing.Point(237, 128);
+ this.Label51.Location = new System.Drawing.Point(190, 108);
this.Label51.Name = "Label51";
this.Label51.Size = new System.Drawing.Size(36, 13);
- this.Label51.TabIndex = 12;
+ this.Label51.TabIndex = 8;
this.Label51.Text = "Right";
//
// Label50
@@ -2138,10 +2150,10 @@ namespace Handbrake
this.Label15.AutoSize = true;
this.Label15.BackColor = System.Drawing.Color.Transparent;
this.Label15.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Label15.Location = new System.Drawing.Point(43, 128);
+ this.Label15.Location = new System.Drawing.Point(13, 108);
this.Label15.Name = "Label15";
this.Label15.Size = new System.Drawing.Size(28, 13);
- this.Label15.TabIndex = 7;
+ this.Label15.TabIndex = 3;
this.Label15.Text = "Left";
//
// drp_crop
@@ -2153,10 +2165,10 @@ namespace Handbrake
"Automatic",
"Custom",
"No Crop"});
- this.drp_crop.Location = new System.Drawing.Point(118, 34);
+ this.drp_crop.Location = new System.Drawing.Point(103, 34);
this.drp_crop.Name = "drp_crop";
this.drp_crop.Size = new System.Drawing.Size(123, 21);
- this.drp_crop.TabIndex = 3;
+ this.drp_crop.TabIndex = 2;
this.drp_crop.SelectedIndexChanged += new System.EventHandler(this.drp_crop_SelectedIndexChanged);
//
// Check_ChapterMarkers
@@ -2872,13 +2884,17 @@ namespace Handbrake
//
this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripDropDownButton1,
+ this.toolStripSeparator10,
this.btn_start,
- this.toolStripSeparator1,
this.btn_add2Queue,
this.btn_showQueue,
this.toolStripSeparator4,
this.btn_ActivityWindow,
- this.toolStripSeparator8});
+ this.toolStripSeparator8,
+ this.btn_minimize,
+ this.toolStripSeparator9,
+ this.lbl_encode});
this.toolStrip1.Location = new System.Drawing.Point(0, 24);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
@@ -2886,6 +2902,37 @@ namespace Handbrake
this.toolStrip1.TabIndex = 13;
this.toolStrip1.Text = "toolStrip1";
//
+ // toolStripDropDownButton1
+ //
+ this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.btn_dvd_source,
+ this.btn_file_source});
+ this.toolStripDropDownButton1.Image = global::Handbrake.Properties.Resources.Movies;
+ this.toolStripDropDownButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
+ this.toolStripDropDownButton1.Size = new System.Drawing.Size(85, 36);
+ this.toolStripDropDownButton1.Text = "Source";
+ //
+ // btn_dvd_source
+ //
+ this.btn_dvd_source.Name = "btn_dvd_source";
+ this.btn_dvd_source.Size = new System.Drawing.Size(197, 22);
+ this.btn_dvd_source.Text = "DVD / VIDEO_TS Folder";
+ this.btn_dvd_source.Click += new System.EventHandler(this.btn_dvd_source_Click);
+ //
+ // btn_file_source
+ //
+ this.btn_file_source.Name = "btn_file_source";
+ this.btn_file_source.Size = new System.Drawing.Size(197, 22);
+ this.btn_file_source.Text = "Video File";
+ this.btn_file_source.Click += new System.EventHandler(this.btn_file_source_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;
@@ -2897,11 +2944,6 @@ namespace Handbrake
this.btn_start.ToolTipText = "Start the encoding process";
this.btn_start.Click += new System.EventHandler(this.btn_start_Click);
//
- // toolStripSeparator1
- //
- this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(6, 39);
- //
// btn_add2Queue
//
this.btn_add2Queue.Image = global::Handbrake.Properties.Resources.AddToQueue;
@@ -2946,12 +2988,42 @@ namespace Handbrake
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")));
+ this.btn_minimize.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btn_minimize.Name = "btn_minimize";
+ this.btn_minimize.Size = new System.Drawing.Size(122, 36);
+ this.btn_minimize.Text = "Minimize To Taskbar";
+ this.btn_minimize.Click += new System.EventHandler(this.btn_minimize_Click);
+ //
+ // 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);
+ //
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(931, 617);
- this.Controls.Add(this.lbl_encode);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox_dest);
@@ -2965,6 +3037,7 @@ namespace Handbrake
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Handbrake";
+ notifyIconMenu.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.data_chpt)).EndInit();
this.frmMainMenu.ResumeLayout(false);
@@ -3040,7 +3113,6 @@ namespace Handbrake
internal System.Windows.Forms.ComboBox drp_videoEncoder;
internal System.Windows.Forms.Label Label47;
internal System.Windows.Forms.TextBox text_destination;
- private System.Windows.Forms.Label lbl_encode;
internal System.Windows.Forms.TabPage TabPage2;
internal System.Windows.Forms.ComboBox drp_audmix_1;
internal System.Windows.Forms.ComboBox drp_track1Audio;
@@ -3062,8 +3134,6 @@ namespace Handbrake
internal System.Windows.Forms.Label Label42;
internal System.Windows.Forms.TabPage TabPage1;
internal System.Windows.Forms.CheckBox Check_ChapterMarkers;
- internal System.Windows.Forms.Label lbl_RecomendedCrop;
- internal System.Windows.Forms.Label Label8;
internal System.Windows.Forms.Label Label1;
internal System.Windows.Forms.Label Label53;
internal System.Windows.Forms.Label Label52;
@@ -3123,13 +3193,11 @@ namespace Handbrake
private System.Windows.Forms.Label label34;
internal System.Windows.Forms.Button btn_generate_Query;
internal System.Windows.Forms.Label label33;
- private System.Windows.Forms.RichTextBox rtf_query;
internal System.Windows.Forms.Button btn_clear;
internal System.Windows.Forms.Button btn_copy2C;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton btn_start;
private System.Windows.Forms.ToolStripButton btn_add2Queue;
- private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton btn_showQueue;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripButton btn_ActivityWindow;
@@ -3198,8 +3266,6 @@ namespace Handbrake
private System.Windows.Forms.DataGridViewTextBoxColumn name;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.GroupBox groupBox5;
- private System.Windows.Forms.CheckBox check_fileMode;
- private System.Windows.Forms.Button btn_Browse;
private System.Windows.Forms.Button btn_destBrowse;
internal System.Windows.Forms.TrackBar trackBar1;
internal System.Windows.Forms.Label lbl_drc4;
@@ -3223,6 +3289,20 @@ namespace Handbrake
internal System.Windows.Forms.Label label16;
internal System.Windows.Forms.Label lbl_drc1;
internal System.Windows.Forms.TreeView treeView_presets;
+ internal System.Windows.Forms.RichTextBox rtf_query;
+ private System.Windows.Forms.NotifyIcon notifyIcon;
+ private System.Windows.Forms.ToolStripButton btn_minimize;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
+ private System.Windows.Forms.ToolStripMenuItem btn_restore;
+ internal System.Windows.Forms.Label lbl_src_res;
+ internal System.Windows.Forms.Label label7;
+ internal System.Windows.Forms.Label lbl_duration;
+ internal System.Windows.Forms.Label label_duration;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
+ private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1;
+ private System.Windows.Forms.ToolStripMenuItem btn_dvd_source;
+ private System.Windows.Forms.ToolStripMenuItem btn_file_source;
+ private System.Windows.Forms.ToolStripLabel lbl_encode;
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 8db694d83..4328c2090 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -20,19 +20,20 @@ namespace Handbrake
{
public partial class frmMain : Form
{
- // --------------------------------------------------------------
- // Applicaiton Startup
- // --------------------------------------------------------------
- #region Application Startup
-
- // Declarations
- private Process hbProc;
+ // Declarations *******************************************************
+ Functions.Common hb_common_func = new Functions.Common();
+ Functions.x264Panel x264PanelFunctions = new Functions.x264Panel();
+ Functions.CLI cliObj = new Functions.CLI();
+ Parsing.Title selectedTitle;
+ internal Process hbProc;
private Parsing.DVD thisDVD;
private frmQueue queueWindow = new frmQueue();
private delegate void updateStatusChanger();
- Functions.Common hb_common_func = new Functions.Common();
- Functions.x264Panel x264PanelFunctions = new Functions.x264Panel();
+
+ // Applicaiton Startup ************************************************
+
+ #region Application Startup
public frmMain()
{
@@ -115,6 +116,10 @@ namespace Handbrake
// Turn the interface back to the user
this.Enabled = true;
+
+ // Some event Handlers.
+ this.Resize += new EventHandler(frmMain_Resize);
+
}
// Startup Functions
@@ -150,7 +155,6 @@ namespace Handbrake
Form splash = new frmSplashScreen();
splash.Show();
}
-
private void setupH264Panel()
{
/*Set opt widget values here*/
@@ -276,7 +280,6 @@ namespace Handbrake
/* Standardize the option string */
rtf_x264Query.Text = "";
}
-
private void loadUserDefaults()
{
string userDefaults = Properties.Settings.Default.defaultUserSettings;
@@ -294,9 +297,7 @@ namespace Handbrake
#endregion
- // --------------------------------------------------------------
- // The Applications Main Menu
- // --------------------------------------------------------------
+ // The Applications Main Menu *****************************************
#region File Menu
@@ -345,7 +346,7 @@ namespace Handbrake
}
private void mnu_viewDVDdata_Click(object sender, EventArgs e)
{
- frmActivityWindow dvdInfoWindow = new frmActivityWindow("dvdinfo.dat");
+ frmActivityWindow dvdInfoWindow = new frmActivityWindow("dvdinfo.dat", this, queueWindow);
dvdInfoWindow.Show();
}
private void mnu_options_Click(object sender, EventArgs e)
@@ -361,7 +362,7 @@ namespace Handbrake
private void mnu_presetReset_Click(object sender, EventArgs e)
{
treeView_presets.Nodes.Clear();
- grabCLIPresets();
+ cliObj.grabCLIPresets();
loadPresetPanel();
if (treeView_presets.Nodes.Count == 0)
MessageBox.Show("Unable to load the presets.dat file. Please select \"Update Built-in Presets\" from the Presets Menu \nMake sure you are running the program in Admin mode if running on Vista. See Windows FAQ for details!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
@@ -412,16 +413,14 @@ namespace Handbrake
#endregion
- // --------------------------------------------------------------
- // MainWindow Components, Actions and Functions
- // --------------------------------------------------------------
+ // MainWindow Components, Actions and Functions ***********************
#region Actions
// ToolBar
private void btn_start_Click(object sender, EventArgs e)
{
- if (text_source.Text == "" || text_source.Text == "Click 'Browse' to continue" || text_destination.Text == "")
+ if (text_source.Text == "" || text_source.Text == "Click 'Source' to continue" || text_destination.Text == "")
MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
{
@@ -438,7 +437,7 @@ namespace Handbrake
}
private void btn_add2Queue_Click(object sender, EventArgs e)
{
- if (text_source.Text == "" || text_source.Text == "Click 'Browse' to continue" || text_destination.Text == "")
+ if (text_source.Text == "" || text_source.Text == "Click 'Source' to continue" || text_destination.Text == "")
MessageBox.Show("No source OR destination selected.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
{
@@ -458,26 +457,45 @@ namespace Handbrake
}
private void btn_ActivityWindow_Click(object sender, EventArgs e)
{
- frmActivityWindow ActivityWindow = new frmActivityWindow("hb_encode_log.dat");
+ frmActivityWindow ActivityWindow = new frmActivityWindow("hb_encode_log.dat", this, queueWindow);
ActivityWindow.Show();
}
//Source
- private void btn_Browse_Click(object sender, EventArgs e)
+ private void btn_dvd_source_Click(object sender, EventArgs e)
{
String filename = "";
text_source.Text = "";
- if (check_fileMode.Checked)
- {
- ISO_Open.ShowDialog();
- filename = ISO_Open.FileName;
- }
+ DVD_Open.ShowDialog();
+ filename = DVD_Open.SelectedPath;
+
+ if (filename.StartsWith("\\"))
+ MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
{
- DVD_Open.ShowDialog();
- filename = DVD_Open.SelectedPath;
+ if (filename != "")
+ {
+ Form frmRD = new frmReadDVD(filename, this);
+ text_source.Text = filename;
+ frmRD.ShowDialog();
+ }
+ else
+ text_source.Text = "Click 'Source' to continue";
+
+ // If there are no titles in the dropdown menu then the scan has obviously failed. Display an error message explaining to the user.
+ if (drp_dvdtitle.Items.Count == 0)
+ MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ (see Help Menu).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+
}
+ }
+ private void btn_file_source_Click(object sender, EventArgs e)
+ {
+ String filename = "";
+ text_source.Text = "";
+
+ ISO_Open.ShowDialog();
+ filename = ISO_Open.FileName;
if (filename.StartsWith("\\"))
MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
@@ -490,7 +508,7 @@ namespace Handbrake
frmRD.ShowDialog();
}
else
- text_source.Text = "Click 'Browse' to continue";
+ text_source.Text = "Click 'Source' to continue";
// If there are no titles in the dropdown menu then the scan has obviously failed. Display an error message explaining to the user.
if (drp_dvdtitle.Items.Count == 0)
@@ -498,16 +516,18 @@ namespace Handbrake
}
}
+
+
private void drp_dvdtitle_Click(object sender, EventArgs e)
{
if ((drp_dvdtitle.Items.Count == 1) && (drp_dvdtitle.Items[0].ToString() == "Automatic"))
- MessageBox.Show("There are no titles to select. Please scan the DVD by clicking the 'browse' button above before trying to select a title.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
+ MessageBox.Show("There are no titles to select. Please scan the DVD by clicking the 'Source' button above before trying to select a title.", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
private void drp_dvdtitle_SelectedIndexChanged(object sender, EventArgs e)
{
// Reset some values on the form
lbl_Aspect.Text = "Select a Title";
- lbl_RecomendedCrop.Text = "Select a Title";
+ //lbl_RecomendedCrop.Text = "Select a Title";
drop_chapterStart.Items.Clear();
drop_chapterFinish.Items.Clear();
@@ -515,13 +535,15 @@ namespace Handbrake
// Otheriwse if its not, title data has to be loased from parsing.
if (drp_dvdtitle.Text != "Automatic")
{
- Parsing.Title selectedTitle = drp_dvdtitle.SelectedItem as Parsing.Title;
+ selectedTitle = drp_dvdtitle.SelectedItem as Parsing.Title;
// Set the Aspect Ratio
lbl_Aspect.Text = selectedTitle.AspectRatio.ToString();
+ lbl_src_res.Text = selectedTitle.Resolution.Width + " x " + selectedTitle.Resolution.Height;
+ lbl_duration.Text = selectedTitle.Duration.ToString();
// Set the Recommended Cropping values
- lbl_RecomendedCrop.Text = string.Format("{0}/{1}/{2}/{3}", selectedTitle.AutoCropDimensions[0], selectedTitle.AutoCropDimensions[1], selectedTitle.AutoCropDimensions[2], selectedTitle.AutoCropDimensions[3]);
+ //lbl_RecomendedCrop.Text = string.Format("{0}/{1}/{2}/{3}", selectedTitle.AutoCropDimensions[0], selectedTitle.AutoCropDimensions[1], selectedTitle.AutoCropDimensions[2], selectedTitle.AutoCropDimensions[3]);
// Populate the Start chapter Dropdown
drop_chapterStart.Items.Clear();
@@ -573,6 +595,8 @@ namespace Handbrake
}
private void drop_chapterStart_SelectedIndexChanged(object sender, EventArgs e)
{
+ calculateDuration();
+
drop_chapterStart.BackColor = Color.White;
if ((drop_chapterFinish.Text != "Auto") && (drop_chapterStart.Text != "Auto"))
{
@@ -594,6 +618,8 @@ namespace Handbrake
}
private void drop_chapterFinish_SelectedIndexChanged(object sender, EventArgs e)
{
+ calculateDuration();
+
drop_chapterFinish.BackColor = Color.White;
if ((drop_chapterFinish.Text != "Auto") && (drop_chapterStart.Text != "Auto"))
{
@@ -732,19 +758,13 @@ namespace Handbrake
text_width.BackColor = Color.LightGreen;
- if ((lbl_Aspect.Text != "Select a Title") && (drp_crop.SelectedIndex == 2))
+ if (lbl_Aspect.Text != "Select a Title")
{
- double height = int.Parse(text_width.Text) / double.Parse(lbl_Aspect.Text);
- double mod16 = height % 16;
- height = height - mod16;
-
- if (text_width.Text == "")
+ if (drp_anamorphic.Text == "None")
{
- text_height.Text = "";
- text_width.BackColor = Color.White;
- }
- else
+ int height = cacluateNonAnamorphicHeight(int.Parse(text_width.Text));
text_height.Text = height.ToString();
+ }
}
}
catch (Exception)
@@ -787,14 +807,12 @@ namespace Handbrake
text_top.Enabled = false;
text_bottom.Enabled = false;
- if (lbl_RecomendedCrop.Text != "Select a Title")
+ if ((drp_dvdtitle.Text != "Automatic") && (selectedTitle != null))
{
- string[] temp = new string[4];
- temp = lbl_RecomendedCrop.Text.Split('/');
- text_left.Text = temp[2];
- text_right.Text = temp[3];
- text_top.Text = temp[0];
- text_bottom.Text = temp[1];
+ text_top.Text = selectedTitle.AutoCropDimensions[0].ToString();
+ text_bottom.Text = selectedTitle.AutoCropDimensions[1].ToString();
+ text_left.Text = selectedTitle.AutoCropDimensions[2].ToString();
+ text_right.Text = selectedTitle.AutoCropDimensions[3].ToString();
}
else
{
@@ -803,6 +821,7 @@ namespace Handbrake
text_top.Text = "";
text_bottom.Text = "";
}
+
}
if ((string)drp_crop.SelectedItem == "No Crop")
@@ -933,7 +952,7 @@ namespace Handbrake
drp_audenc_4.Text = "";
drp_audsr_4.Text = "";
drp_audmix_4.Text = "Automatic";
-
+
}
else
{
@@ -954,7 +973,7 @@ namespace Handbrake
drp_audsr_4.Text = "";
drp_audmix_4.Text = "Automatic";
}
-
+
}
private void drp_track4Audio_SelectedIndexChanged(object sender, EventArgs e)
{
@@ -1526,6 +1545,82 @@ namespace Handbrake
this.thisDVD = dvd;
}
+ // Chapter Selection Duration calculation
+ public void calculateDuration()
+ {
+
+ int start_chapter;
+ int end_chapter;
+ TimeSpan Duration = TimeSpan.FromSeconds(0.0);
+
+ try
+ {
+ // Get the durations between the 2 chapter points and add them together.
+ if (drop_chapterStart.Text != "Auto" && drop_chapterFinish.Text != "Auto")
+ {
+ start_chapter = int.Parse(drop_chapterStart.Text);
+ end_chapter = int.Parse(drop_chapterFinish.Text);
+
+ int position = start_chapter - 1;
+
+ while (position != end_chapter)
+ {
+ TimeSpan dur = selectedTitle.Chapters[position].Duration;
+ Duration = Duration + dur;
+ position++;
+ }
+ }
+ }
+ catch (Exception)
+ {
+ // Don't do anything
+ }
+
+ // Set the Duration
+ lbl_duration.Text = Duration.ToString();
+ }
+ public int cacluateNonAnamorphicHeight(int width)
+ {
+ float aspect = selectedTitle.AspectRatio;
+ int aw;
+ int ah;
+ if (aspect.ToString() == "1.78")
+ {
+ aw = 16;
+ ah = 9;
+ }
+ else
+ {
+ aw = 4;
+ ah = 3;
+ }
+
+ double a = width * selectedTitle.Resolution.Width * ah * (selectedTitle.Resolution.Height - (double)text_top.Value - (double)text_bottom.Value);
+ double b = selectedTitle.Resolution.Height * aw * (selectedTitle.Resolution.Width - (double)text_left.Value - (double)text_right.Value);
+
+ double y = a / b;
+
+ // If it's not Mod 16, make it mod 16
+ if ((y % 16) != 0)
+ {
+ double mod16 = y % 16;
+ if (mod16 >= 8)
+ {
+ mod16 = 16 - mod16;
+ y = y + mod16;
+ }
+ else
+ {
+ y = y - mod16;
+ }
+ }
+
+ //16 * (421 / 16)
+ //double z = ( 16 * (( y + 8 ) / 16 ) );
+ int x = int.Parse(y.ToString());
+ return x;
+ }
+
// Audio system functions
private void setAudioByContainer(String path)
{
@@ -1793,16 +1888,6 @@ namespace Handbrake
treeView_presets.Nodes.Add(preset_treeview);
}
}
- private void grabCLIPresets()
- {
- // Gets the presets from the CLI and stores them in presets.dat
- string appPath = Application.StartupPath.ToString() + "\\";
- string strCmdLine = "cmd /c " + '"' + '"' + appPath + "HandBrakeCLI.exe" + '"' + " --preset-list >" + '"' + appPath + "presets.dat" + '"' + " 2>&1" + '"';
- Process hbproc = Process.Start("CMD.exe", strCmdLine);
- hbproc.WaitForExit();
- hbproc.Dispose();
- hbproc.Close();
- }
private void loadNormalPreset()
{
//Loads the preset called "normal"
@@ -1914,13 +1999,8 @@ namespace Handbrake
#region Encoding and Queue
// Declarations
- Functions.CLI process = new Functions.CLI();
private delegate void UpdateUIHandler();
- [DllImport("user32.dll")]
- public static extern void LockWorkStation();
- [DllImport("user32.dll")]
- public static extern int ExitWindowsEx(int uFlags, int dwReason);
-
+
// Encoding Functions
private void procMonitor(object state)
{
@@ -1929,36 +2009,21 @@ namespace Handbrake
MessageBox.Show("Handbrake is already encoding a video!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
{
- hbProc = process.runCli(this, (string)state, false, false, false, false);
+ hbProc = cliObj.runCli(this, (string)state);
hbProc.WaitForExit();
setEncodeLabelFinished();
hbProc = null;
- // Do something whent he encode ends.
- switch (Properties.Settings.Default.CompletionOption)
+ // If the window is minimized, display the notification in a popup.
+ if (FormWindowState.Minimized == this.WindowState)
{
- case "Shutdown":
- System.Diagnostics.Process.Start("Shutdown", "-s -t 60");
- break;
- case "Log Off":
- ExitWindowsEx(0, 0);
- break;
- case "Suspend":
- Application.SetSuspendState(PowerState.Suspend, true, true);
- break;
- case "Hibernate":
- Application.SetSuspendState(PowerState.Hibernate, true, true);
- break;
- case "Lock System":
- LockWorkStation();
- break;
- case "Quit HandBrake":
- Application.Exit();
- break;
- default:
- break;
+ notifyIcon.BalloonTipText = lbl_encode.Text;
+ notifyIcon.ShowBalloonTip(500);
}
+
+ // After the encode is done, we may want to shutdown, suspend etc.
+ cliObj.afterEncodeAction();
}
}
private void setEncodeLabelFinished()
@@ -1970,10 +2035,56 @@ namespace Handbrake
}
lbl_encode.Text = "Encoding Finished";
}
+ public Boolean isEncoding()
+ {
+ if (hbProc == null)
+ return false;
+ else
+ return true;
+ }
#endregion
-
-
+
+ #region Taskbar
+ private void frmMain_Resize(object sender, EventArgs e)
+ {
+ if (FormWindowState.Minimized == this.WindowState)
+ {
+ notifyIcon.Visible = true;
+ notifyIcon.BalloonTipText = lbl_encode.Text;
+ notifyIcon.ShowBalloonTip(500);
+ this.Hide();
+ }
+ else if (FormWindowState.Normal == this.WindowState)
+ {
+ notifyIcon.Visible = false;
+ }
+ }
+
+ private void notifyIcon_MouseDoubleClick(object sender, MouseEventArgs e)
+ {
+ this.Visible = true;
+ this.Activate();
+ this.WindowState = FormWindowState.Normal;
+ notifyIcon.Visible = false;
+ }
+
+ private void btn_minimize_Click(object sender, EventArgs e)
+ {
+ this.WindowState = FormWindowState.Minimized;
+ }
+
+ private void btn_restore_Click(object sender, EventArgs e)
+ {
+ this.Visible = true;
+ this.Activate();
+ this.WindowState = FormWindowState.Normal;
+ notifyIcon.Visible = false;
+ }
+
+ #endregion
+
+
// This is the END of the road ------------------------------------------------------------------------------
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx
index e9b8e49f4..bf77a09c5 100644
--- a/win/C#/frmMain.resx
+++ b/win/C#/frmMain.resx
@@ -120,6 +120,12 @@
<metadata name="Label38.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
+ <metadata name="notifyIconMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>931, 18</value>
+ </metadata>
+ <metadata name="notifyIconMenu.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>False</value>
+ </metadata>
<metadata name="DVD_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>529, 18</value>
</metadata>
@@ -149,12 +155,6 @@ Make sure you have selected a "Title" from the "Source" box above otherwise
the list will not be populated with the correct amount of chapters.
Note: Do not change any of the chapter numbers!</value>
</data>
- <metadata name="number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
<metadata name="DVD_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>223, 15</value>
</metadata>
@@ -188,6 +188,403 @@ Note: Do not change any of the chapter numbers!</value>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>731, 18</value>
</metadata>
+ <data name="btn_minimize.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
+ U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI
+ VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ
+ QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4
+ /g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9
+ cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j
+ 3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR
+ dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
+ NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
+ s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
+</value>
+ </data>
+ <metadata name="notifyIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>830, 18</value>
+ </metadata>
+ <data name="notifyIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA
+ IACoJQAAHh0AAC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adata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>56</value>
</metadata>
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 280d48bed..37c646256 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -22,14 +22,25 @@ namespace Handbrake
{
private delegate void ProgressUpdateHandler();
private delegate void setEncoding();
+ Functions.CLI cliObj = new Functions.CLI();
+ Boolean cancel = false;
+ Process hbProc = null;
public frmQueue()
{
- InitializeComponent();
+ InitializeComponent();
}
- #region Queue Handling
- Boolean cancel = false;
+
+ #region Queue / Handling
+
+ public Boolean isEncoding()
+ {
+ if (hbProc == null)
+ return false;
+ else
+ return true;
+ }
private void btn_encode_Click(object sender, EventArgs e)
{
@@ -73,27 +84,24 @@ namespace Handbrake
MessageBox.Show("No further items on the queue will start. The current encode process will continue until it is finished. \nClick 'Encode Video' when you wish to continue encoding the queue.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
- [DllImport("user32.dll")]
- public static extern void LockWorkStation();
- [DllImport("user32.dll")]
- public static extern int ExitWindowsEx(int uFlags, int dwReason);
-
private void startProc(object state)
{
try
{
+
while (list_queue.Items.Count != 0)
{
string query = list_queue.Items[0].ToString();
setEncValue();
updateUIElements();
-
- Functions.CLI process = new Functions.CLI();
- Process hbProc = process.runCli(this, query, false, false, false, false);
+
+
+ hbProc = cliObj.runCli(this, query);
hbProc.WaitForExit();
hbProc.Close();
hbProc.Dispose();
+ hbProc = null;
query = "";
@@ -104,31 +112,10 @@ namespace Handbrake
}
resetQueue();
-
- // Do something whent he encode ends.
- switch (Properties.Settings.Default.CompletionOption)
- {
- case "Shutdown":
- System.Diagnostics.Process.Start("Shutdown", "-s -t 60");
- break;
- case "Log Off":
- ExitWindowsEx(0, 0);
- break;
- case "Suspend":
- Application.SetSuspendState(PowerState.Suspend, true, true);
- break;
- case "Hibernate":
- Application.SetSuspendState(PowerState.Hibernate, true, true);
- break;
- case "Lock System":
- LockWorkStation();
- break;
- case "Quit HandBrake":
- Application.Exit();
- break;
- default:
- break;
- }
+
+
+ // After the encode is done, we may want to shutdown, suspend etc.
+ cliObj.afterEncodeAction();
}
catch (Exception exc)
{
@@ -244,9 +231,17 @@ namespace Handbrake
}
}
+ private void list_queue_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (list_queue.SelectedItem != null)
+ text_edit.Text = list_queue.SelectedItem.ToString();
+
+ listCount = list_queue.Items.Count;
+ }
+
#endregion
- #region Queue Management
+ #region Buttons
private void btn_up_Click(object sender, EventArgs e)
{
@@ -287,47 +282,13 @@ namespace Handbrake
list_queue.Items.Remove(list_queue.SelectedItem);
}
- #endregion
-
- #region Queue Item Modification
-
- int listCount = 0;
-
- private void btn_updateQuery_Click(object sender, EventArgs e)
- {
- if (text_edit.Text != "")
- {
- if (list_queue.Items.Count != listCount)
- {
- MessageBox.Show("Unable to modify the selected item. The number of items on the list has changed. \nPlease avoid modifying an item when a new encode is about to start!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- }
- else
- {
- if (list_queue.SelectedItem != null)
- list_queue.Items[list_queue.SelectedIndex] = text_edit.Text;
-
- }
- }
- }
-
- private void list_queue_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (list_queue.SelectedItem != null)
- text_edit.Text = list_queue.SelectedItem.ToString();
-
- listCount = list_queue.Items.Count;
- }
-
- #endregion
-
- #region Queue Save & Batch Script
private void btn_batch_Click(object sender, EventArgs e)
{
string queries = "";
for (int i = 0; i < list_queue.Items.Count; i++)
{
string query = list_queue.Items[i].ToString();
- string fullQuery = '"' + Application.StartupPath.ToString()+ "\\HandBrakeCLI.exe"+ '"' + query;
+ string fullQuery = '"' + Application.StartupPath.ToString() + "\\HandBrakeCLI.exe" + '"' + query;
if (queries == "")
queries = queries + fullQuery;
@@ -362,20 +323,37 @@ namespace Handbrake
}
}
- #endregion
+ int listCount = 0;
+ private void btn_updateQuery_Click(object sender, EventArgs e)
+ {
+ if (text_edit.Text != "")
+ {
+ if (list_queue.Items.Count != listCount)
+ {
+ MessageBox.Show("Unable to modify the selected item. The number of items on the list has changed. \nPlease avoid modifying an item when a new encode is about to start!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ }
+ else
+ {
+ if (list_queue.SelectedItem != null)
+ list_queue.Items[list_queue.SelectedIndex] = text_edit.Text;
+
+ }
+ }
+ }
- #region other
private void btn_Close_Click(object sender, EventArgs e)
{
this.Hide();
}
+ #endregion
+
protected override void OnClosing(CancelEventArgs e)
{
e.Cancel = true;
this.Hide();
base.OnClosing(e);
}
- #endregion
+
}
} \ No newline at end of file
diff --git a/win/C#/frmReadDVD.cs b/win/C#/frmReadDVD.cs
index d825d1c56..1b1d70e1a 100644
--- a/win/C#/frmReadDVD.cs
+++ b/win/C#/frmReadDVD.cs
@@ -25,6 +25,7 @@ namespace Handbrake
private frmMain mainWindow;
private Parsing.DVD thisDvd;
private delegate void UpdateUIHandler();
+ Functions.Common hb_common_func = new Functions.Common();
public frmReadDVD(string inputFile, frmMain parent)
{
@@ -67,40 +68,9 @@ namespace Handbrake
mainWindow.drop_chapterStart.Text = "Auto";
// Now select the longest title
- int current_largest = 0;
- Handbrake.Parsing.Title title2Select = thisDvd.Titles[0];
+ hb_common_func.selectLongestTitle(mainWindow);
- foreach (Handbrake.Parsing.Title x in thisDvd.Titles)
- {
- string title = x.ToString();
- if (title != "Automatic")
- {
- string[] y = title.Split(' ');
- string time = y[1].Replace("(", "").Replace(")", "");
- string[] z = time.Split(':');
-
- int hours = int.Parse(z[0]) * 60 * 60;
- int minutes = int.Parse(z[1]) * 60;
- int seconds = int.Parse(z[2]);
- int total_sec = hours + minutes + seconds;
-
- if (current_largest == 0)
- {
- current_largest = hours + minutes + seconds;
- title2Select = x;
- }
- else
- {
- if (total_sec > current_largest)
- {
- current_largest = total_sec;
- title2Select = x;
- }
- }
- }
- }
-
- mainWindow.drp_dvdtitle.SelectedItem = title2Select;
+
this.Close();
}