summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-01-09 22:22:13 +0000
committersr55 <[email protected]>2010-01-09 22:22:13 +0000
commit33b1c3f11e430dc483a8d3f2af5efb2b3f93d989 (patch)
treefbb71df1f866fe9ecdba5de532cf386388e2484e /win/C#/frmMain.cs
parentd59750cc3884e5b9f22643c00f70a564604d9894 (diff)
WinGui:
- Enabled the Frame to Frame encode mode. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3061 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs34
1 files changed, 28 insertions, 6 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 127aa046d..b6fda2d32 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -881,7 +881,7 @@ namespace Handbrake
}
sourcePath = Path.GetFileName(file);
- StartScan(file,0);
+ StartScan(file, 0);
}
private void drp_dvdtitle_Click(object sender, EventArgs e)
{
@@ -891,6 +891,7 @@ namespace Handbrake
private void drp_dvdtitle_SelectedIndexChanged(object sender, EventArgs e)
{
UnRegisterPresetEventHandler();
+ drop_mode.SelectedIndex = 0;
PictureSettings.lbl_Aspect.Text = "Select a Title"; // Reset some values on the form
drop_chapterStart.Items.Clear();
@@ -1048,10 +1049,24 @@ namespace Handbrake
int start, end;
int.TryParse(drop_chapterStart.Text, out start);
int.TryParse(drop_chapterFinish.Text, out end);
+ double duration = end - start;
+
+ switch (drop_mode.SelectedIndex)
+ {
+ case 1:
+ lbl_duration.Text = TimeSpan.FromSeconds(duration).ToString();
+ return;
+ case 2:
+ if (selectedTitle != null)
+ {
+ duration = duration / selectedTitle.Fps;
+ lbl_duration.Text = TimeSpan.FromSeconds(duration).ToString();
+ }
+ else
+ lbl_duration.Text = "--:--:--";
- int duration = end - start;
- TimeSpan dur = TimeSpan.FromSeconds(duration);
- lbl_duration.Text = dur.ToString();
+ return;
+ }
}
private void drop_mode_SelectedIndexChanged(object sender, EventArgs e)
{
@@ -1085,8 +1100,15 @@ namespace Handbrake
}
return;
case 2:
- MessageBox.Show("This feature is not implemented yet! Switching Back to Chapters Mode.", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
- drop_mode.SelectedIndex = 0;
+ this.drop_chapterStart.TextChanged += new System.EventHandler(this.SecondsOrFramesChanged);
+ this.drop_chapterFinish.TextChanged += new System.EventHandler(this.SecondsOrFramesChanged);
+ drop_chapterStart.DropDownStyle = ComboBoxStyle.Simple;
+ drop_chapterFinish.DropDownStyle = ComboBoxStyle.Simple;
+ if (selectedTitle != null)
+ {
+ drop_chapterStart.Text = "0";
+ drop_chapterFinish.Text = (selectedTitle.Fps * selectedTitle.Duration.TotalSeconds).ToString();
+ }
return;
}
}