summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2007-08-04 15:50:12 +0000
committersr55 <[email protected]>2007-08-04 15:50:12 +0000
commit34220f3ebb6fd879bd34316b89186013742da301 (patch)
treece0d7b247e7828699bbf6a883597d08336dabc1b
parent04f12fa40082e474793cb0a873c091ed00ae6005 (diff)
WinGui:
- Initial place holders for new presets. - Added a few more code regions. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@786 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/frmMain.Designer.cs76
-rw-r--r--win/C#/frmMain.cs184
2 files changed, 191 insertions, 69 deletions
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 37fc8d1a8..1cd982f8f 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -174,6 +174,13 @@ namespace Handbrake
this.text_right = new System.Windows.Forms.TextBox();
this.text_left = new System.Windows.Forms.TextBox();
this.advancedOptions = new System.Windows.Forms.TabControl();
+ this.mnu_psp = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_Classic = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_qt = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_television = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_film = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_iphone = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_normal = new System.Windows.Forms.ToolStripMenuItem();
Label38 = new System.Windows.Forms.Label();
this.frmMainMenu.SuspendLayout();
this.GroupBox1.SuspendLayout();
@@ -297,7 +304,6 @@ namespace Handbrake
this.btn_Browse.Text = "Browse";
this.ToolTip.SetToolTip(this.btn_Browse, "Step 1 - Select a Source. This can be either a DVD or ts/mpg/iso file");
this.btn_Browse.UseVisualStyleBackColor = true;
- this.btn_Browse.Click += new System.EventHandler(this.btn_Browse_Click);
//
// text_height
//
@@ -545,7 +551,14 @@ namespace Handbrake
this.mnu_preset_ipod178,
this.mnu_preset_ipod235,
this.mnu_appleTv,
+ this.mnu_iphone,
this.mnu_presetPS3,
+ this.mnu_psp,
+ this.mnu_qt,
+ this.mnu_television,
+ this.mnu_film,
+ this.mnu_Classic,
+ this.mnu_normal,
this.ToolStripSeparator4,
this.mnu_ProgramDefaultOptions});
this.PresetsToolStripMenuItem.Name = "PresetsToolStripMenuItem";
@@ -556,21 +569,21 @@ namespace Handbrake
//
this.mnu_preset_ipod133.Name = "mnu_preset_ipod133";
this.mnu_preset_ipod133.Size = new System.Drawing.Size(276, 22);
- this.mnu_preset_ipod133.Text = "iPod (1.33)";
+ this.mnu_preset_ipod133.Text = "iPod (Aspect Ratio 1.33)";
this.mnu_preset_ipod133.Click += new System.EventHandler(this.mnu_preset_ipod133_Click);
//
// mnu_preset_ipod178
//
this.mnu_preset_ipod178.Name = "mnu_preset_ipod178";
this.mnu_preset_ipod178.Size = new System.Drawing.Size(276, 22);
- this.mnu_preset_ipod178.Text = "iPod (1.78)";
+ this.mnu_preset_ipod178.Text = "iPod (Aspect Ratio 1.78)";
this.mnu_preset_ipod178.Click += new System.EventHandler(this.mnu_preset_ipod178_Click);
//
// mnu_preset_ipod235
//
this.mnu_preset_ipod235.Name = "mnu_preset_ipod235";
this.mnu_preset_ipod235.Size = new System.Drawing.Size(276, 22);
- this.mnu_preset_ipod235.Text = "iPod (2.35)";
+ this.mnu_preset_ipod235.Text = "iPod (Aspect Ratio 2.35)";
this.mnu_preset_ipod235.Click += new System.EventHandler(this.mnu_preset_ipod235_Click);
//
// mnu_appleTv
@@ -1792,6 +1805,54 @@ namespace Handbrake
this.advancedOptions.TabIndex = 411;
this.advancedOptions.TabStop = false;
//
+ // mnu_psp
+ //
+ this.mnu_psp.Name = "mnu_psp";
+ this.mnu_psp.Size = new System.Drawing.Size(276, 22);
+ this.mnu_psp.Text = "PSP";
+ this.mnu_psp.Click += new System.EventHandler(this.mnu_psp_Click);
+ //
+ // mnu_Classic
+ //
+ this.mnu_Classic.Name = "mnu_Classic";
+ this.mnu_Classic.Size = new System.Drawing.Size(276, 22);
+ this.mnu_Classic.Text = "Classic";
+ this.mnu_Classic.Click += new System.EventHandler(this.mnu_Classic_Click);
+ //
+ // mnu_qt
+ //
+ this.mnu_qt.Name = "mnu_qt";
+ this.mnu_qt.Size = new System.Drawing.Size(276, 22);
+ this.mnu_qt.Text = "Quicktime";
+ this.mnu_qt.Click += new System.EventHandler(this.mnu_qt_Click);
+ //
+ // mnu_television
+ //
+ this.mnu_television.Name = "mnu_television";
+ this.mnu_television.Size = new System.Drawing.Size(276, 22);
+ this.mnu_television.Text = "Television";
+ this.mnu_television.Click += new System.EventHandler(this.mnu_television_Click);
+ //
+ // mnu_film
+ //
+ this.mnu_film.Name = "mnu_film";
+ this.mnu_film.Size = new System.Drawing.Size(276, 22);
+ this.mnu_film.Text = "Film";
+ this.mnu_film.Click += new System.EventHandler(this.mnu_film_Click);
+ //
+ // mnu_iphone
+ //
+ this.mnu_iphone.Name = "mnu_iphone";
+ this.mnu_iphone.Size = new System.Drawing.Size(276, 22);
+ this.mnu_iphone.Text = "iPhone";
+ //
+ // mnu_normal
+ //
+ this.mnu_normal.Name = "mnu_normal";
+ this.mnu_normal.Size = new System.Drawing.Size(276, 22);
+ this.mnu_normal.Text = "Normal";
+ this.mnu_normal.Click += new System.EventHandler(this.mnu_normal_Click);
+ //
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1980,6 +2041,13 @@ namespace Handbrake
internal System.Windows.Forms.Label label24;
internal System.Windows.Forms.ComboBox drp_deNoise;
internal System.Windows.Forms.Label label11;
+ private System.Windows.Forms.ToolStripMenuItem mnu_iphone;
+ private System.Windows.Forms.ToolStripMenuItem mnu_psp;
+ private System.Windows.Forms.ToolStripMenuItem mnu_qt;
+ private System.Windows.Forms.ToolStripMenuItem mnu_television;
+ private System.Windows.Forms.ToolStripMenuItem mnu_film;
+ private System.Windows.Forms.ToolStripMenuItem mnu_Classic;
+ private System.Windows.Forms.ToolStripMenuItem mnu_normal;
}
} \ No newline at end of file
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index fbe65919c..a46eb5892 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -470,6 +470,110 @@ namespace Handbrake
drp_crop.Text = "No Crop";
}
+ //------------------------------NEW PRESETS START HERE---------------------------
+ private void mnu_normal_Click(object sender, EventArgs e)
+ {
+ CheckPixelRatio.CheckState = CheckState.Unchecked;
+ text_width.Text = "";
+ text_height.Text = "";
+ drp_videoEncoder.Text = "H.264";
+ text_bitrate.Text = "3000";
+ text_filesize.Text = "";
+ slider_videoQuality.Value = 0;
+ SliderValue.Text = "0%";
+ drp_audioBitrate.Text = "160";
+ CheckPixelRatio.CheckState = CheckState.Checked;
+ drp_audioSampleRate.Text = "48";
+ rtf_h264advanced.Text = "level=41";
+ drp_crop.Text = "No Crop";
+ }
+
+ private void mnu_Classic_Click(object sender, EventArgs e)
+ {
+ CheckPixelRatio.CheckState = CheckState.Unchecked;
+ text_width.Text = "";
+ text_height.Text = "";
+ drp_videoEncoder.Text = "H.264";
+ text_bitrate.Text = "3000";
+ text_filesize.Text = "";
+ slider_videoQuality.Value = 0;
+ SliderValue.Text = "0%";
+ drp_audioBitrate.Text = "160";
+ CheckPixelRatio.CheckState = CheckState.Checked;
+ drp_audioSampleRate.Text = "48";
+ rtf_h264advanced.Text = "level=41";
+ drp_crop.Text = "No Crop";
+ }
+
+ private void mnu_film_Click(object sender, EventArgs e)
+ {
+ CheckPixelRatio.CheckState = CheckState.Unchecked;
+ text_width.Text = "";
+ text_height.Text = "";
+ drp_videoEncoder.Text = "H.264";
+ text_bitrate.Text = "3000";
+ text_filesize.Text = "";
+ slider_videoQuality.Value = 0;
+ SliderValue.Text = "0%";
+ drp_audioBitrate.Text = "160";
+ CheckPixelRatio.CheckState = CheckState.Checked;
+ drp_audioSampleRate.Text = "48";
+ rtf_h264advanced.Text = "level=41";
+ drp_crop.Text = "No Crop";
+ }
+
+ private void mnu_television_Click(object sender, EventArgs e)
+ {
+ CheckPixelRatio.CheckState = CheckState.Unchecked;
+ text_width.Text = "";
+ text_height.Text = "";
+ drp_videoEncoder.Text = "H.264";
+ text_bitrate.Text = "3000";
+ text_filesize.Text = "";
+ slider_videoQuality.Value = 0;
+ SliderValue.Text = "0%";
+ drp_audioBitrate.Text = "160";
+ CheckPixelRatio.CheckState = CheckState.Checked;
+ drp_audioSampleRate.Text = "48";
+ rtf_h264advanced.Text = "level=41";
+ drp_crop.Text = "No Crop";
+ }
+
+ private void mnu_qt_Click(object sender, EventArgs e)
+ {
+ CheckPixelRatio.CheckState = CheckState.Unchecked;
+ text_width.Text = "";
+ text_height.Text = "";
+ drp_videoEncoder.Text = "H.264";
+ text_bitrate.Text = "3000";
+ text_filesize.Text = "";
+ slider_videoQuality.Value = 0;
+ SliderValue.Text = "0%";
+ drp_audioBitrate.Text = "160";
+ CheckPixelRatio.CheckState = CheckState.Checked;
+ drp_audioSampleRate.Text = "48";
+ rtf_h264advanced.Text = "level=41";
+ drp_crop.Text = "No Crop";
+ }
+
+ private void mnu_psp_Click(object sender, EventArgs e)
+ {
+ CheckPixelRatio.CheckState = CheckState.Unchecked;
+ text_width.Text = "";
+ text_height.Text = "";
+ drp_videoEncoder.Text = "H.264";
+ text_bitrate.Text = "3000";
+ text_filesize.Text = "";
+ slider_videoQuality.Value = 0;
+ SliderValue.Text = "0%";
+ drp_audioBitrate.Text = "160";
+ CheckPixelRatio.CheckState = CheckState.Checked;
+ drp_audioSampleRate.Text = "48";
+ rtf_h264advanced.Text = "level=41";
+ drp_crop.Text = "No Crop";
+ }
+
+
private void mnu_ProgramDefaultOptions_Click(object sender, EventArgs e)
{
//Source
@@ -554,65 +658,8 @@ namespace Handbrake
// --------------------------------------------------------------
// Buttons on the main Window
// --------------------------------------------------------------
- private void btn_Browse_Click(object sender, EventArgs e)
- {
-
- String filename ="";
- text_source.Text = "";
-
- //int scanTwice = 0;
-
- if (RadioDVD.Checked)
- {
- DVD_Open.ShowDialog();
- filename = DVD_Open.SelectedPath;
- if (filename != "")
- {
- Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow);
- text_source.Text = filename;
- frmRD.ShowDialog();
- }
- }
- else
- {
- ISO_Open.ShowDialog();
- filename = ISO_Open.FileName;
- if (filename != "")
- {
- Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow);
- text_source.Text = filename;
- frmRD.ShowDialog();
- }
- }
-
- // Check if there was titles in the dvd title dropdown
- // If there isn't any, rescan the DVD. hbcli occasionally fails (see bug in encode) with standard error.
- if (filename != "")
- {
- // Disbaled the 2nd pass for the time being.
- /* if (drp_dvdtitle.Items.Count == 0)
- {
- if (scanTwice == 0)
- {
- MessageBox.Show("Scan Failed. Waiting 5 Seconds before attempting to re-scan the source a 2nd time.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- Thread.Sleep(3000);
- Form frmRD = new frmReadDVD(filename, this, dvdInfoWindow);
- frmRD.ShowDialog();
- scanTwice = 1;
- }
- }*/
- }
- else
- {
- text_source.Text = "Click 'Browse' to continue";
- }
- 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);
- }
-
- }
+ #region Buttons
private void btn_destBrowse_Click(object sender, EventArgs e)
{
@@ -672,15 +719,15 @@ namespace Handbrake
queueWindow.Show();
}
-
-
-
+ #endregion
//---------------------------------------------------
// Encode / Cancel Buttons
// Encode Progress Text Handler
//---------------------------------------------------
+ #region Encode/CLI
+
Functions.CLI process = new Functions.CLI();
private void btn_encode_Click(object sender, EventArgs e)
@@ -764,11 +811,15 @@ namespace Handbrake
}
lbl_encode.Text = string.Format("Encode Progress: {0}%, FPS: {1}, Avg FPS: {2}, Time Remaining: {3} ", PercentComplete, CurrentFps, AverageFps, TimeRemaining);
}
-
+
+ #endregion
+
//---------------------------------------------------
// Items that require actions on frmMain
//---------------------------------------------------
+ #region frmMain Actions
+
private void drop_chapterStart_SelectedIndexChanged(object sender, EventArgs e)
{
lbl_chptWarn.Visible = false;
@@ -1169,9 +1220,7 @@ namespace Handbrake
}
}
-
-
-
+ #endregion
/*
* ---------------------------------------------------
@@ -1181,6 +1230,8 @@ namespace Handbrake
* ---------------------------------------------------
*/
+ #region Program Functions
+
public string GenerateTheQuery()
{
string source = text_source.Text;
@@ -1524,6 +1575,9 @@ namespace Handbrake
return querySource+ queryDestination+ queryPictureSettings+ queryVideoSettings+ h264Settings+ queryAudioSettings+ queryAdvancedSettings+ verbose;
}
+ #endregion
+
+
// This is the END of the road ------------------------------------------------------------------------------
}
} \ No newline at end of file