summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/C#/Controls/PictureSettings.Designer.cs697
-rw-r--r--win/C#/Controls/PictureSettings.cs994
-rw-r--r--win/C#/Controls/PictureSettings.resx1027
-rw-r--r--win/C#/Functions/PresetLoader.cs16
-rw-r--r--win/C#/Functions/QueryGenerator.cs10
-rw-r--r--win/C#/HandBrakeCS.csproj4
-rw-r--r--win/C#/frmMain.Designer.cs26
-rw-r--r--win/C#/frmMain.cs2
8 files changed, 814 insertions, 1962 deletions
diff --git a/win/C#/Controls/PictureSettings.Designer.cs b/win/C#/Controls/PictureSettings.Designer.cs
index 8f3727486..9036eb5c2 100644
--- a/win/C#/Controls/PictureSettings.Designer.cs
+++ b/win/C#/Controls/PictureSettings.Designer.cs
@@ -1,5 +1,3 @@
-using System.Windows.Forms;
-
namespace Handbrake.Controls
{
partial class PictureSettings
@@ -30,343 +28,534 @@ namespace Handbrake.Controls
/// </summary>
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PictureSettings));
+ this.check_customCrop = new System.Windows.Forms.RadioButton();
+ this.check_autoCrop = new System.Windows.Forms.RadioButton();
+ this.crop_bottom = new System.Windows.Forms.NumericUpDown();
+ this.crop_top = new System.Windows.Forms.NumericUpDown();
+ this.crop_left = new System.Windows.Forms.NumericUpDown();
+ this.crop_right = new System.Windows.Forms.NumericUpDown();
+ this.label8 = new System.Windows.Forms.Label();
+ this.Label53 = new System.Windows.Forms.Label();
+ this.Label52 = new System.Windows.Forms.Label();
+ this.Label51 = new System.Windows.Forms.Label();
+ this.Label15 = new System.Windows.Forms.Label();
+ this.check_KeepAR = new System.Windows.Forms.CheckBox();
this.text_height = new System.Windows.Forms.NumericUpDown();
this.text_width = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.lbl_max = new System.Windows.Forms.Label();
this.lbl_src_res = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
- this.label6 = new System.Windows.Forms.Label();
- this.drp_anamorphic = new System.Windows.Forms.ComboBox();
this.label26 = new System.Windows.Forms.Label();
this.lbl_Aspect = new System.Windows.Forms.Label();
this.Label91 = new System.Windows.Forms.Label();
this.Label55 = new System.Windows.Forms.Label();
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.updownParHeight = new System.Windows.Forms.NumericUpDown();
+ this.label6 = new System.Windows.Forms.Label();
+ this.labelDisplaySize = new System.Windows.Forms.Label();
+ this.lbl_parHeight = new System.Windows.Forms.Label();
+ this.labelStaticDisplaySize = new System.Windows.Forms.Label();
+ this.updownParWidth = new System.Windows.Forms.NumericUpDown();
+ this.drp_anamorphic = new System.Windows.Forms.ComboBox();
+ this.lbl_parWidth = new System.Windows.Forms.Label();
+ this.updownDisplayWidth = new System.Windows.Forms.NumericUpDown();
this.lbl_modulus = new System.Windows.Forms.Label();
- this.drop_modulus = new System.Windows.Forms.ComboBox();
- this.txt_displayWidth = new System.Windows.Forms.TextBox();
this.lbl_displayWidth = new System.Windows.Forms.Label();
- this.lbl_parWidth = new System.Windows.Forms.Label();
- this.txt_parWidth = new System.Windows.Forms.TextBox();
- this.lbl_parHeight = new System.Windows.Forms.Label();
- this.txt_parHeight = new System.Windows.Forms.TextBox();
- this.check_KeepAR = new System.Windows.Forms.CheckBox();
- this.check_customCrop = new System.Windows.Forms.RadioButton();
- this.check_autoCrop = new System.Windows.Forms.RadioButton();
- this.crop_bottom = new System.Windows.Forms.NumericUpDown();
- this.crop_top = new System.Windows.Forms.NumericUpDown();
- this.crop_left = new System.Windows.Forms.NumericUpDown();
- this.crop_right = new System.Windows.Forms.NumericUpDown();
- this.label8 = new System.Windows.Forms.Label();
- this.Label53 = new System.Windows.Forms.Label();
- this.Label52 = new System.Windows.Forms.Label();
- this.Label51 = new System.Windows.Forms.Label();
- this.Label15 = new System.Windows.Forms.Label();
- this.lbl_anamorphic = new System.Windows.Forms.Label();
- this.lbl_anamprohicLbl = new System.Windows.Forms.Label();
- this.toolTip = new System.Windows.Forms.ToolTip(this.components);
- ((System.ComponentModel.ISupportInitialize)(this.text_height)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.text_width)).BeginInit();
+ this.drp_modulus = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.crop_bottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.crop_top)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.crop_left)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.crop_right)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.text_height)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.text_width)).BeginInit();
+ this.tableLayoutPanel1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.updownParHeight)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.updownParWidth)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.updownDisplayWidth)).BeginInit();
this.SuspendLayout();
//
- // text_height
- //
- resources.ApplyResources(this.text_height, "text_height");
- this.text_height.Maximum = new decimal(new int[] {
- 2560,
- 0,
- 0,
- 0});
- this.text_height.Name = "text_height";
- this.text_height.Value = new decimal(new int[] {
- 64,
- 0,
- 0,
- 0});
- this.text_height.ValueChanged += new System.EventHandler(this.text_height_ValueChanged);
- //
- // text_width
- //
- resources.ApplyResources(this.text_width, "text_width");
- this.text_width.Maximum = new decimal(new int[] {
- 2560,
- 0,
- 0,
- 0});
- this.text_width.Name = "text_width";
- this.text_width.Value = new decimal(new int[] {
- 64,
- 0,
- 0,
- 0});
- this.text_width.ValueChanged += new System.EventHandler(this.text_width_ValueChanged);
- //
- // label4
- //
- resources.ApplyResources(this.label4, "label4");
- this.label4.BackColor = System.Drawing.Color.Transparent;
- this.label4.ForeColor = System.Drawing.Color.Black;
- this.label4.Name = "label4";
- //
- // lbl_max
- //
- resources.ApplyResources(this.lbl_max, "lbl_max");
- this.lbl_max.Name = "lbl_max";
- //
- // lbl_src_res
- //
- resources.ApplyResources(this.lbl_src_res, "lbl_src_res");
- this.lbl_src_res.BackColor = System.Drawing.Color.Transparent;
- this.lbl_src_res.Name = "lbl_src_res";
- //
- // label7
- //
- resources.ApplyResources(this.label7, "label7");
- this.label7.BackColor = System.Drawing.Color.Transparent;
- this.label7.Name = "label7";
- //
- // label6
- //
- resources.ApplyResources(this.label6, "label6");
- this.label6.BackColor = System.Drawing.Color.Transparent;
- this.label6.Name = "label6";
- //
- // drp_anamorphic
- //
- this.drp_anamorphic.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- resources.ApplyResources(this.drp_anamorphic, "drp_anamorphic");
- this.drp_anamorphic.FormattingEnabled = true;
- this.drp_anamorphic.Items.AddRange(new object[] {
- resources.GetString("drp_anamorphic.Items"),
- resources.GetString("drp_anamorphic.Items1"),
- resources.GetString("drp_anamorphic.Items2"),
- resources.GetString("drp_anamorphic.Items3")});
- this.drp_anamorphic.Name = "drp_anamorphic";
- this.drp_anamorphic.SelectedIndexChanged += new System.EventHandler(this.drp_anamorphic_SelectedIndexChanged);
- //
- // label26
- //
- resources.ApplyResources(this.label26, "label26");
- this.label26.BackColor = System.Drawing.Color.Transparent;
- this.label26.Name = "label26";
- //
- // lbl_Aspect
- //
- resources.ApplyResources(this.lbl_Aspect, "lbl_Aspect");
- this.lbl_Aspect.BackColor = System.Drawing.Color.Transparent;
- this.lbl_Aspect.Name = "lbl_Aspect";
- //
- // Label91
- //
- resources.ApplyResources(this.Label91, "Label91");
- this.Label91.BackColor = System.Drawing.Color.Transparent;
- this.Label91.Name = "Label91";
- //
- // Label55
- //
- resources.ApplyResources(this.Label55, "Label55");
- this.Label55.BackColor = System.Drawing.Color.Transparent;
- this.Label55.ForeColor = System.Drawing.Color.Black;
- this.Label55.Name = "Label55";
- //
- // lbl_modulus
- //
- resources.ApplyResources(this.lbl_modulus, "lbl_modulus");
- this.lbl_modulus.BackColor = System.Drawing.Color.Transparent;
- this.lbl_modulus.Name = "lbl_modulus";
- //
- // drop_modulus
- //
- this.drop_modulus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- resources.ApplyResources(this.drop_modulus, "drop_modulus");
- this.drop_modulus.FormattingEnabled = true;
- this.drop_modulus.Items.AddRange(new object[] {
- resources.GetString("drop_modulus.Items"),
- resources.GetString("drop_modulus.Items1"),
- resources.GetString("drop_modulus.Items2"),
- resources.GetString("drop_modulus.Items3")});
- this.drop_modulus.Name = "drop_modulus";
- //
- // txt_displayWidth
- //
- resources.ApplyResources(this.txt_displayWidth, "txt_displayWidth");
- this.txt_displayWidth.Name = "txt_displayWidth";
- this.toolTip.SetToolTip(this.txt_displayWidth, resources.GetString("txt_displayWidth.ToolTip"));
- this.txt_displayWidth.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txt_displayWidth_Keyup);
- //
- // lbl_displayWidth
- //
- resources.ApplyResources(this.lbl_displayWidth, "lbl_displayWidth");
- this.lbl_displayWidth.BackColor = System.Drawing.Color.Transparent;
- this.lbl_displayWidth.Name = "lbl_displayWidth";
- //
- // lbl_parWidth
- //
- resources.ApplyResources(this.lbl_parWidth, "lbl_parWidth");
- this.lbl_parWidth.BackColor = System.Drawing.Color.Transparent;
- this.lbl_parWidth.Name = "lbl_parWidth";
- //
- // txt_parWidth
- //
- resources.ApplyResources(this.txt_parWidth, "txt_parWidth");
- this.txt_parWidth.Name = "txt_parWidth";
- this.toolTip.SetToolTip(this.txt_parWidth, resources.GetString("txt_parWidth.ToolTip"));
- this.txt_parWidth.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txt_parWidth_Keyup);
- //
- // lbl_parHeight
- //
- resources.ApplyResources(this.lbl_parHeight, "lbl_parHeight");
- this.lbl_parHeight.BackColor = System.Drawing.Color.Transparent;
- this.lbl_parHeight.Name = "lbl_parHeight";
- //
- // txt_parHeight
- //
- resources.ApplyResources(this.txt_parHeight, "txt_parHeight");
- this.txt_parHeight.Name = "txt_parHeight";
- this.toolTip.SetToolTip(this.txt_parHeight, resources.GetString("txt_parHeight.ToolTip"));
- this.txt_parHeight.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txt_parHeight_Keyup);
- //
- // check_KeepAR
- //
- resources.ApplyResources(this.check_KeepAR, "check_KeepAR");
- this.check_KeepAR.Name = "check_KeepAR";
- this.check_KeepAR.UseVisualStyleBackColor = true;
- this.check_KeepAR.CheckedChanged += new System.EventHandler(this.check_KeepAR_CheckedChanged);
- //
// check_customCrop
//
- resources.ApplyResources(this.check_customCrop, "check_customCrop");
+ this.check_customCrop.AutoSize = true;
+ this.check_customCrop.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.check_customCrop.Location = new System.Drawing.Point(399, 57);
this.check_customCrop.Name = "check_customCrop";
+ this.check_customCrop.Size = new System.Drawing.Size(65, 17);
+ this.check_customCrop.TabIndex = 106;
+ this.check_customCrop.Text = "Custom:";
this.check_customCrop.UseVisualStyleBackColor = true;
- this.check_customCrop.CheckedChanged += new System.EventHandler(this.check_customCrop_CheckedChanged);
//
// check_autoCrop
//
- resources.ApplyResources(this.check_autoCrop, "check_autoCrop");
+ this.check_autoCrop.AutoSize = true;
this.check_autoCrop.Checked = true;
+ this.check_autoCrop.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.check_autoCrop.Location = new System.Drawing.Point(399, 33);
this.check_autoCrop.Name = "check_autoCrop";
+ this.check_autoCrop.Size = new System.Drawing.Size(73, 17);
+ this.check_autoCrop.TabIndex = 105;
this.check_autoCrop.TabStop = true;
+ this.check_autoCrop.Text = "Automatic";
this.check_autoCrop.UseVisualStyleBackColor = true;
this.check_autoCrop.CheckedChanged += new System.EventHandler(this.check_autoCrop_CheckedChanged);
//
// crop_bottom
//
- resources.ApplyResources(this.crop_bottom, "crop_bottom");
+ this.crop_bottom.Enabled = false;
this.crop_bottom.Increment = new decimal(new int[] {
2,
0,
0,
0});
+ this.crop_bottom.Location = new System.Drawing.Point(479, 146);
this.crop_bottom.Maximum = new decimal(new int[] {
1080,
0,
0,
0});
this.crop_bottom.Name = "crop_bottom";
- this.crop_bottom.ValueChanged += new System.EventHandler(this.crop_bottom_ValueChanged);
+ this.crop_bottom.Size = new System.Drawing.Size(44, 21);
+ this.crop_bottom.TabIndex = 103;
+ this.crop_bottom.ValueChanged += new System.EventHandler(this.crop_ValueChanged);
//
// crop_top
//
- resources.ApplyResources(this.crop_top, "crop_top");
+ this.crop_top.Enabled = false;
this.crop_top.Increment = new decimal(new int[] {
2,
0,
0,
0});
+ this.crop_top.Location = new System.Drawing.Point(479, 100);
this.crop_top.Maximum = new decimal(new int[] {
1080,
0,
0,
0});
this.crop_top.Name = "crop_top";
- this.crop_top.ValueChanged += new System.EventHandler(this.crop_top_ValueChanged);
+ this.crop_top.Size = new System.Drawing.Size(44, 21);
+ this.crop_top.TabIndex = 100;
+ this.crop_top.ValueChanged += new System.EventHandler(this.crop_ValueChanged);
//
// crop_left
//
- resources.ApplyResources(this.crop_left, "crop_left");
+ this.crop_left.Enabled = false;
this.crop_left.Increment = new decimal(new int[] {
2,
0,
0,
0});
+ this.crop_left.Location = new System.Drawing.Point(428, 122);
this.crop_left.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.crop_left.Name = "crop_left";
- this.crop_left.ValueChanged += new System.EventHandler(this.crop_left_ValueChanged);
+ this.crop_left.Size = new System.Drawing.Size(44, 21);
+ this.crop_left.TabIndex = 98;
+ this.crop_left.ValueChanged += new System.EventHandler(this.crop_ValueChanged);
//
// crop_right
//
- resources.ApplyResources(this.crop_right, "crop_right");
+ this.crop_right.Enabled = false;
this.crop_right.Increment = new decimal(new int[] {
2,
0,
0,
0});
+ this.crop_right.Location = new System.Drawing.Point(530, 122);
this.crop_right.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.crop_right.Name = "crop_right";
- this.crop_right.ValueChanged += new System.EventHandler(this.crop_right_ValueChanged);
+ this.crop_right.Size = new System.Drawing.Size(44, 21);
+ this.crop_right.TabIndex = 101;
+ this.crop_right.ValueChanged += new System.EventHandler(this.crop_ValueChanged);
//
// label8
//
- resources.ApplyResources(this.label8, "label8");
+ this.label8.AutoSize = true;
this.label8.BackColor = System.Drawing.Color.Transparent;
+ this.label8.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label8.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.label8.Location = new System.Drawing.Point(396, 13);
this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(33, 13);
+ this.label8.TabIndex = 96;
+ this.label8.Text = "Crop";
//
// Label53
//
- resources.ApplyResources(this.Label53, "Label53");
+ this.Label53.AutoSize = true;
this.Label53.BackColor = System.Drawing.Color.Transparent;
+ this.Label53.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.Label53.Location = new System.Drawing.Point(477, 170);
this.Label53.Name = "Label53";
+ this.Label53.Size = new System.Drawing.Size(41, 13);
+ this.Label53.TabIndex = 104;
+ this.Label53.Text = "Bottom";
//
// Label52
//
- resources.ApplyResources(this.Label52, "Label52");
+ this.Label52.AutoSize = true;
this.Label52.BackColor = System.Drawing.Color.Transparent;
+ this.Label52.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.Label52.Location = new System.Drawing.Point(486, 85);
this.Label52.Name = "Label52";
+ this.Label52.Size = new System.Drawing.Size(25, 13);
+ this.Label52.TabIndex = 99;
+ this.Label52.Text = "Top";
//
// Label51
//
- resources.ApplyResources(this.Label51, "Label51");
+ this.Label51.AutoSize = true;
this.Label51.BackColor = System.Drawing.Color.Transparent;
+ this.Label51.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.Label51.Location = new System.Drawing.Point(580, 124);
this.Label51.Name = "Label51";
+ this.Label51.Size = new System.Drawing.Size(32, 13);
+ this.Label51.TabIndex = 102;
+ this.Label51.Text = "Right";
//
// Label15
//
- resources.ApplyResources(this.Label15, "Label15");
+ this.Label15.AutoSize = true;
this.Label15.BackColor = System.Drawing.Color.Transparent;
+ this.Label15.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.Label15.Location = new System.Drawing.Point(396, 124);
this.Label15.Name = "Label15";
+ this.Label15.Size = new System.Drawing.Size(26, 13);
+ this.Label15.TabIndex = 97;
+ this.Label15.Text = "Left";
+ //
+ // check_KeepAR
+ //
+ this.check_KeepAR.AutoSize = true;
+ this.check_KeepAR.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.check_KeepAR.Location = new System.Drawing.Point(68, 85);
+ this.check_KeepAR.Name = "check_KeepAR";
+ this.check_KeepAR.Size = new System.Drawing.Size(114, 17);
+ this.check_KeepAR.TabIndex = 95;
+ this.check_KeepAR.Text = "Keep Aspect Ratio";
+ this.check_KeepAR.UseVisualStyleBackColor = true;
+ this.check_KeepAR.CheckedChanged += new System.EventHandler(this.check_KeepAR_CheckedChanged);
+ //
+ // text_height
+ //
+ this.text_height.Location = new System.Drawing.Point(206, 59);
+ this.text_height.Maximum = new decimal(new int[] {
+ 2560,
+ 0,
+ 0,
+ 0});
+ this.text_height.Name = "text_height";
+ this.text_height.Size = new System.Drawing.Size(64, 21);
+ this.text_height.TabIndex = 86;
+ this.text_height.ValueChanged += new System.EventHandler(this.text_height_ValueChanged);
+ //
+ // text_width
+ //
+ this.text_width.Location = new System.Drawing.Point(68, 59);
+ this.text_width.Maximum = new decimal(new int[] {
+ 2560,
+ 0,
+ 0,
+ 0});
+ this.text_width.Name = "text_width";
+ this.text_width.Size = new System.Drawing.Size(64, 21);
+ this.text_width.TabIndex = 85;
+ this.text_width.ValueChanged += new System.EventHandler(this.text_width_ValueChanged);
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.BackColor = System.Drawing.Color.Transparent;
+ this.label4.ForeColor = System.Drawing.Color.Black;
+ this.label4.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.label4.Location = new System.Drawing.Point(152, 63);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(42, 13);
+ this.label4.TabIndex = 84;
+ this.label4.Text = "Height:";
+ //
+ // lbl_max
+ //
+ this.lbl_max.AutoSize = true;
+ this.lbl_max.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.lbl_max.Location = new System.Drawing.Point(279, 61);
+ this.lbl_max.Name = "lbl_max";
+ this.lbl_max.Size = new System.Drawing.Size(37, 13);
+ this.lbl_max.TabIndex = 83;
+ this.lbl_max.Text = "{max}";
+ //
+ // lbl_src_res
+ //
+ this.lbl_src_res.AutoSize = true;
+ this.lbl_src_res.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_src_res.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.lbl_src_res.Location = new System.Drawing.Point(66, 36);
+ this.lbl_src_res.Name = "lbl_src_res";
+ this.lbl_src_res.Size = new System.Drawing.Size(68, 13);
+ this.lbl_src_res.TabIndex = 77;
+ this.lbl_src_res.Text = "Select a Title";
+ //
+ // label7
+ //
+ this.label7.AutoSize = true;
+ this.label7.BackColor = System.Drawing.Color.Transparent;
+ this.label7.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.label7.Location = new System.Drawing.Point(13, 35);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(44, 13);
+ this.label7.TabIndex = 76;
+ this.label7.Text = "Source:";
+ //
+ // label26
+ //
+ this.label26.AutoSize = true;
+ this.label26.BackColor = System.Drawing.Color.Transparent;
+ this.label26.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label26.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.label26.Location = new System.Drawing.Point(13, 13);
+ this.label26.Name = "label26";
+ this.label26.Size = new System.Drawing.Size(30, 13);
+ this.label26.TabIndex = 75;
+ this.label26.Text = "Size";
+ //
+ // lbl_Aspect
+ //
+ this.lbl_Aspect.AutoSize = true;
+ this.lbl_Aspect.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_Aspect.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.lbl_Aspect.Location = new System.Drawing.Point(241, 36);
+ this.lbl_Aspect.Name = "lbl_Aspect";
+ this.lbl_Aspect.Size = new System.Drawing.Size(68, 13);
+ this.lbl_Aspect.TabIndex = 79;
+ this.lbl_Aspect.Text = "Select a Title";
+ //
+ // Label91
+ //
+ this.Label91.AutoSize = true;
+ this.Label91.BackColor = System.Drawing.Color.Transparent;
+ this.Label91.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.Label91.Location = new System.Drawing.Point(152, 35);
+ this.Label91.Name = "Label91";
+ this.Label91.Size = new System.Drawing.Size(72, 13);
+ this.Label91.TabIndex = 78;
+ this.Label91.Text = "Aspect Ratio:";
+ //
+ // Label55
+ //
+ this.Label55.AutoSize = true;
+ this.Label55.BackColor = System.Drawing.Color.Transparent;
+ this.Label55.ForeColor = System.Drawing.Color.Black;
+ this.Label55.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.Label55.Location = new System.Drawing.Point(13, 63);
+ this.Label55.Name = "Label55";
+ this.Label55.Size = new System.Drawing.Size(39, 13);
+ this.Label55.TabIndex = 80;
+ this.Label55.Text = "Width:";
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.AutoSize = true;
+ this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.tableLayoutPanel1.ColumnCount = 2;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+ this.tableLayoutPanel1.Controls.Add(this.updownParHeight, 1, 4);
+ this.tableLayoutPanel1.Controls.Add(this.label6, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.labelDisplaySize, 1, 5);
+ this.tableLayoutPanel1.Controls.Add(this.lbl_parHeight, 0, 4);
+ this.tableLayoutPanel1.Controls.Add(this.labelStaticDisplaySize, 0, 5);
+ this.tableLayoutPanel1.Controls.Add(this.updownParWidth, 1, 3);
+ this.tableLayoutPanel1.Controls.Add(this.drp_anamorphic, 1, 0);
+ this.tableLayoutPanel1.Controls.Add(this.lbl_parWidth, 0, 3);
+ this.tableLayoutPanel1.Controls.Add(this.updownDisplayWidth, 1, 2);
+ this.tableLayoutPanel1.Controls.Add(this.lbl_modulus, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.lbl_displayWidth, 0, 2);
+ this.tableLayoutPanel1.Controls.Add(this.drp_modulus, 1, 1);
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(16, 108);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 6;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(195, 154);
+ this.tableLayoutPanel1.TabIndex = 110;
+ //
+ // updownParHeight
+ //
+ this.updownParHeight.Location = new System.Drawing.Point(82, 111);
+ this.updownParHeight.Maximum = new decimal(new int[] {
+ 2560,
+ 0,
+ 0,
+ 0});
+ this.updownParHeight.Name = "updownParHeight";
+ this.updownParHeight.Size = new System.Drawing.Size(53, 21);
+ this.updownParHeight.TabIndex = 112;
+ this.updownParHeight.ValueChanged += new System.EventHandler(this.text_width_ValueChanged);
//
- // lbl_anamorphic
+ // label6
//
- resources.ApplyResources(this.lbl_anamorphic, "lbl_anamorphic");
- this.lbl_anamorphic.BackColor = System.Drawing.Color.Transparent;
- this.lbl_anamorphic.Name = "lbl_anamorphic";
+ this.label6.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.label6.AutoSize = true;
+ this.label6.BackColor = System.Drawing.Color.Transparent;
+ this.label6.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.label6.Location = new System.Drawing.Point(0, 7);
+ this.label6.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(67, 13);
+ this.label6.TabIndex = 81;
+ this.label6.Text = "Anamorphic:";
+ //
+ // labelDisplaySize
+ //
+ this.labelDisplaySize.AutoSize = true;
+ this.labelDisplaySize.BackColor = System.Drawing.Color.Transparent;
+ this.labelDisplaySize.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.labelDisplaySize.Location = new System.Drawing.Point(82, 138);
+ this.labelDisplaySize.Margin = new System.Windows.Forms.Padding(3);
+ this.labelDisplaySize.Name = "labelDisplaySize";
+ this.labelDisplaySize.Size = new System.Drawing.Size(68, 13);
+ this.labelDisplaySize.TabIndex = 108;
+ this.labelDisplaySize.Text = "Select a Title";
+ //
+ // lbl_parHeight
//
- // lbl_anamprohicLbl
+ this.lbl_parHeight.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lbl_parHeight.AutoSize = true;
+ this.lbl_parHeight.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_parHeight.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.lbl_parHeight.Location = new System.Drawing.Point(0, 115);
+ this.lbl_parHeight.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
+ this.lbl_parHeight.Name = "lbl_parHeight";
+ this.lbl_parHeight.Size = new System.Drawing.Size(65, 13);
+ this.lbl_parHeight.TabIndex = 94;
+ this.lbl_parHeight.Text = "PAR Height:";
+ //
+ // labelStaticDisplaySize
+ //
+ this.labelStaticDisplaySize.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.labelStaticDisplaySize.AutoSize = true;
+ this.labelStaticDisplaySize.BackColor = System.Drawing.Color.Transparent;
+ this.labelStaticDisplaySize.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.labelStaticDisplaySize.Location = new System.Drawing.Point(0, 138);
+ this.labelStaticDisplaySize.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
+ this.labelStaticDisplaySize.Name = "labelStaticDisplaySize";
+ this.labelStaticDisplaySize.Size = new System.Drawing.Size(67, 13);
+ this.labelStaticDisplaySize.TabIndex = 107;
+ this.labelStaticDisplaySize.Text = "Display Size:";
+ //
+ // updownParWidth
+ //
+ this.updownParWidth.Location = new System.Drawing.Point(82, 84);
+ this.updownParWidth.Maximum = new decimal(new int[] {
+ 2560,
+ 0,
+ 0,
+ 0});
+ this.updownParWidth.Name = "updownParWidth";
+ this.updownParWidth.Size = new System.Drawing.Size(53, 21);
+ this.updownParWidth.TabIndex = 111;
+ this.updownParWidth.ValueChanged += new System.EventHandler(this.text_width_ValueChanged);
+ //
+ // drp_anamorphic
+ //
+ this.drp_anamorphic.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drp_anamorphic.FormattingEnabled = true;
+ this.drp_anamorphic.Items.AddRange(new object[] {
+ "None",
+ "Strict",
+ "Loose",
+ "Custom"});
+ this.drp_anamorphic.Location = new System.Drawing.Point(82, 3);
+ this.drp_anamorphic.Name = "drp_anamorphic";
+ this.drp_anamorphic.Size = new System.Drawing.Size(110, 21);
+ this.drp_anamorphic.TabIndex = 82;
+ this.drp_anamorphic.SelectedIndexChanged += new System.EventHandler(this.drp_anamorphic_SelectedIndexChanged);
+ //
+ // lbl_parWidth
+ //
+ this.lbl_parWidth.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lbl_parWidth.AutoSize = true;
+ this.lbl_parWidth.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_parWidth.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.lbl_parWidth.Location = new System.Drawing.Point(0, 88);
+ this.lbl_parWidth.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
+ this.lbl_parWidth.Name = "lbl_parWidth";
+ this.lbl_parWidth.Size = new System.Drawing.Size(62, 13);
+ this.lbl_parWidth.TabIndex = 92;
+ this.lbl_parWidth.Text = "PAR Width:";
+ //
+ // updownDisplayWidth
+ //
+ this.updownDisplayWidth.Location = new System.Drawing.Point(82, 57);
+ this.updownDisplayWidth.Maximum = new decimal(new int[] {
+ 2560,
+ 0,
+ 0,
+ 0});
+ this.updownDisplayWidth.Name = "updownDisplayWidth";
+ this.updownDisplayWidth.Size = new System.Drawing.Size(53, 21);
+ this.updownDisplayWidth.TabIndex = 110;
+ this.updownDisplayWidth.ValueChanged += new System.EventHandler(this.text_width_ValueChanged);
+ //
+ // lbl_modulus
+ //
+ this.lbl_modulus.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lbl_modulus.AutoSize = true;
+ this.lbl_modulus.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_modulus.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.lbl_modulus.Location = new System.Drawing.Point(0, 34);
+ this.lbl_modulus.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
+ this.lbl_modulus.Name = "lbl_modulus";
+ this.lbl_modulus.Size = new System.Drawing.Size(50, 13);
+ this.lbl_modulus.TabIndex = 87;
+ this.lbl_modulus.Text = "Modulus:";
+ //
+ // lbl_displayWidth
//
- resources.ApplyResources(this.lbl_anamprohicLbl, "lbl_anamprohicLbl");
- this.lbl_anamprohicLbl.BackColor = System.Drawing.Color.Transparent;
- this.lbl_anamprohicLbl.Name = "lbl_anamprohicLbl";
+ this.lbl_displayWidth.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.lbl_displayWidth.AutoSize = true;
+ this.lbl_displayWidth.BackColor = System.Drawing.Color.Transparent;
+ this.lbl_displayWidth.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+ this.lbl_displayWidth.Location = new System.Drawing.Point(0, 61);
+ this.lbl_displayWidth.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3);
+ this.lbl_displayWidth.Name = "lbl_displayWidth";
+ this.lbl_displayWidth.Size = new System.Drawing.Size(76, 13);
+ this.lbl_displayWidth.TabIndex = 90;
+ this.lbl_displayWidth.Text = "Display Width:";
+ //
+ // drp_modulus
+ //
+ this.drp_modulus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drp_modulus.FormattingEnabled = true;
+ this.drp_modulus.Items.AddRange(new object[] {
+ "16",
+ "8",
+ "4",
+ "2"});
+ this.drp_modulus.Location = new System.Drawing.Point(82, 30);
+ this.drp_modulus.Name = "drp_modulus";
+ this.drp_modulus.Size = new System.Drawing.Size(110, 21);
+ this.drp_modulus.TabIndex = 88;
+ this.drp_modulus.SelectedIndexChanged += new System.EventHandler(this.drp_modulus_SelectedIndexChanged);
//
// PictureSettings
//
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.lbl_anamorphic);
- this.Controls.Add(this.lbl_anamprohicLbl);
+ this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.check_customCrop);
this.Controls.Add(this.check_autoCrop);
this.Controls.Add(this.crop_bottom);
@@ -379,34 +568,31 @@ namespace Handbrake.Controls
this.Controls.Add(this.Label51);
this.Controls.Add(this.Label15);
this.Controls.Add(this.check_KeepAR);
- this.Controls.Add(this.lbl_parHeight);
- this.Controls.Add(this.txt_parHeight);
- this.Controls.Add(this.lbl_parWidth);
- this.Controls.Add(this.txt_parWidth);
- this.Controls.Add(this.lbl_displayWidth);
- this.Controls.Add(this.txt_displayWidth);
- this.Controls.Add(this.lbl_modulus);
- this.Controls.Add(this.drop_modulus);
this.Controls.Add(this.text_height);
this.Controls.Add(this.text_width);
this.Controls.Add(this.label4);
this.Controls.Add(this.lbl_max);
this.Controls.Add(this.lbl_src_res);
this.Controls.Add(this.label7);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.drp_anamorphic);
this.Controls.Add(this.label26);
this.Controls.Add(this.lbl_Aspect);
this.Controls.Add(this.Label91);
this.Controls.Add(this.Label55);
- resources.ApplyResources(this, "$this");
+ this.Enabled = false;
+ this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "PictureSettings";
- ((System.ComponentModel.ISupportInitialize)(this.text_height)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.text_width)).EndInit();
+ this.Size = new System.Drawing.Size(666, 279);
((System.ComponentModel.ISupportInitialize)(this.crop_bottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.crop_top)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.crop_left)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.crop_right)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.text_height)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.text_width)).EndInit();
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanel1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.updownParHeight)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.updownParWidth)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.updownDisplayWidth)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -414,21 +600,6 @@ namespace Handbrake.Controls
#endregion
- internal System.Windows.Forms.Label label4;
- private System.Windows.Forms.Label lbl_max;
- internal System.Windows.Forms.Label lbl_src_res;
- internal System.Windows.Forms.Label label7;
- internal System.Windows.Forms.Label label6;
- internal System.Windows.Forms.ComboBox drp_anamorphic;
- internal System.Windows.Forms.Label label26;
- internal System.Windows.Forms.Label lbl_Aspect;
- internal System.Windows.Forms.Label Label91;
- internal System.Windows.Forms.Label Label55;
- internal System.Windows.Forms.Label lbl_modulus;
- internal System.Windows.Forms.ComboBox drop_modulus;
- internal System.Windows.Forms.Label lbl_displayWidth;
- internal System.Windows.Forms.Label lbl_parWidth;
- internal System.Windows.Forms.Label lbl_parHeight;
internal System.Windows.Forms.RadioButton check_customCrop;
internal System.Windows.Forms.RadioButton check_autoCrop;
internal System.Windows.Forms.NumericUpDown crop_bottom;
@@ -440,15 +611,31 @@ namespace Handbrake.Controls
internal System.Windows.Forms.Label Label52;
internal System.Windows.Forms.Label Label51;
internal System.Windows.Forms.Label Label15;
+ internal System.Windows.Forms.CheckBox check_KeepAR;
internal System.Windows.Forms.NumericUpDown text_height;
+ internal System.Windows.Forms.Label label4;
+ private System.Windows.Forms.Label lbl_max;
+ internal System.Windows.Forms.Label lbl_src_res;
+ internal System.Windows.Forms.Label label7;
+ internal System.Windows.Forms.Label label26;
+ internal System.Windows.Forms.Label lbl_Aspect;
+ internal System.Windows.Forms.Label Label91;
+ internal System.Windows.Forms.Label Label55;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ internal System.Windows.Forms.NumericUpDown updownParHeight;
+ internal System.Windows.Forms.Label label6;
+ internal System.Windows.Forms.Label labelDisplaySize;
+ internal System.Windows.Forms.Label lbl_parHeight;
+ internal System.Windows.Forms.Label labelStaticDisplaySize;
+ internal System.Windows.Forms.NumericUpDown updownParWidth;
+ internal System.Windows.Forms.ComboBox drp_anamorphic;
+ internal System.Windows.Forms.Label lbl_parWidth;
+ internal System.Windows.Forms.NumericUpDown updownDisplayWidth;
+ internal System.Windows.Forms.Label lbl_modulus;
+ internal System.Windows.Forms.Label lbl_displayWidth;
+ internal System.Windows.Forms.ComboBox drp_modulus;
internal System.Windows.Forms.NumericUpDown text_width;
- internal System.Windows.Forms.TextBox txt_displayWidth;
- internal System.Windows.Forms.TextBox txt_parWidth;
- internal System.Windows.Forms.TextBox txt_parHeight;
- internal System.Windows.Forms.CheckBox check_KeepAR;
- internal System.Windows.Forms.Label lbl_anamorphic;
- internal System.Windows.Forms.Label lbl_anamprohicLbl;
- private ToolTip toolTip;
+
}
}
diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs
index 108241a5b..096ccad4a 100644
--- a/win/C#/Controls/PictureSettings.cs
+++ b/win/C#/Controls/PictureSettings.cs
@@ -1,785 +1,471 @@
-using System;
-using System.Globalization;
+using System;
+using System.ComponentModel;
+using System.Drawing;
using System.Windows.Forms;
using Handbrake.Parsing;
namespace Handbrake.Controls
{
- // TODO
- // - Tie in the cropping controls.
- // - Cleanup this code. It's a bit messy.
-
public partial class PictureSettings : UserControl
{
- private static readonly CultureInfo Culture = new CultureInfo("en-US", false);
-
- // Globals
- public int maxWidth, maxHeight;
- int widthVal, heightVal;
- private double darValue;
- private double storageAspect; // Storage Aspect Cache for current source and title
- public Title selectedTitle { private get; set; }
- private Boolean heightChangeGuard;
- private Boolean looseAnamorphicHeightGuard;
- private Boolean heightModJumpGaurd;
-
+ private bool _preventChangingWidth, _preventChangingHeight;
+ private int _maxWidth, _maxHeight, _lastEncodeWidth, _lastEncodeHeight;
+ private double _anamorphicRatio, _displayRatio;
+ private Title _title;
+ private double storageAspect;
public event EventHandler PictureSettingsChanged;
- // Window Setup
public PictureSettings()
{
InitializeComponent();
- lbl_max.Text = "";
- drop_modulus.SelectedIndex = 0;
- storageAspect = 0;
+
+ drp_anamorphic.SelectedIndex = 1;
+ drp_modulus.SelectedIndex = 0;
}
- public void setComponentsAfterScan(Title st)
+
+ /// <summary>
+ /// Gets or sets the source media used by this control.
+ /// </summary>
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public Title Source
{
- storageAspect = 0;
- selectedTitle = st;
- // Set the Aspect Ratio
- lbl_Aspect.Text = selectedTitle.AspectRatio.ToString(Culture);
- lbl_src_res.Text = selectedTitle.Resolution.Width + " x " + selectedTitle.Resolution.Height;
+ get { return _title; }
+ set
+ {
+ _title = value;
+ _displayRatio = ((double)_title.Resolution.Width * _title.ParVal.Width / _title.ParVal.Height) / _title.Resolution.Height;
- // Set the Recommended Cropping values
- crop_top.Value = selectedTitle.AutoCropDimensions[0];
- crop_bottom.Value = selectedTitle.AutoCropDimensions[1];
- crop_left.Value = selectedTitle.AutoCropDimensions[2];
- crop_right.Value = selectedTitle.AutoCropDimensions[3];
+ Enabled = _title != null;
+ MaximumWidth = _title.Resolution.Width;
+ MaximumHeight = _title.Resolution.Height;
- // Set the Resolution Boxes
- text_width.Value = selectedTitle.Resolution.Width;
+ updownParWidth.Value = _title.ParVal.Width;
+ updownParHeight.Value = _title.ParVal.Height;
- if (drp_anamorphic.SelectedIndex == 0)
- text_height.Value = cacluateHeight(selectedTitle.Resolution.Width);
- else if (drp_anamorphic.SelectedIndex == 1 || drp_anamorphic.SelectedIndex == 3)
- {
- heightModJumpGaurd = true;
- text_height.Value = selectedTitle.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
- }
- else if (drp_anamorphic.SelectedIndex == 2)
- {
- heightModJumpGaurd = false;
- text_height.Value = selectedTitle.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
- }
+ // Set the source resolution
+ lbl_src_res.Text = Source.Resolution.Width + " x " + Source.Resolution.Height;
- if (drp_anamorphic.SelectedIndex == 3)
- {
- txt_parWidth.Text = selectedTitle.ParVal.Width.ToString();
- txt_parHeight.Text = selectedTitle.ParVal.Height.ToString();
- txt_displayWidth.Text = displayWidth().ToString(Culture);
- }
+ // Set ratios
+ _anamorphicRatio = (double)Source.Resolution.Width / Source.Resolution.Height;
- setMax();
- }
- public void setMax()
- {
- if (maxWidth != 0 && maxHeight != 0)
- lbl_max.Text = "Max Width / Height";
- else if (maxWidth != 0)
- lbl_max.Text = "Max Width";
- else
- lbl_max.Text = "";
- }
+ // Set the encode width and height
+ EncodeWidth = _title.Resolution.Width;
+ EncodeHeight = _title.Resolution.Height;
- // Basic Picture Setting Controls
- private void text_width_ValueChanged(object sender, EventArgs e)
- {
-
- maxWidth = 0;
- setMax();
+ _lastEncodeWidth = _title.Resolution.Width;
+ _lastEncodeHeight = _title.Resolution.Height;
- // Get the Modulus
- int mod;
- int.TryParse(drop_modulus.SelectedItem.ToString(), out mod);
+ // Set cropping
+ CroppingValues = _title.AutoCropDimensions;
- // Increase or decrease value by the correct mod.
- text_width.Value = widthChangeMod(mod);
+ lbl_Aspect.Text = _title.AspectRatio.ToString();
- // Mode Switch
- switch (drp_anamorphic.SelectedIndex)
- {
- case 0:
- if (calculateUnchangeValue(true) != -1 && check_KeepAR.Checked)
- text_height.Value = calculateUnchangeValue(true);
- break;
- case 1:
- lbl_anamorphic.Text = strictAnamorphic();
- break;
- case 2:
- lbl_anamorphic.Text = looseAnamorphic();
- break;
- case 3:
- customAnamorphic(text_width);
- break;
+ UpdateAnamorphicValue();
}
- // A Picture Setting has changed so raise a PictureSettingsChanged event.
- if (this.PictureSettingsChanged != null)
- this.PictureSettingsChanged(this, new EventArgs());
-
}
- private void text_height_ValueChanged(object sender, EventArgs e)
- {
- maxHeight = 0;
- setMax();
- // Get the Modulus
- int mod;
- int.TryParse(drop_modulus.SelectedItem.ToString(), out mod);
+ /// <summary>
+ /// Gets or sets the resolution of the displayed video.
+ /// </summary>
+ public Size DisplayResolution { get; set; }
- // Increase or decrease value by the correct mod.
- if (drp_anamorphic.SelectedIndex != 2 && !heightModJumpGaurd)
- {
- decimal val = heightChangeMod(mod);
- heightChangeGuard = true;
- if (text_height.Value != val)
- {
- heightChangeGuard = false;
- text_height.Value = val;
- }
- }
+ public int EncodeWidth { get { return (int)text_width.Value; } set { text_width.Value = value; } }
- // Mode Switch
- switch (drp_anamorphic.SelectedIndex)
- {
- case 0:
- if (drp_anamorphic.SelectedIndex != 3)
- {
- if (calculateUnchangeValue(false) != -1)
- text_width.Value = calculateUnchangeValue(false);
- }
- break;
- case 1:
- lbl_anamorphic.Text = strictAnamorphic();
- break;
- case 2:
- if (!looseAnamorphicHeightGuard)
- lbl_anamorphic.Text = looseAnamorphic();
- break;
- case 3:
- if (!heightChangeGuard)
- customAnamorphic(text_height);
- break;
- }
- heightChangeGuard = false;
- looseAnamorphicHeightGuard = false;
- heightModJumpGaurd = false;
+ public int EncodeHeight { get { return (int)text_height.Value; } set { text_height.Value = value; } }
- // A Picture Setting has changed so raise a PictureSettingsChanged event.
- if (this.PictureSettingsChanged != null)
- this.PictureSettingsChanged(this, new EventArgs());
- }
- private void check_KeepAR_CheckedChanged(object sender, EventArgs e)
+ public int[] CroppingValues
{
- // Recalculate Height based on width when enabled
- if (drp_anamorphic.SelectedIndex != 3 && check_KeepAR.Checked && selectedTitle != null)
- text_height.Value = cacluateHeight(widthVal);
-
- // Enable Par Width/Height Check boxes if Keep AR is enabled, otherwise disable them
- if (check_KeepAR.Checked)
- {
- txt_parWidth.Enabled = false;
- txt_parHeight.Enabled = false;
- }
- else
+ get
{
- txt_parWidth.Enabled = true;
- txt_parHeight.Enabled = true;
+ return new int[4]
+ {
+ (int)crop_top.Value,
+ (int)crop_bottom.Value,
+ (int)crop_left.Value,
+ (int)crop_right.Value
+ };
}
- }
- private void drp_anamorphic_SelectedIndexChanged(object sender, EventArgs e)
- {
- switch (drp_anamorphic.SelectedIndex)
+ set
{
- case 0: // None
- check_KeepAR.CheckState = CheckState.Checked;
- anamorphicWidgetContoller(0);
- if (selectedTitle != null)
- {
- text_width.Value = maxWidth != 0 ? maxWidth : selectedTitle.Resolution.Width;
- text_height.Value = maxHeight != 0 ? maxHeight : selectedTitle.Resolution.Height;
- setMax();
- }
- lbl_anamorphic.Text = "";
- break;
- case 1: // Strict
- if (selectedTitle != null)
- {
- heightModJumpGaurd = true;
- text_width.Value = selectedTitle.Resolution.Width - (int)crop_left.Value -
- (int)crop_right.Value;
- text_height.Value = selectedTitle.Resolution.Height - (int)crop_top.Value -
- (int)crop_bottom.Value;
- }
- anamorphicWidgetContoller(1);
- check_KeepAR.CheckState = CheckState.Unchecked;
- lbl_anamorphic.Text = strictAnamorphic();
- break;
- case 2: // Loose
- anamorphicWidgetContoller(2);
- storageAspect = 0;
- if (selectedTitle != null)
- {
- heightModJumpGaurd = true;
- text_width.Value = selectedTitle.Resolution.Width;
- text_height.Value = selectedTitle.Resolution.Height - (int)crop_top.Value -
- (int)crop_bottom.Value;
- }
- lbl_anamorphic.Text = looseAnamorphic();
- break;
- case 3: // Custom
- anamorphicWidgetContoller(3); // Display Elements
-
- // Actual Work
- if (selectedTitle != null)
- {
- heightModJumpGaurd = true;
- widthVal = selectedTitle.Resolution.Width;
- text_width.Value = selectedTitle.Resolution.Width - (int)crop_left.Value -
- (int)crop_right.Value;
- text_height.Value = selectedTitle.Resolution.Height - (int)crop_top.Value -
- (int)crop_bottom.Value;
- txt_parWidth.Text = selectedTitle.ParVal.Width.ToString();
- txt_parHeight.Text = selectedTitle.ParVal.Height.ToString();
- txt_displayWidth.Text = displayWidth().ToString(Culture);
- }
+ if (value.Length != 4)
+ {
+ throw new ArgumentException("The cropping values given must have a length of 4.");
+ }
- darValue = calculateDar();
- check_KeepAR.CheckState = CheckState.Checked;
- break;
+ crop_top.Value = value[0];
+ crop_bottom.Value = value[1];
+ crop_left.Value = value[2];
+ crop_right.Value = value[3];
}
-
- // A Picture Setting has changed so raise a PictureSettingsChanged event.
- if (this.PictureSettingsChanged != null)
- this.PictureSettingsChanged(this, new EventArgs());
}
- // Custom Anamorphic Controls
- private void txt_displayWidth_Keyup(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Enter)
- customAnamorphic(txt_displayWidth);
- }
- private void txt_parHeight_Keyup(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Enter)
- customAnamorphic(txt_parHeight);
- }
- private void txt_parWidth_Keyup(object sender, KeyEventArgs e)
+ /// <summary>
+ /// Gets or sets the maximum allowable width of the encoded video.
+ /// </summary>
+ public int MaximumWidth
{
- if (e.KeyCode == Keys.Enter)
- customAnamorphic(txt_parWidth);
- }
-
- // Cropping Controls
- private void check_autoCrop_CheckedChanged(object sender, EventArgs e)
- {
- crop_left.Enabled = false;
- crop_right.Enabled = false;
- crop_top.Enabled = false;
- crop_bottom.Enabled = false;
- }
- private void check_customCrop_CheckedChanged(object sender, EventArgs e)
- {
- crop_left.Enabled = true;
- crop_right.Enabled = true;
- crop_top.Enabled = true;
- crop_bottom.Enabled = true;
- if (selectedTitle != null)
- {
- crop_top.Value = selectedTitle.AutoCropDimensions[0];
- crop_bottom.Value = selectedTitle.AutoCropDimensions[1];
- crop_left.Value = selectedTitle.AutoCropDimensions[2];
- crop_right.Value = selectedTitle.AutoCropDimensions[3];
- }
- else
+ get { return _maxWidth; }
+ set
{
- crop_left.Value = 0;
- crop_right.Value = 0;
- crop_top.Value = 0;
- crop_bottom.Value = 0;
+ _maxWidth = value > 0 ? value : (Source != null ? Source.Resolution.Width : 2560);
}
}
- private void crop_left_ValueChanged(object sender, EventArgs e)
- {
- if (crop_left.Value % 2 != 0)
- crop_left.Value++;
- }
- private void crop_right_ValueChanged(object sender, EventArgs e)
- {
- if (crop_right.Value % 2 != 0)
- crop_right.Value++;
- }
- private void crop_top_ValueChanged(object sender, EventArgs e)
- {
- if (crop_top.Value % 2 != 0)
- crop_top.Value++;
- }
- private void crop_bottom_ValueChanged(object sender, EventArgs e)
- {
- if (crop_bottom.Value % 2 != 0)
- crop_bottom.Value++;
- }
- // Custom Anamorphic Code
- private void customAnamorphic(Control control)
+ /// <summary>
+ /// Gets or sets the maximum allowable height of the encoded video.
+ /// </summary>
+ public int MaximumHeight
{
- // Get and parse all the required values
- int cropLeft = (int)crop_left.Value;
- int cropRight = (int)crop_right.Value;
-
- int width = (int)text_width.Value;
- int cropped_width = width - cropLeft - cropRight;
-
- int mod = 16;
- int.TryParse(drop_modulus.SelectedItem.ToString(), out mod);
-
- int parW, parH;
- double displayWidth;
- int.TryParse(txt_parWidth.Text, out parW);
- int.TryParse(txt_parHeight.Text, out parH);
- double.TryParse(txt_displayWidth.Text, out displayWidth);
-
- /* NOT KEEPING DISPLAY ASPECT
- * Changing STORAGE WIDTH changes DISPLAY WIDTH to STORAGE WIDTH * PIXEL WIDTH / PIXEL HEIGHT
- * Changing PIXEL dimensions changes DISPLAY WIDTH to STORAGE WIDTH * PIXEL WIDTH / PIXEL HEIGHT
- * Changing DISPLAY WIDTH changes PIXEL WIDTH to DISPLAY WIDTH and PIXEL HEIGHT to STORAGE WIDTH
- * Changing HEIGHT just....changes the height.
- */
- if (!check_KeepAR.Checked)
+ get { return _maxHeight; }
+ set
{
- switch (control.Name)
- {
- case "text_width":
- double dw = (double)cropped_width * parW / parH;
- dw = Math.Round(dw, 2);
- txt_displayWidth.Text = dw.ToString(Culture);
- break;
- case "txt_parWidth":
- double dwpw = (double)cropped_width * parW / parH;
- dwpw = Math.Round(dwpw, 2);
- txt_displayWidth.Text = dwpw.ToString(Culture);
- break;
- case "txt_parHeight":
- double dwph = (double)cropped_width * parW / parH;
- dwph = Math.Round(dwph, 2);
- txt_displayWidth.Text = dwph.ToString(Culture);
- break;
- case "txt_displayWidth":
- txt_parWidth.Text = Math.Round(displayWidth, 0).ToString();
- txt_parHeight.Text = text_width.Text;
- break;
- }
+ _maxHeight = value > 0 ? value : (Source != null ? Source.Resolution.Height : 2560);
}
+ }
- /*
- * KEEPING DISPLAY ASPECT RATIO
- * DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)
- * Disable editing: PIXEL WIDTH, PIXEL HEIGHT
- * Changing DISPLAY WIDTH:
- * Changes HEIGHT to keep DAR
- * Changes PIXEL WIDTH to new DISPLAY WIDTH
- * Changes PIXEL HEIGHT to STORAGE WIDTH
- * Changing HEIGHT
- * Changes DISPLAY WIDTH to keep DAR
- * Changes PIXEL WIDTH to new DISPLAY WIDTH
- * Changes PIXEL HEIGHT to STORAGE WIDTH
- * Changing STORAGE_WIDTH:
- * Changes PIXEL WIDTH to DISPLAY WIDTH
- * Changes PIXEL HEIGHT to new STORAGE WIDTH
- */
-
- if (check_KeepAR.Checked)
- {
- switch (control.Name)
- {
- case "txt_displayWidth":
- heightChangeGuard = true;
- text_height.Value = (decimal)getHeightKeepDar(); //Changes HEIGHT to keep DAR
- //darValue = calculateDar(); // Cache the dar value
- txt_parWidth.Text = txt_displayWidth.Text;
- txt_parHeight.Text = cropped_width.ToString();
- break;
- case "text_height":
- heightChangeGuard = true;
- txt_displayWidth.Text = getDisplayWidthKeepDar().ToString(Culture); //Changes DISPLAY WIDTH to keep DAR
- txt_parWidth.Text = txt_displayWidth.Text;
- txt_parHeight.Text = cropped_width.ToString();
- break;
- case "text_width":
- txt_parWidth.Text = txt_displayWidth.Text;
- txt_parHeight.Text = cropped_width.ToString();
- break;
- }
- }
- }
- private double getDisplayWidthKeepDar()
+ public void setMax()
{
- double displayWidth;
- double.TryParse(txt_displayWidth.Text, out displayWidth);
- double currentDar = calculateDar();
- double newDwValue = displayWidth;
- // Correct display width up or down to correct for dar.
- if (currentDar > darValue)
- {
- while (currentDar > darValue)
- {
- displayWidth--;
- newDwValue = displayWidth;
- currentDar = calculateDarByVal(text_height.Value, displayWidth);
- }
- }
- else
- {
- while (currentDar < darValue)
- {
- displayWidth++;
- newDwValue = displayWidth;
- currentDar = calculateDarByVal(text_height.Value, displayWidth);
- }
- }
-
- return Math.Round(newDwValue, 2);
}
- private double getHeightKeepDar()
+
+ /// <summary>
+ /// Updates the anamorphic value shown as the display width.
+ /// </summary>
+ private void UpdateAnamorphicValue()
{
- double displayWidth;
- double.TryParse(txt_displayWidth.Text, out displayWidth);
- double currentDar = calculateDar();
- double newHeightVal = heightVal;
+ if (_title == null || _title.ParVal.IsEmpty)
+ return;
- // Correct display width up or down.
- if (currentDar > darValue)
- {
- while (currentDar > darValue)
- {
- heightVal++;
- newHeightVal = heightVal;
- currentDar = calculateDarByVal(heightVal, displayWidth);
- }
- }
- else
+ // Set globally useful values
+ double width;
+ double par;
+
+ switch (drp_anamorphic.SelectedIndex)
{
- while (currentDar < darValue)
- {
- heightVal--;
- newHeightVal = heightVal;
- currentDar = calculateDarByVal(heightVal, displayWidth);
- }
- }
+ case 2:
+ int actualWidth = (int)text_width.Value - (int)crop_left.Value - (int)crop_right.Value;
+ int source_display_width = Source.Resolution.Width * Source.ParVal.Width / Source.ParVal.Height;
+ int source_cropped_height = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
+ par = ((double) text_height.Value*source_display_width/source_cropped_height)/actualWidth;
+ width = (actualWidth * par);
+ width = Math.Truncate(width);
+ break;
+ default:
+ {
+ if (drp_anamorphic.SelectedIndex == 1) // Strict
+ par = (double)Source.ParVal.Width / Source.ParVal.Height;
+ else // Custom
+ par = (double)updownParWidth.Value / (double)updownParHeight.Value;
- return newHeightVal;
- }
- private double calculateDar()
- {
- // DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)
- double displayWidth;
- double.TryParse(txt_displayWidth.Text, out displayWidth);
+ // Store the latest DAR
+ double rawWidth = (double)text_width.Value * par;
+ _displayRatio = rawWidth / (double)text_height.Value;
+
+ width = (int)Math.Round(rawWidth);
+ break;
+ }
+ }
- double calculatedDar = displayWidth / (int)text_height.Value;
+ labelDisplaySize.Text = width + " x " + text_height.Value;
- return calculatedDar;
+ updownDisplayWidth.Value = (decimal)width;
+ updownParWidth.Value = (decimal)width;
+ updownParHeight.Value = text_width.Value;
}
- private double calculateDarByVal(decimal croppedHeight, double displayWidth)
+
+ /// <summary>
+ /// Sets the visibility of the advanced anamorphic options.
+ /// </summary>
+ /// <param name="value">Whether or not the options should be visible.</param>
+ private void SetCustomAnamorphicOptionsVisible(bool visible)
{
- // DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)
- double calculatedDar = darValue;
- if (croppedHeight > 0)
- calculatedDar = displayWidth / (double)croppedHeight;
+ lbl_modulus.Visible = visible;
+ lbl_displayWidth.Visible = visible;
+ lbl_parWidth.Visible = visible;
+ lbl_parHeight.Visible = visible;
- return calculatedDar;
+ drp_modulus.Visible = visible;
+ updownDisplayWidth.Visible = visible;
+ updownParWidth.Visible = visible;
+ updownParHeight.Visible = visible;
}
- private int displayWidth()
- {
- if (selectedTitle != null)
- {
- int actualWidth = (int)text_width.Value;
- int displayWidth = 0;
- int parW, parH;
- int.TryParse(txt_parWidth.Text, out parW);
- int.TryParse(txt_parHeight.Text, out parH);
+ /// <summary>
+ /// Gets the normalized value from one given by the user that is divisible by the number
+ /// set in <see cref="_modulus"/>.
+ /// </summary>
+ /// <param name="value">The value to normalize</param>
+ /// <returns>A number that is divisible by <see cref="_modulus"/>.</returns>
+ /// <remarks>
+ /// The way that some video codecs, such as x264, compress video is by creating "macroblocks"
+ /// that are seperated into defined squares, often 16x16 pixels. Because of this, if the width
+ /// and height of the encoded video are not each divisible by the modulus defined, video quality
+ /// will suffer. This method takes the supplied value and normalizes it to the nearest mutliple
+ /// of <see cref="_modulus"/>.
+ /// </remarks>
+ private int GetModulusValue(int value)
+ {
+ int mod = int.Parse(drp_modulus.SelectedItem.ToString());
+ int remainder = value % mod;
- if (drp_anamorphic.SelectedIndex != 3)
- displayWidth = (actualWidth * selectedTitle.ParVal.Width / selectedTitle.ParVal.Height);
- else if (parW > 0 && parH > 0)
- displayWidth = (actualWidth * parW / parH);
+ if (remainder == 0)
+ return value;
- return displayWidth;
- }
- return -1;
+ return remainder >= mod / 2 ? value + (mod - remainder) : value - remainder;
}
- // Resolution calculation and controls
- private decimal widthChangeMod(int mod)
+ private void ApplyStrictAnamorphic()
{
- // Increase or decrease the height based on the users input.
- decimal returnVal = text_width.Value > widthVal ? getResolutionJump(mod, text_width.Value, true) : getResolutionJump(mod, text_width.Value, false);
+ if (_anamorphicRatio == 0)
+ return;
- // Make sure we don't go above source value
- if (selectedTitle != null)
- if (selectedTitle.Resolution.Width < returnVal)
- returnVal = selectedTitle.Resolution.Width;
+ _preventChangingWidth = true;
+ _preventChangingHeight = true;
- /*if (returnVal < 64)
- returnVal = 64; */
+ text_width.Value = _title.Resolution.Width;
+ text_height.Value = _title.Resolution.Height;
- // Set the global tracker
- widthVal = (int)returnVal;
-
- return returnVal;
+ _preventChangingWidth = false;
+ _preventChangingHeight = false;
}
- private decimal heightChangeMod(int mod)
+
+ /// <summary>
+ /// Loosely anamorphs encode width and height values.
+ /// </summary>
+ private void ApplyLooseAnamorphic()
{
- // Increase or decrease the height based on the users input.
- decimal returnVal = text_height.Value > heightVal ? getResolutionJump(mod, text_height.Value, true) : getResolutionJump(mod, text_height.Value, false);
+ // Prevents DivideByZeroExceptions
+ if (_anamorphicRatio == 0)
+ return;
- // Make sure we don't go above source value
- if (selectedTitle != null)
- if (selectedTitle.Resolution.Height < returnVal)
- returnVal = selectedTitle.Resolution.Height;
+ int actualWidth = (int)text_width.Value - (int)crop_left.Value - (int)crop_right.Value;
+ int source_cropped_height = Source.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
- /*if (returnVal < 64)
- returnVal = 64;*/
+ if (storageAspect == 0)
+ storageAspect = (double)actualWidth / source_cropped_height;
+ double hcalc = (actualWidth / storageAspect) + 0.5;
+ double newHeight = GetModulusValue((int)hcalc);
- // Set the global tracker
- heightVal = (int)returnVal;
+ text_width.Value = GetModulusValue((int)text_width.Value);
+ text_height.Value = (decimal)newHeight;
- return returnVal;
+ UpdateAnamorphicValue();
}
- private decimal calculateUnchangeValue(Boolean widthChangeFromControl)
- {
- decimal newValue = -1;
- if (selectedTitle != null && drp_anamorphic.SelectedIndex != 3 && drp_anamorphic.SelectedIndex != 2)
- if (widthChangeFromControl)
- newValue = cacluateHeight(widthVal);
- else
- {
- if (check_KeepAR.Checked)
- newValue = cacluateWidth(heightVal);
- }
- return newValue;
- }
- private static int getResolutionJump(int mod, decimal value, Boolean up)
+ /// <summary>
+ /// Anamorphs encode width and height based on the custom options specified.
+ /// </summary>
+ private void ApplyCustomAnamorphic(Control ctrlUpdated)
{
- if (up)
- while ((value % mod) != 0)
- value++;
- else
- while ((value % mod) != 0)
- value--;
+ // Make sure the PAR values are set correctly
+ if (updownParWidth.Value == 0)
+ updownParWidth.Value = Source.ParVal.Width;
+ if (updownParHeight.Value == 0)
+ updownParHeight.Value = Source.ParVal.Height;
- return (int)value;
- }
- private static double getModulusAuto(int mod, double value)
- {
- int modDiv2 = mod / 2;
+ // Set various values
+ int parWidth = (int)updownParWidth.Value;
+ int parHeight = (int)updownParHeight.Value;
- if ((value % mod) != 0)
+ if (!check_KeepAR.Checked)
{
- double modVal = (int)value % mod;
- if (modVal >= modDiv2)
- {
- modVal = 16 - modVal;
- value = (int)value + (int)modVal;
- }
- else
+ switch (ctrlUpdated.Name)
{
- value = (int)value - (int)modVal;
+ case "text_width":
+ case "updownParWidth":
+ case "updownParHeight":
+ updownDisplayWidth.Value = Math.Round(text_width.Value * parWidth / parHeight);
+ break;
+ case "updownDisplayWidth":
+ updownParWidth.Value = updownDisplayWidth.Value;
+ updownParHeight.Value = text_width.Value;
+ break;
}
}
- return value;
- }
- private int cacluateHeight(int width)
- {
- if (selectedTitle != null)
+ else
{
- int aw = 0;
- int ah = 0;
- if (selectedTitle.AspectRatio == 1.78F)
+ switch (ctrlUpdated.Name)
{
- aw = 16;
- ah = 9;
- }
- if (selectedTitle.AspectRatio == 1.33F)
- {
- aw = 4;
- ah = 3;
- }
+ case "updownDisplayWidth":
+ _preventChangingHeight = true;
- if (aw != 0)
- {
- // Crop_Width = Title->Width - crop_Left - crop_right
- // Crop_Height = Title->Height - crop_top - crop_bottom
- double crop_width = selectedTitle.Resolution.Width - (double)crop_left.Value -
- (double)crop_right.Value;
- double crop_height = selectedTitle.Resolution.Height - (double)crop_top.Value -
- (double)crop_bottom.Value;
-
- double new_height = (width * selectedTitle.Resolution.Width * ah * crop_height) /
- (selectedTitle.Resolution.Height * aw * crop_width);
-
- new_height = drp_anamorphic.SelectedIndex == 3 ? getModulusAuto(int.Parse(drop_modulus.SelectedItem.ToString()), new_height) : getModulusAuto(16, new_height);
-
- int x = int.Parse(new_height.ToString());
- /*if (x < 64)
- x = 64; */
- return x;
+ text_height.Value = GetModulusValue((int)((double)updownDisplayWidth.Value / _displayRatio));
+
+ _preventChangingHeight = false;
+ goto case "text_width";
+ case "text_height":
+ updownDisplayWidth.Value = GetModulusValue((int)((double)text_width.Value * _anamorphicRatio * _displayRatio));
+ goto case "text_width";
+ case "text_width":
+ updownParWidth.Value = updownDisplayWidth.Value;
+ updownParHeight.Value = text_width.Value;
+ break;
}
}
- return 0;
}
- private int cacluateWidth(int height)
- {
- int aw = 0;
- int ah = 0;
- if (selectedTitle.AspectRatio == 1.78F)
- {
- aw = 16;
- ah = 9;
- }
- if (selectedTitle.AspectRatio == 1.33F)
- {
- aw = 4;
- ah = 3;
- }
-
- if (aw != 0)
- {
-
- double crop_width = selectedTitle.Resolution.Width - (double)crop_left.Value - (double)crop_right.Value;
- double crop_height = selectedTitle.Resolution.Height - (double)crop_top.Value - (double)crop_bottom.Value;
- double new_width = (height * selectedTitle.Resolution.Height * aw * crop_width) /
- (selectedTitle.Resolution.Width * ah * crop_height);
- if (drp_anamorphic.SelectedIndex == 3)
- new_width = getModulusAuto(int.Parse(drop_modulus.SelectedItem.ToString()), new_width);
- else
- new_width = getModulusAuto(16, new_width);
+ private void text_width_ValueChanged(object sender, EventArgs e)
+ {
+ if (_preventChangingWidth)
+ return;
- int x = int.Parse(new_width.ToString());
-
- if (x < 64)
- x = 64;
+ _preventChangingWidth = true;
- return x;
+ if (text_width.Value > MaximumWidth)
+ {
+ text_width.Value = MaximumWidth;
}
- return 64;
- }
- // Calculate Resolution for Anamorphic functions
- private string strictAnamorphic()
- {
- if (selectedTitle != null)
+ switch (drp_anamorphic.SelectedIndex)
{
- // Calculate the Actual Height
- int actualWidth = (int)text_width.Value - (int)crop_left.Value - (int)crop_right.Value; ;
- int actualHeight = selectedTitle.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
+ case 0:
+ if (check_KeepAR.Checked)
+ {
+ _preventChangingHeight = true;
- // Calculate Actual Width
- double displayWidth = ((double)actualWidth * selectedTitle.ParVal.Width / selectedTitle.ParVal.Height);
- return Math.Round(displayWidth, 0) + "x" + actualHeight;
+ decimal newHeight = text_width.Value / (decimal)_anamorphicRatio;
+ text_height.Value = newHeight > MaximumHeight ? MaximumHeight : newHeight;
+
+ _preventChangingHeight = false;
+ }
+ break;
+ case 1:
+ ApplyStrictAnamorphic();
+ break;
+ case 2:
+ ApplyLooseAnamorphic();
+ break;
+ case 3:
+ ApplyCustomAnamorphic((Control)sender);
+ break;
}
- return "Select a Title";
+
+ _preventChangingWidth = false;
}
- private string looseAnamorphic()
- {
- if (selectedTitle != null)
- {
- // Get some values
- int actualWidth = (int)text_width.Value - (int)crop_left.Value - (int)crop_right.Value;
- int source_display_width = selectedTitle.Resolution.Width * selectedTitle.ParVal.Width / selectedTitle.ParVal.Height;
- int source_cropped_height = selectedTitle.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;
+ private void text_height_ValueChanged(object sender, EventArgs e)
+ {
+ if (_preventChangingHeight)
+ return;
- // Calculate storage Aspect and cache it for reuse
- if (storageAspect == 0)
- storageAspect = (double)actualWidth / source_cropped_height;
+ _preventChangingHeight = true;
- // Calculate the new height based on the input cropped width
- double hcalc = (actualWidth / storageAspect) + 0.5;
- double newHeight = getModulusAuto(16, hcalc);
- looseAnamorphicHeightGuard = true;
+ if (text_height.Value > MaximumHeight)
+ {
+ text_height.Value = MaximumHeight;
+ }
- if (newHeight < 64)
- newHeight = 64;
- text_height.Value = (decimal)newHeight;
+ switch (drp_anamorphic.SelectedIndex)
+ {
+ case 0:
+ if (check_KeepAR.Checked)
+ {
+ _preventChangingWidth = true;
- // Calculate the anamorphic width
- double parW = newHeight * source_display_width / source_cropped_height;
- double parH = actualWidth;
- double displayWidth = (actualWidth * parW / parH);
+ decimal newWidth = text_height.Value * (decimal)_anamorphicRatio;
+ text_width.Value = newWidth > MaximumWidth ? MaximumWidth : newWidth;
- // Now correct DisplayWidth to maintain Aspect ratio. ActualHeight was mod16'd and thus AR is slightly different than the worked out displayWidths
- return Math.Truncate(displayWidth) + "x" + newHeight;
+ _preventChangingWidth = false;
+ }
+ break;
+ case 3:
+ ApplyCustomAnamorphic((Control)sender);
+ break;
}
- return "Select a Title";
+
+ _preventChangingHeight = false;
}
- // Function to control the enable / disable property of the display controls.
- private void anamorphicWidgetContoller(int mode)
+ private void drp_anamorphic_SelectedIndexChanged(object sender, EventArgs e)
{
-
- switch (mode)
+ switch (drp_anamorphic.SelectedIndex)
{
- case 0: // None
- text_height.Enabled = true;
+ case 0:
text_width.Enabled = true;
+ text_height.Enabled = true;
check_KeepAR.Enabled = true;
- lbl_anamprohicLbl.Visible = false;
+
+ SetCustomAnamorphicOptionsVisible(false);
+ labelStaticDisplaySize.Visible = false;
+ labelDisplaySize.Visible = false;
+
+ check_KeepAR.Checked = true;
break;
- case 1: // Strict
- text_height.Enabled = false;
+ case 1:
text_width.Enabled = false;
+ text_height.Enabled = false;
check_KeepAR.Enabled = false;
- lbl_anamprohicLbl.Visible = true;
+
+ SetCustomAnamorphicOptionsVisible(false);
+ labelStaticDisplaySize.Visible = true;
+ labelDisplaySize.Visible = true;
+
+ check_KeepAR.Checked = true;
break;
- case 2: // Loose
- text_height.Enabled = false;
+ case 2:
text_width.Enabled = true;
+ text_height.Enabled = false;
check_KeepAR.Enabled = false;
- lbl_anamprohicLbl.Visible = true;
+
+ SetCustomAnamorphicOptionsVisible(false);
+ labelStaticDisplaySize.Visible = true;
+ labelDisplaySize.Visible = true;
+
+ check_KeepAR.Checked = true;
break;
- case 3: // Custom
- text_height.Enabled = true;
+ case 3:
text_width.Enabled = true;
+ text_height.Enabled = true;
check_KeepAR.Enabled = true;
- // Labels
- lbl_anamprohicLbl.Visible = true;
- lbl_modulus.Visible = true;
- lbl_displayWidth.Visible = true;
- lbl_parWidth.Visible = true;
- lbl_parHeight.Visible = true;
- // Controls
- drop_modulus.Visible = true;
- txt_displayWidth.Visible = true;
- txt_parWidth.Visible = true;
- txt_parHeight.Visible = true;
+
+ SetCustomAnamorphicOptionsVisible(true);
+ labelStaticDisplaySize.Visible = true;
+ labelDisplaySize.Visible = true;
+
+ check_KeepAR.Checked = true;
break;
}
- // Disable All the custom anamorphic controls if not required.
- if (mode != 3)
- {
- // Labels
- lbl_modulus.Visible = false;
- lbl_displayWidth.Visible = false;
- lbl_parWidth.Visible = false;
- lbl_parHeight.Visible = false;
-
- // Controls
- drop_modulus.Visible = false;
- txt_displayWidth.Visible = false;
- txt_parWidth.Visible = false;
- txt_parHeight.Visible = false;
+ UpdateAnamorphicValue();
+ }
+ private void check_KeepAR_CheckedChanged(object sender, EventArgs e)
+ {
+ if (drp_anamorphic.SelectedIndex != 3)
+ {
+ if (check_KeepAR.Checked)
+ {
+ text_width_ValueChanged(this, new EventArgs());
+ }
}
+ else
+ {
+ updownParWidth.Enabled = !check_KeepAR.Checked;
+ updownParHeight.Enabled = !check_KeepAR.Checked;
+ }
+ }
+
+ private void crop_ValueChanged(object sender, EventArgs e)
+ {
+ text_width_ValueChanged(this, new EventArgs());
+ }
+
+ private void check_autoCrop_CheckedChanged(object sender, EventArgs e)
+ {
+ crop_top.Enabled = check_customCrop.Checked;
+ crop_bottom.Enabled = check_customCrop.Checked;
+ crop_left.Enabled = check_customCrop.Checked;
+ crop_right.Enabled = check_customCrop.Checked;
}
+ private void drp_modulus_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ text_width.Increment = int.Parse(drp_modulus.SelectedItem.ToString());
+ text_height.Increment = int.Parse(drp_modulus.SelectedItem.ToString());
+ }
}
-} \ No newline at end of file
+}
diff --git a/win/C#/Controls/PictureSettings.resx b/win/C#/Controls/PictureSettings.resx
index aec224f68..ff31a6db5 100644
--- a/win/C#/Controls/PictureSettings.resx
+++ b/win/C#/Controls/PictureSettings.resx
@@ -117,1031 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- <data name="text_height.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="text_height.Location" type="System.Drawing.Point, System.Drawing">
- <value>206, 59</value>
- </data>
- <data name="text_height.Size" type="System.Drawing.Size, System.Drawing">
- <value>64, 21</value>
- </data>
- <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <data name="text_height.TabIndex" type="System.Int32, mscorlib">
- <value>50</value>
- </data>
- <data name="&gt;&gt;text_height.Name" xml:space="preserve">
- <value>text_height</value>
- </data>
- <data name="&gt;&gt;text_height.Type" xml:space="preserve">
- <value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;text_height.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;text_height.ZOrder" xml:space="preserve">
- <value>22</value>
- </data>
- <data name="text_width.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="text_width.Location" type="System.Drawing.Point, System.Drawing">
- <value>68, 59</value>
- </data>
- <data name="text_width.Size" type="System.Drawing.Size, System.Drawing">
- <value>64, 21</value>
- </data>
- <data name="text_width.TabIndex" type="System.Int32, mscorlib">
- <value>49</value>
- </data>
- <data name="&gt;&gt;text_width.Name" xml:space="preserve">
- <value>text_width</value>
- </data>
- <data name="&gt;&gt;text_width.Type" xml:space="preserve">
- <value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;text_width.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;text_width.ZOrder" xml:space="preserve">
- <value>23</value>
- </data>
- <data name="label4.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="label4.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="label4.Location" type="System.Drawing.Point, System.Drawing">
- <value>152, 63</value>
- </data>
- <data name="label4.Size" type="System.Drawing.Size, System.Drawing">
- <value>42, 13</value>
- </data>
- <data name="label4.TabIndex" type="System.Int32, mscorlib">
- <value>48</value>
- </data>
- <data name="label4.Text" xml:space="preserve">
- <value>Height:</value>
- </data>
- <data name="&gt;&gt;label4.Name" xml:space="preserve">
- <value>label4</value>
- </data>
- <data name="&gt;&gt;label4.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;label4.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
- <value>24</value>
- </data>
- <data name="lbl_max.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="lbl_max.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="lbl_max.Location" type="System.Drawing.Point, System.Drawing">
- <value>279, 61</value>
- </data>
- <data name="lbl_max.Size" type="System.Drawing.Size, System.Drawing">
- <value>37, 13</value>
- </data>
- <data name="lbl_max.TabIndex" type="System.Int32, mscorlib">
- <value>47</value>
- </data>
- <data name="lbl_max.Text" xml:space="preserve">
- <value>{max}</value>
- </data>
- <data name="&gt;&gt;lbl_max.Name" xml:space="preserve">
- <value>lbl_max</value>
- </data>
- <data name="&gt;&gt;lbl_max.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;lbl_max.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;lbl_max.ZOrder" xml:space="preserve">
- <value>25</value>
- </data>
- <data name="lbl_src_res.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="lbl_src_res.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="lbl_src_res.Location" type="System.Drawing.Point, System.Drawing">
- <value>66, 36</value>
- </data>
- <data name="lbl_src_res.Size" type="System.Drawing.Size, System.Drawing">
- <value>68, 13</value>
- </data>
- <data name="lbl_src_res.TabIndex" type="System.Int32, mscorlib">
- <value>41</value>
- </data>
- <data name="lbl_src_res.Text" xml:space="preserve">
- <value>Select a Title</value>
- </data>
- <data name="&gt;&gt;lbl_src_res.Name" xml:space="preserve">
- <value>lbl_src_res</value>
- </data>
- <data name="&gt;&gt;lbl_src_res.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;lbl_src_res.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;lbl_src_res.ZOrder" xml:space="preserve">
- <value>26</value>
- </data>
- <data name="label7.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="label7.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="label7.Location" type="System.Drawing.Point, System.Drawing">
- <value>13, 35</value>
- </data>
- <data name="label7.Size" type="System.Drawing.Size, System.Drawing">
- <value>44, 13</value>
- </data>
- <data name="label7.TabIndex" type="System.Int32, mscorlib">
- <value>40</value>
- </data>
- <data name="label7.Text" xml:space="preserve">
- <value>Source:</value>
- </data>
- <data name="&gt;&gt;label7.Name" xml:space="preserve">
- <value>label7</value>
- </data>
- <data name="&gt;&gt;label7.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;label7.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;label7.ZOrder" xml:space="preserve">
- <value>27</value>
- </data>
- <data name="label6.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="label6.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="label6.Location" type="System.Drawing.Point, System.Drawing">
- <value>14, 119</value>
- </data>
- <data name="label6.Size" type="System.Drawing.Size, System.Drawing">
- <value>67, 13</value>
- </data>
- <data name="label6.TabIndex" type="System.Int32, mscorlib">
- <value>45</value>
- </data>
- <data name="label6.Text" xml:space="preserve">
- <value>Anamorphic:</value>
- </data>
- <data name="&gt;&gt;label6.Name" xml:space="preserve">
- <value>label6</value>
- </data>
- <data name="&gt;&gt;label6.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;label6.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
- <value>28</value>
- </data>
- <data name="drp_anamorphic.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="drp_anamorphic.Items" xml:space="preserve">
- <value>None</value>
- </data>
- <data name="drp_anamorphic.Items1" xml:space="preserve">
- <value>Strict</value>
- </data>
- <data name="drp_anamorphic.Items2" xml:space="preserve">
- <value>Loose</value>
- </data>
- <data name="drp_anamorphic.Items3" xml:space="preserve">
- <value>Custom</value>
- </data>
- <data name="drp_anamorphic.Location" type="System.Drawing.Point, System.Drawing">
- <value>110, 116</value>
- </data>
- <data name="drp_anamorphic.Size" type="System.Drawing.Size, System.Drawing">
- <value>110, 21</value>
- </data>
- <data name="drp_anamorphic.TabIndex" type="System.Int32, mscorlib">
- <value>46</value>
- </data>
- <data name="&gt;&gt;drp_anamorphic.Name" xml:space="preserve">
- <value>drp_anamorphic</value>
- </data>
- <data name="&gt;&gt;drp_anamorphic.Type" xml:space="preserve">
- <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;drp_anamorphic.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;drp_anamorphic.ZOrder" xml:space="preserve">
- <value>29</value>
- </data>
- <data name="label26.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="label26.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt, style=Bold</value>
- </data>
- <data name="label26.Location" type="System.Drawing.Point, System.Drawing">
- <value>13, 13</value>
- </data>
- <data name="label26.Size" type="System.Drawing.Size, System.Drawing">
- <value>30, 13</value>
- </data>
- <data name="label26.TabIndex" type="System.Int32, mscorlib">
- <value>39</value>
- </data>
- <data name="label26.Text" xml:space="preserve">
- <value>Size</value>
- </data>
- <data name="&gt;&gt;label26.Name" xml:space="preserve">
- <value>label26</value>
- </data>
- <data name="&gt;&gt;label26.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;label26.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;label26.ZOrder" xml:space="preserve">
- <value>30</value>
- </data>
- <data name="lbl_Aspect.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="lbl_Aspect.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="lbl_Aspect.Location" type="System.Drawing.Point, System.Drawing">
- <value>241, 36</value>
- </data>
- <data name="lbl_Aspect.Size" type="System.Drawing.Size, System.Drawing">
- <value>68, 13</value>
- </data>
- <data name="lbl_Aspect.TabIndex" type="System.Int32, mscorlib">
- <value>43</value>
- </data>
- <data name="lbl_Aspect.Text" xml:space="preserve">
- <value>Select a Title</value>
- </data>
- <data name="&gt;&gt;lbl_Aspect.Name" xml:space="preserve">
- <value>lbl_Aspect</value>
- </data>
- <data name="&gt;&gt;lbl_Aspect.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;lbl_Aspect.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;lbl_Aspect.ZOrder" xml:space="preserve">
- <value>31</value>
- </data>
- <data name="Label91.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="Label91.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="Label91.Location" type="System.Drawing.Point, System.Drawing">
- <value>152, 35</value>
- </data>
- <data name="Label91.Size" type="System.Drawing.Size, System.Drawing">
- <value>72, 13</value>
- </data>
- <data name="Label91.TabIndex" type="System.Int32, mscorlib">
- <value>42</value>
- </data>
- <data name="Label91.Text" xml:space="preserve">
- <value>Aspect Ratio:</value>
- </data>
- <data name="&gt;&gt;Label91.Name" xml:space="preserve">
- <value>Label91</value>
- </data>
- <data name="&gt;&gt;Label91.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;Label91.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;Label91.ZOrder" xml:space="preserve">
- <value>32</value>
- </data>
- <data name="Label55.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="Label55.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="Label55.Location" type="System.Drawing.Point, System.Drawing">
- <value>13, 63</value>
- </data>
- <data name="Label55.Size" type="System.Drawing.Size, System.Drawing">
- <value>39, 13</value>
- </data>
- <data name="Label55.TabIndex" type="System.Int32, mscorlib">
- <value>44</value>
- </data>
- <data name="Label55.Text" xml:space="preserve">
- <value>Width:</value>
- </data>
- <data name="&gt;&gt;Label55.Name" xml:space="preserve">
- <value>Label55</value>
- </data>
- <data name="&gt;&gt;Label55.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;Label55.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;Label55.ZOrder" xml:space="preserve">
- <value>33</value>
- </data>
- <data name="lbl_modulus.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="lbl_modulus.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="lbl_modulus.Location" type="System.Drawing.Point, System.Drawing">
- <value>14, 146</value>
- </data>
- <data name="lbl_modulus.Size" type="System.Drawing.Size, System.Drawing">
- <value>50, 13</value>
- </data>
- <data name="lbl_modulus.TabIndex" type="System.Int32, mscorlib">
- <value>51</value>
- </data>
- <data name="lbl_modulus.Text" xml:space="preserve">
- <value>Modulus:</value>
- </data>
- <data name="&gt;&gt;lbl_modulus.Name" xml:space="preserve">
- <value>lbl_modulus</value>
- </data>
- <data name="&gt;&gt;lbl_modulus.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;lbl_modulus.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;lbl_modulus.ZOrder" xml:space="preserve">
- <value>20</value>
- </data>
- <data name="drop_modulus.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="drop_modulus.Items" xml:space="preserve">
- <value>16</value>
- </data>
- <data name="drop_modulus.Items1" xml:space="preserve">
- <value>8</value>
- </data>
- <data name="drop_modulus.Items2" xml:space="preserve">
- <value>4</value>
- </data>
- <data name="drop_modulus.Items3" xml:space="preserve">
- <value>2</value>
- </data>
- <data name="drop_modulus.Location" type="System.Drawing.Point, System.Drawing">
- <value>110, 143</value>
- </data>
- <data name="drop_modulus.Size" type="System.Drawing.Size, System.Drawing">
- <value>110, 21</value>
- </data>
- <data name="drop_modulus.TabIndex" type="System.Int32, mscorlib">
- <value>52</value>
- </data>
- <data name="&gt;&gt;drop_modulus.Name" xml:space="preserve">
- <value>drop_modulus</value>
- </data>
- <data name="&gt;&gt;drop_modulus.Type" xml:space="preserve">
- <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;drop_modulus.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;drop_modulus.ZOrder" xml:space="preserve">
- <value>21</value>
- </data>
- <data name="txt_displayWidth.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="txt_displayWidth.Location" type="System.Drawing.Point, System.Drawing">
- <value>110, 170</value>
- </data>
- <data name="txt_displayWidth.Size" type="System.Drawing.Size, System.Drawing">
- <value>100, 21</value>
- </data>
- <data name="txt_displayWidth.TabIndex" type="System.Int32, mscorlib">
- <value>53</value>
- </data>
- <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
- <data name="txt_displayWidth.ToolTip" xml:space="preserve">
- <value>Display Width - Press "Enter" after entering a new value.</value>
- </data>
- <data name="&gt;&gt;txt_displayWidth.Name" xml:space="preserve">
- <value>txt_displayWidth</value>
- </data>
- <data name="&gt;&gt;txt_displayWidth.Type" xml:space="preserve">
- <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;txt_displayWidth.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;txt_displayWidth.ZOrder" xml:space="preserve">
- <value>19</value>
- </data>
- <data name="lbl_displayWidth.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="lbl_displayWidth.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="lbl_displayWidth.Location" type="System.Drawing.Point, System.Drawing">
- <value>14, 173</value>
- </data>
- <data name="lbl_displayWidth.Size" type="System.Drawing.Size, System.Drawing">
- <value>76, 13</value>
- </data>
- <data name="lbl_displayWidth.TabIndex" type="System.Int32, mscorlib">
- <value>54</value>
- </data>
- <data name="lbl_displayWidth.Text" xml:space="preserve">
- <value>Display Width:</value>
- </data>
- <data name="&gt;&gt;lbl_displayWidth.Name" xml:space="preserve">
- <value>lbl_displayWidth</value>
- </data>
- <data name="&gt;&gt;lbl_displayWidth.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;lbl_displayWidth.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;lbl_displayWidth.ZOrder" xml:space="preserve">
- <value>18</value>
- </data>
- <data name="lbl_parWidth.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="lbl_parWidth.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="lbl_parWidth.Location" type="System.Drawing.Point, System.Drawing">
- <value>14, 199</value>
- </data>
- <data name="lbl_parWidth.Size" type="System.Drawing.Size, System.Drawing">
- <value>62, 13</value>
- </data>
- <data name="lbl_parWidth.TabIndex" type="System.Int32, mscorlib">
- <value>56</value>
- </data>
- <data name="lbl_parWidth.Text" xml:space="preserve">
- <value>PAR Width:</value>
- </data>
- <data name="&gt;&gt;lbl_parWidth.Name" xml:space="preserve">
- <value>lbl_parWidth</value>
- </data>
- <data name="&gt;&gt;lbl_parWidth.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;lbl_parWidth.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;lbl_parWidth.ZOrder" xml:space="preserve">
- <value>16</value>
- </data>
- <data name="txt_parWidth.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="txt_parWidth.Location" type="System.Drawing.Point, System.Drawing">
- <value>110, 196</value>
- </data>
- <data name="txt_parWidth.Size" type="System.Drawing.Size, System.Drawing">
- <value>100, 21</value>
- </data>
- <data name="txt_parWidth.TabIndex" type="System.Int32, mscorlib">
- <value>55</value>
- </data>
- <data name="txt_parWidth.ToolTip" xml:space="preserve">
- <value>PAR Width - Press "Enter" after entering a new value.
-</value>
- </data>
- <data name="&gt;&gt;txt_parWidth.Name" xml:space="preserve">
- <value>txt_parWidth</value>
- </data>
- <data name="&gt;&gt;txt_parWidth.Type" xml:space="preserve">
- <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;txt_parWidth.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;txt_parWidth.ZOrder" xml:space="preserve">
- <value>17</value>
- </data>
- <data name="lbl_parHeight.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="lbl_parHeight.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="lbl_parHeight.Location" type="System.Drawing.Point, System.Drawing">
- <value>14, 225</value>
- </data>
- <data name="lbl_parHeight.Size" type="System.Drawing.Size, System.Drawing">
- <value>65, 13</value>
- </data>
- <data name="lbl_parHeight.TabIndex" type="System.Int32, mscorlib">
- <value>58</value>
- </data>
- <data name="lbl_parHeight.Text" xml:space="preserve">
- <value>PAR Height:</value>
- </data>
- <data name="&gt;&gt;lbl_parHeight.Name" xml:space="preserve">
- <value>lbl_parHeight</value>
- </data>
- <data name="&gt;&gt;lbl_parHeight.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;lbl_parHeight.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;lbl_parHeight.ZOrder" xml:space="preserve">
- <value>14</value>
- </data>
- <data name="txt_parHeight.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="txt_parHeight.Location" type="System.Drawing.Point, System.Drawing">
- <value>110, 222</value>
- </data>
- <data name="txt_parHeight.Size" type="System.Drawing.Size, System.Drawing">
- <value>100, 21</value>
- </data>
- <data name="txt_parHeight.TabIndex" type="System.Int32, mscorlib">
- <value>57</value>
- </data>
- <data name="txt_parHeight.ToolTip" xml:space="preserve">
- <value>PAR Height - Press "Enter" after entering a new value.
-</value>
- </data>
- <data name="&gt;&gt;txt_parHeight.Name" xml:space="preserve">
- <value>txt_parHeight</value>
- </data>
- <data name="&gt;&gt;txt_parHeight.Type" xml:space="preserve">
- <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;txt_parHeight.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;txt_parHeight.ZOrder" xml:space="preserve">
- <value>15</value>
- </data>
- <data name="check_KeepAR.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="check_KeepAR.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="check_KeepAR.Location" type="System.Drawing.Point, System.Drawing">
- <value>68, 85</value>
- </data>
- <data name="check_KeepAR.Size" type="System.Drawing.Size, System.Drawing">
- <value>114, 17</value>
- </data>
- <data name="check_KeepAR.TabIndex" type="System.Int32, mscorlib">
- <value>59</value>
- </data>
- <data name="check_KeepAR.Text" xml:space="preserve">
- <value>Keep Aspect Ratio</value>
- </data>
- <data name="&gt;&gt;check_KeepAR.Name" xml:space="preserve">
- <value>check_KeepAR</value>
- </data>
- <data name="&gt;&gt;check_KeepAR.Type" xml:space="preserve">
- <value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;check_KeepAR.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;check_KeepAR.ZOrder" xml:space="preserve">
- <value>13</value>
- </data>
- <data name="check_customCrop.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="check_customCrop.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="check_customCrop.Location" type="System.Drawing.Point, System.Drawing">
- <value>399, 57</value>
- </data>
- <data name="check_customCrop.Size" type="System.Drawing.Size, System.Drawing">
- <value>65, 17</value>
- </data>
- <data name="check_customCrop.TabIndex" type="System.Int32, mscorlib">
- <value>70</value>
- </data>
- <data name="check_customCrop.Text" xml:space="preserve">
- <value>Custom:</value>
- </data>
- <data name="&gt;&gt;check_customCrop.Name" xml:space="preserve">
- <value>check_customCrop</value>
- </data>
- <data name="&gt;&gt;check_customCrop.Type" xml:space="preserve">
- <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;check_customCrop.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;check_customCrop.ZOrder" xml:space="preserve">
- <value>2</value>
- </data>
- <data name="check_autoCrop.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="check_autoCrop.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="check_autoCrop.Location" type="System.Drawing.Point, System.Drawing">
- <value>399, 33</value>
- </data>
- <data name="check_autoCrop.Size" type="System.Drawing.Size, System.Drawing">
- <value>73, 17</value>
- </data>
- <data name="check_autoCrop.TabIndex" type="System.Int32, mscorlib">
- <value>69</value>
- </data>
- <data name="check_autoCrop.Text" xml:space="preserve">
- <value>Automatic</value>
- </data>
- <data name="&gt;&gt;check_autoCrop.Name" xml:space="preserve">
- <value>check_autoCrop</value>
- </data>
- <data name="&gt;&gt;check_autoCrop.Type" xml:space="preserve">
- <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;check_autoCrop.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;check_autoCrop.ZOrder" xml:space="preserve">
- <value>3</value>
- </data>
- <data name="crop_bottom.Enabled" type="System.Boolean, mscorlib">
- <value>False</value>
- </data>
- <data name="crop_bottom.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="crop_bottom.Location" type="System.Drawing.Point, System.Drawing">
- <value>479, 146</value>
- </data>
- <data name="crop_bottom.Size" type="System.Drawing.Size, System.Drawing">
- <value>44, 21</value>
- </data>
- <data name="crop_bottom.TabIndex" type="System.Int32, mscorlib">
- <value>67</value>
- </data>
- <data name="&gt;&gt;crop_bottom.Name" xml:space="preserve">
- <value>crop_bottom</value>
- </data>
- <data name="&gt;&gt;crop_bottom.Type" xml:space="preserve">
- <value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;crop_bottom.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;crop_bottom.ZOrder" xml:space="preserve">
- <value>4</value>
- </data>
- <data name="crop_top.Enabled" type="System.Boolean, mscorlib">
- <value>False</value>
- </data>
- <data name="crop_top.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="crop_top.Location" type="System.Drawing.Point, System.Drawing">
- <value>479, 100</value>
- </data>
- <data name="crop_top.Size" type="System.Drawing.Size, System.Drawing">
- <value>44, 21</value>
- </data>
- <data name="crop_top.TabIndex" type="System.Int32, mscorlib">
- <value>64</value>
- </data>
- <data name="&gt;&gt;crop_top.Name" xml:space="preserve">
- <value>crop_top</value>
- </data>
- <data name="&gt;&gt;crop_top.Type" xml:space="preserve">
- <value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;crop_top.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;crop_top.ZOrder" xml:space="preserve">
- <value>5</value>
- </data>
- <data name="crop_left.Enabled" type="System.Boolean, mscorlib">
- <value>False</value>
- </data>
- <data name="crop_left.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="crop_left.Location" type="System.Drawing.Point, System.Drawing">
- <value>428, 122</value>
- </data>
- <data name="crop_left.Size" type="System.Drawing.Size, System.Drawing">
- <value>44, 21</value>
- </data>
- <data name="crop_left.TabIndex" type="System.Int32, mscorlib">
- <value>62</value>
- </data>
- <data name="&gt;&gt;crop_left.Name" xml:space="preserve">
- <value>crop_left</value>
- </data>
- <data name="&gt;&gt;crop_left.Type" xml:space="preserve">
- <value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;crop_left.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;crop_left.ZOrder" xml:space="preserve">
- <value>6</value>
- </data>
- <data name="crop_right.Enabled" type="System.Boolean, mscorlib">
- <value>False</value>
- </data>
- <data name="crop_right.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="crop_right.Location" type="System.Drawing.Point, System.Drawing">
- <value>530, 122</value>
- </data>
- <data name="crop_right.Size" type="System.Drawing.Size, System.Drawing">
- <value>44, 21</value>
- </data>
- <data name="crop_right.TabIndex" type="System.Int32, mscorlib">
- <value>65</value>
- </data>
- <data name="&gt;&gt;crop_right.Name" xml:space="preserve">
- <value>crop_right</value>
- </data>
- <data name="&gt;&gt;crop_right.Type" xml:space="preserve">
- <value>System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;crop_right.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;crop_right.ZOrder" xml:space="preserve">
- <value>7</value>
- </data>
- <data name="label8.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="label8.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt, style=Bold</value>
- </data>
- <data name="label8.Location" type="System.Drawing.Point, System.Drawing">
- <value>396, 13</value>
- </data>
- <data name="label8.Size" type="System.Drawing.Size, System.Drawing">
- <value>33, 13</value>
- </data>
- <data name="label8.TabIndex" type="System.Int32, mscorlib">
- <value>60</value>
- </data>
- <data name="label8.Text" xml:space="preserve">
- <value>Crop</value>
- </data>
- <data name="&gt;&gt;label8.Name" xml:space="preserve">
- <value>label8</value>
- </data>
- <data name="&gt;&gt;label8.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;label8.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;label8.ZOrder" xml:space="preserve">
- <value>8</value>
- </data>
- <data name="Label53.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="Label53.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="Label53.Location" type="System.Drawing.Point, System.Drawing">
- <value>477, 170</value>
- </data>
- <data name="Label53.Size" type="System.Drawing.Size, System.Drawing">
- <value>41, 13</value>
- </data>
- <data name="Label53.TabIndex" type="System.Int32, mscorlib">
- <value>68</value>
- </data>
- <data name="Label53.Text" xml:space="preserve">
- <value>Bottom</value>
- </data>
- <data name="&gt;&gt;Label53.Name" xml:space="preserve">
- <value>Label53</value>
- </data>
- <data name="&gt;&gt;Label53.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;Label53.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;Label53.ZOrder" xml:space="preserve">
- <value>9</value>
- </data>
- <data name="Label52.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="Label52.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="Label52.Location" type="System.Drawing.Point, System.Drawing">
- <value>486, 85</value>
- </data>
- <data name="Label52.Size" type="System.Drawing.Size, System.Drawing">
- <value>25, 13</value>
- </data>
- <data name="Label52.TabIndex" type="System.Int32, mscorlib">
- <value>63</value>
- </data>
- <data name="Label52.Text" xml:space="preserve">
- <value>Top</value>
- </data>
- <data name="&gt;&gt;Label52.Name" xml:space="preserve">
- <value>Label52</value>
- </data>
- <data name="&gt;&gt;Label52.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;Label52.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;Label52.ZOrder" xml:space="preserve">
- <value>10</value>
- </data>
- <data name="Label51.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="Label51.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="Label51.Location" type="System.Drawing.Point, System.Drawing">
- <value>580, 124</value>
- </data>
- <data name="Label51.Size" type="System.Drawing.Size, System.Drawing">
- <value>32, 13</value>
- </data>
- <data name="Label51.TabIndex" type="System.Int32, mscorlib">
- <value>66</value>
- </data>
- <data name="Label51.Text" xml:space="preserve">
- <value>Right</value>
- </data>
- <data name="&gt;&gt;Label51.Name" xml:space="preserve">
- <value>Label51</value>
- </data>
- <data name="&gt;&gt;Label51.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;Label51.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;Label51.ZOrder" xml:space="preserve">
- <value>11</value>
- </data>
- <data name="Label15.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="Label15.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="Label15.Location" type="System.Drawing.Point, System.Drawing">
- <value>396, 124</value>
- </data>
- <data name="Label15.Size" type="System.Drawing.Size, System.Drawing">
- <value>26, 13</value>
- </data>
- <data name="Label15.TabIndex" type="System.Int32, mscorlib">
- <value>61</value>
- </data>
- <data name="Label15.Text" xml:space="preserve">
- <value>Left</value>
- </data>
- <data name="&gt;&gt;Label15.Name" xml:space="preserve">
- <value>Label15</value>
- </data>
- <data name="&gt;&gt;Label15.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;Label15.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;Label15.ZOrder" xml:space="preserve">
- <value>12</value>
- </data>
- <data name="lbl_anamorphic.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="lbl_anamorphic.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="lbl_anamorphic.Location" type="System.Drawing.Point, System.Drawing">
- <value>108, 250</value>
- </data>
- <data name="lbl_anamorphic.Size" type="System.Drawing.Size, System.Drawing">
- <value>68, 13</value>
- </data>
- <data name="lbl_anamorphic.TabIndex" type="System.Int32, mscorlib">
- <value>74</value>
- </data>
- <data name="lbl_anamorphic.Text" xml:space="preserve">
- <value>Select a Title</value>
- </data>
- <data name="&gt;&gt;lbl_anamorphic.Name" xml:space="preserve">
- <value>lbl_anamorphic</value>
- </data>
- <data name="&gt;&gt;lbl_anamorphic.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;lbl_anamorphic.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;lbl_anamorphic.ZOrder" xml:space="preserve">
- <value>0</value>
- </data>
- <data name="lbl_anamprohicLbl.AutoSize" type="System.Boolean, mscorlib">
- <value>True</value>
- </data>
- <data name="lbl_anamprohicLbl.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="lbl_anamprohicLbl.Location" type="System.Drawing.Point, System.Drawing">
- <value>14, 249</value>
- </data>
- <data name="lbl_anamprohicLbl.Size" type="System.Drawing.Size, System.Drawing">
- <value>67, 13</value>
- </data>
- <data name="lbl_anamprohicLbl.TabIndex" type="System.Int32, mscorlib">
- <value>73</value>
- </data>
- <data name="lbl_anamprohicLbl.Text" xml:space="preserve">
- <value>Anamorphic:</value>
- </data>
- <data name="&gt;&gt;lbl_anamprohicLbl.Name" xml:space="preserve">
- <value>lbl_anamprohicLbl</value>
- </data>
- <data name="&gt;&gt;lbl_anamprohicLbl.Type" xml:space="preserve">
- <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;lbl_anamprohicLbl.Parent" xml:space="preserve">
- <value>$this</value>
- </data>
- <data name="&gt;&gt;lbl_anamprohicLbl.ZOrder" xml:space="preserve">
- <value>1</value>
- </data>
- <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <data name="$this.Font" type="System.Drawing.Font, System.Drawing">
- <value>Tahoma, 8.25pt</value>
- </data>
- <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
- <value>666, 279</value>
- </data>
- <data name="&gt;&gt;toolTip.Name" xml:space="preserve">
- <value>toolTip</value>
- </data>
- <data name="&gt;&gt;toolTip.Type" xml:space="preserve">
- <value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
- <data name="&gt;&gt;$this.Name" xml:space="preserve">
- <value>PictureSettings</value>
- </data>
- <data name="&gt;&gt;$this.Type" xml:space="preserve">
- <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </data>
</root> \ No newline at end of file
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 030eca6cc..051f3092c 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -88,10 +88,6 @@ namespace Handbrake.Functions
// Aspect Ratio
mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.keepDisplayAsect ? CheckState.Checked : CheckState.Unchecked;
-
- // Reset maxWidth and MaxHeight to 0
- mainWindow.PictureSettings.maxWidth = 0;
- mainWindow.PictureSettings.maxHeight = 0;
// Set the Width and height as Required.
if (presetQuery.Width != 0)
@@ -104,13 +100,13 @@ namespace Handbrake.Functions
if (presetQuery.MaxWidth != 0)
{
mainWindow.PictureSettings.text_width.Value = presetQuery.MaxWidth;
- mainWindow.PictureSettings.maxWidth = presetQuery.MaxWidth;
+ mainWindow.PictureSettings.MaximumWidth = presetQuery.MaxWidth;
}
if (presetQuery.MaxHeight != 0)
{
mainWindow.PictureSettings.text_height.Value = presetQuery.MaxHeight;
- mainWindow.PictureSettings.maxHeight = presetQuery.MaxHeight;
+ mainWindow.PictureSettings.MaximumHeight = presetQuery.MaxHeight;
}
// Case where both height and max height are 0 - For built-in presets
@@ -124,10 +120,10 @@ namespace Handbrake.Functions
mainWindow.PictureSettings.setMax();
// Custom Anamorphic Controls
- mainWindow.PictureSettings.txt_displayWidth.Text = presetQuery.displayWidthValue.ToString();
- mainWindow.PictureSettings.txt_parWidth.Text = presetQuery.pixelAspectWidth.ToString();
- mainWindow.PictureSettings.txt_parHeight.Text = presetQuery.pixelAspectHeight.ToString();
- mainWindow.PictureSettings.drop_modulus.SelectedItem = presetQuery.AnamorphicModulus;
+ mainWindow.PictureSettings.updownDisplayWidth.Text = presetQuery.displayWidthValue.ToString();
+ mainWindow.PictureSettings.updownParHeight.Text = presetQuery.pixelAspectWidth.ToString();
+ mainWindow.PictureSettings.updownParWidth.Text = presetQuery.pixelAspectHeight.ToString();
+ mainWindow.PictureSettings.drp_modulus.SelectedItem = presetQuery.AnamorphicModulus;
#endregion
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs
index 981e2641b..f0d19924b 100644
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -119,7 +119,7 @@ namespace Handbrake.Functions
#region Picture Settings Tab
// Use MaxWidth for built-in presets and width for user settings.
- if (mainWindow.PictureSettings.maxWidth == 0)
+ if (mainWindow.PictureSettings.MaximumWidth == 0)
{
if (mainWindow.PictureSettings.text_width.Text != "")
@@ -133,7 +133,7 @@ namespace Handbrake.Functions
}
// Use MaxHeight for built-in presets and height for user settings.
- if (mainWindow.PictureSettings.maxHeight == 0)
+ if (mainWindow.PictureSettings.MaximumHeight == 0)
{
if (mainWindow.PictureSettings.text_height.Text != "0")
if (mainWindow.PictureSettings.text_height.Text != "")
@@ -175,11 +175,11 @@ namespace Handbrake.Functions
break;
case 3:
query += " --custom-anamorphic ";
- query += " --display-width " + mainWindow.PictureSettings.txt_displayWidth.Text + " ";
+ query += " --display-width " + mainWindow.PictureSettings.updownDisplayWidth.Text + " ";
if (mainWindow.PictureSettings.check_KeepAR.Checked)
query += " --keep-display-aspect ";
- if (mainWindow.PictureSettings.txt_parWidth.Text != "" && mainWindow.PictureSettings.txt_parHeight.Text != "")
- query += " --pixel-aspect " + mainWindow.PictureSettings.txt_parWidth.Text + ":" + mainWindow.PictureSettings.txt_parHeight.Text + " ";
+ if (mainWindow.PictureSettings.updownParWidth.Text != "" && mainWindow.PictureSettings.updownParHeight.Text != "")
+ query += " --pixel-aspect " + mainWindow.PictureSettings.updownParWidth.Text + ":" + mainWindow.PictureSettings.updownParHeight.Text + " ";
break;
}
#endregion
diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj
index 76666f2b7..ce9d2fd4c 100644
--- a/win/C#/HandBrakeCS.csproj
+++ b/win/C#/HandBrakeCS.csproj
@@ -18,7 +18,7 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>2.0</OldToolsVersion>
- <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<SignManifests>false</SignManifests>
<PublishUrl>publish\</PublishUrl>
@@ -121,7 +121,7 @@
<Compile Include="Controls\PictureSettings.cs">
<SubType>UserControl</SubType>
</Compile>
- <Compile Include="Controls\PictureSettings.Designer.cs">
+ <Compile Include="Controls\PictureSettings.designer.cs">
<DependentUpon>PictureSettings.cs</DependentUpon>
</Compile>
<Compile Include="Controls\Subtitles.cs">
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 5dc3b88a3..2ddc303d2 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -40,7 +40,7 @@ namespace Handbrake
this.components = new System.ComponentModel.Container();
System.Windows.Forms.ContextMenuStrip notifyIconMenu;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
@@ -388,9 +388,9 @@ namespace Handbrake
//
// number
//
- dataGridViewCellStyle1.Format = "N0";
- dataGridViewCellStyle1.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle1;
+ dataGridViewCellStyle2.Format = "N0";
+ dataGridViewCellStyle2.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle2;
this.number.Frozen = true;
this.number.HeaderText = "Chapter Number";
this.number.MaxInputLength = 3;
@@ -896,11 +896,21 @@ namespace Handbrake
//
// PictureSettings
//
- this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
- this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F);
+ this.PictureSettings.CroppingValues = new int[] {
+ 0,
+ 0,
+ 0,
+ 0};
+ this.PictureSettings.DisplayResolution = new System.Drawing.Size(0, 0);
+ this.PictureSettings.Enabled = false;
+ this.PictureSettings.EncodeHeight = 0;
+ this.PictureSettings.EncodeWidth = 0;
+ this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.PictureSettings.Location = new System.Drawing.Point(0, 0);
+ this.PictureSettings.MaximumHeight = 2560;
+ this.PictureSettings.MaximumWidth = 2560;
this.PictureSettings.Name = "PictureSettings";
- this.PictureSettings.Size = new System.Drawing.Size(713, 310);
+ this.PictureSettings.Size = new System.Drawing.Size(666, 279);
this.PictureSettings.TabIndex = 0;
//
// Check_ChapterMarkers
@@ -1719,7 +1729,6 @@ namespace Handbrake
private System.Diagnostics.Process hbproc;
private TabPage tab_subtitles;
internal Handbrake.Controls.AudioPanel AudioSettings;
- internal Handbrake.Controls.PictureSettings PictureSettings;
internal Handbrake.Controls.Subtitles Subtitles;
internal Handbrake.Controls.Filters Filters;
private ToolStripStatusLabel lbl_updateCheck;
@@ -1742,6 +1751,7 @@ namespace Handbrake
private Label labelSource;
private Label labelStaticSource;
internal Label labelPreset;
+ internal Handbrake.Controls.PictureSettings PictureSettings;
}
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 1b215b396..428e3ae27 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -853,7 +853,7 @@ namespace Handbrake
{
selectedTitle = drp_dvdtitle.SelectedItem as Title;
lbl_duration.Text = selectedTitle.Duration.ToString();
- PictureSettings.setComponentsAfterScan(selectedTitle); // Setup Picture Settings Tab Control
+ PictureSettings.Source = selectedTitle; // Setup Picture Settings Tab Control
// Populate the Angles dropdown
drop_angle.Items.Clear();