/// </summary>\r
private void InitializeComponent()\r
{\r
+ this.components = new System.ComponentModel.Container();\r
this.text_height = new System.Windows.Forms.NumericUpDown();\r
this.text_width = new System.Windows.Forms.NumericUpDown();\r
this.label4 = new System.Windows.Forms.Label();\r
this.Label15 = new System.Windows.Forms.Label();\r
this.lbl_anamorphic = new System.Windows.Forms.Label();\r
this.lbl_anamprohicLbl = new System.Windows.Forms.Label();\r
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);\r
((System.ComponentModel.ISupportInitialize)(this.text_height)).BeginInit();\r
((System.ComponentModel.ISupportInitialize)(this.text_width)).BeginInit();\r
((System.ComponentModel.ISupportInitialize)(this.crop_bottom)).BeginInit();\r
this.txt_displayWidth.Name = "txt_displayWidth";\r
this.txt_displayWidth.Size = new System.Drawing.Size(100, 20);\r
this.txt_displayWidth.TabIndex = 53;\r
+ this.toolTip.SetToolTip(this.txt_displayWidth, "Display Width - Press \"Enter\" after entering a new value.");\r
this.txt_displayWidth.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txt_displayWidth_Keyup);\r
// \r
// lbl_displayWidth\r
this.txt_parWidth.Name = "txt_parWidth";\r
this.txt_parWidth.Size = new System.Drawing.Size(100, 20);\r
this.txt_parWidth.TabIndex = 55;\r
+ this.toolTip.SetToolTip(this.txt_parWidth, "PAR Width - Press \"Enter\" after entering a new value.\r\n");\r
this.txt_parWidth.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txt_parWidth_Keyup);\r
// \r
// lbl_parHeight\r
this.txt_parHeight.Name = "txt_parHeight";\r
this.txt_parHeight.Size = new System.Drawing.Size(100, 20);\r
this.txt_parHeight.TabIndex = 57;\r
+ this.toolTip.SetToolTip(this.txt_parHeight, "PAR Height - Press \"Enter\" after entering a new value.\r\n");\r
this.txt_parHeight.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txt_parHeight_Keyup);\r
// \r
// check_KeepAR\r
internal System.Windows.Forms.CheckBox check_KeepAR;\r
internal System.Windows.Forms.Label lbl_anamorphic;\r
internal System.Windows.Forms.Label lbl_anamprohicLbl;\r
+ private ToolTip toolTip;\r
\r
}\r
}\r
public Title selectedTitle { get; set; }\r
private Boolean heightChangeGuard;\r
private Boolean looseAnamorphicHeightGuard;\r
+ private Boolean heightModJumpGaurd = false;\r
\r
// Window Setup\r
public PictureSettings()\r
int.TryParse(drop_modulus.SelectedItem.ToString(), out mod);\r
\r
// Increase or decrease value by the correct mod.\r
- if (drp_anamorphic.SelectedIndex != 2)\r
+ if (drp_anamorphic.SelectedIndex != 2 && !heightModJumpGaurd)\r
{\r
decimal val = heightChangeMod(mod);\r
heightChangeGuard = true;\r
}\r
heightChangeGuard = false;\r
looseAnamorphicHeightGuard = false;\r
+ heightModJumpGaurd = false;\r
}\r
private void check_KeepAR_CheckedChanged(object sender, EventArgs e)\r
{\r
case 1: // Strict\r
text_height.BackColor = Color.LightGray;\r
text_width.BackColor = Color.LightGray;\r
- text_height.Text = "";\r
- text_width.Text = "";\r
+ if (selectedTitle != null)\r
+ {\r
+ heightModJumpGaurd = true;\r
+ text_width.Value = selectedTitle.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;\r
+ text_height.Value = selectedTitle.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;\r
+ }\r
text_height.Enabled = false;\r
text_width.Enabled = false;\r
check_KeepAR.CheckState = CheckState.Unchecked;\r
lbl_anamprohicLbl.Visible = true;\r
break;\r
case 2: // Loose\r
+ disableCustomAnaControls();\r
storageAspect = 0;\r
+ text_height.Enabled = false;\r
+ text_height.BackColor = Color.LightGray;\r
+ text_width.Enabled = true;\r
+ text_width.BackColor = Color.White;\r
if (selectedTitle != null)\r
{\r
+ heightModJumpGaurd = true;\r
text_width.Value = selectedTitle.Resolution.Width - (int) crop_left.Value - (int) crop_right.Value;\r
text_height.Value = selectedTitle.Resolution.Height - (int) crop_top.Value - (int) crop_bottom.Value;\r
}\r
- text_height.Enabled = false;\r
- text_height.BackColor = Color.LightGray;\r
- text_width.Enabled = true;\r
- text_width.BackColor = Color.White;\r
- disableCustomAnaControls();\r
lbl_anamorphic.Text = looseAnamorphic();\r
lbl_anamprohicLbl.Visible = true;\r
break;\r
// Actual Work \r
if (selectedTitle != null)\r
{\r
+ heightModJumpGaurd = true;\r
widthVal = selectedTitle.Resolution.Width;\r
- text_width.Text = widthVal.ToString();\r
- text_height.Text = cacluateHeight(widthVal).ToString();\r
+ text_width.Value = selectedTitle.Resolution.Width - (int)crop_left.Value - (int)crop_right.Value;\r
+ text_height.Value = selectedTitle.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;\r
txt_parWidth.Text = selectedTitle.ParVal.Width.ToString();\r
txt_parHeight.Text = selectedTitle.ParVal.Height.ToString();\r
txt_displayWidth.Text = displayWidth().ToString();\r
*/\r
if (!check_KeepAR.Checked)\r
{\r
- switch (control.Name) // TODO Check if CroppedWidth or just Width\r
+ switch (control.Name)\r
{\r
case "text_width":\r
double dw = (double)cropped_width * parW / parH;\r
+ dw = Math.Round(dw, 2);\r
txt_displayWidth.Text = dw.ToString();\r
break;\r
case "txt_parWidth":\r
double dwpw = (double)cropped_width * parW / parH;\r
+ dwpw = Math.Round(dwpw, 2);\r
txt_displayWidth.Text = dwpw.ToString();\r
break;\r
case "txt_parHeight":\r
double dwph = (double)cropped_width * parW / parH;\r
+ dwph = Math.Round(dwph, 2);\r
txt_displayWidth.Text = dwph.ToString();\r
break;\r
case "txt_displayWidth":\r
- txt_parWidth.Text = txt_displayWidth.Text;\r
+ txt_parWidth.Text = Math.Round(displayWidth, 0).ToString();\r
txt_parHeight.Text = text_width.Text;\r
break;\r
}\r
// Calculate the Actual Height\r
int actualWidth = (int)text_width.Value - (int)crop_left.Value - (int)crop_right.Value; ;\r
int actualHeight = selectedTitle.Resolution.Height - (int)crop_top.Value - (int)crop_bottom.Value;\r
- if (drp_anamorphic.SelectedIndex == 2)\r
- actualHeight = (int)getModulusAuto(16, actualHeight);\r
\r
// Calculate Actual Width\r
double displayWidth = ((double)actualWidth * selectedTitle.ParVal.Width / selectedTitle.ParVal.Height);\r