summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-04-23 21:01:57 +0000
committersr55 <[email protected]>2010-04-23 21:01:57 +0000
commit9d83f1c5539761bcae5b351669ac8a5c7bb1eace (patch)
tree92c3ef6cf375cc20304e08efa97f92818cdc386c /win/C#/frmMain.cs
parent94c9aefd9b79b845124d971d165a9ca50ad4594c (diff)
WinGui:
- Quality Slider tooltip fixed. - More stylecop warnings cleaned up. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3255 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs43
1 files changed, 22 insertions, 21 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 6c4a2ed93..0894d6a81 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -1628,18 +1628,8 @@ namespace Handbrake
{
// Setup the GUI components for the scan.
sourcePath = filename;
- foreach (Control ctrl in Controls)
- if (!(ctrl is StatusStrip || ctrl is MenuStrip || ctrl is ToolStrip))
- ctrl.Enabled = false;
- lbl_encode.Visible = true;
- lbl_encode.Text = "Scanning ...";
- btn_source.Enabled = false;
- btn_start.Enabled = false;
- btn_showQueue.Enabled = false;
- btn_add2Queue.Enabled = false;
- tb_preview.Enabled = false;
- mnu_killCLI.Visible = true;
+ this.DisableGUI();
if (ActivityWindow != null)
ActivityWindow.SetMode(ActivityLogMode.Scan);
@@ -1756,6 +1746,22 @@ namespace Handbrake
}
}
+ private void DisableGUI()
+ {
+ foreach (Control ctrl in Controls)
+ if (!(ctrl is StatusStrip || ctrl is MenuStrip || ctrl is ToolStrip))
+ ctrl.Enabled = false;
+
+ lbl_encode.Visible = true;
+ lbl_encode.Text = "Scanning ...";
+ btn_source.Enabled = false;
+ btn_start.Enabled = false;
+ btn_showQueue.Enabled = false;
+ btn_add2Queue.Enabled = false;
+ tb_preview.Enabled = false;
+ mnu_killCLI.Visible = true;
+ }
+
private void KillScan()
{
try
@@ -2032,22 +2038,17 @@ namespace Handbrake
/// <param name="CurrentFps"></param>
/// <param name="AverageFps"></param>
/// <param name="TimeRemaining"></param>
- private void EncodeOnEncodeProgress(object Sender, int CurrentTask, int TaskCount, float PercentComplete,
- float CurrentFps, float AverageFps, TimeSpan TimeRemaining)
+ private void EncodeOnEncodeProgress(object Sender, int CurrentTask, int TaskCount, float PercentComplete, float CurrentFps, float AverageFps, TimeSpan TimeRemaining)
{
if (this.InvokeRequired)
{
- this.BeginInvoke(new EncodeProgressEventHandler(EncodeOnEncodeProgress),
- new[]
- {
- Sender, CurrentTask, TaskCount, PercentComplete, CurrentFps, AverageFps,
- TimeRemaining
- });
+ this.BeginInvoke(
+ new EncodeProgressEventHandler(EncodeOnEncodeProgress),
+ new[] { Sender, CurrentTask, TaskCount, PercentComplete, CurrentFps, AverageFps, TimeRemaining });
return;
}
lbl_encode.Text =
- string.Format("Encode Progress: {0}%, FPS: {1}, Avg FPS: {2}, Time Remaining: {3} ",
- PercentComplete, CurrentFps, AverageFps, TimeRemaining);
+ string.Format("Encode Progress: {0}%, FPS: {1}, Avg FPS: {2}, Time Remaining: {3} ", PercentComplete, CurrentFps, AverageFps, TimeRemaining);
}
#endregion