diff options
author | sr55 <[email protected]> | 2012-03-29 20:29:13 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-03-29 20:29:13 +0000 |
commit | 15c3e5ba568ed34d6a5adc629ced50010c819078 (patch) | |
tree | 143c999d557d875770d54f5ae7df1847e2eabc2d /win/CS/frmQueue.cs | |
parent | 72997d728bb599ffff1e81c65ff4b44cc646c3f0 (diff) |
WinGui: More refactoring of user settings / exception handling for the user setting service.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4557 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/frmQueue.cs')
-rw-r--r-- | win/CS/frmQueue.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/win/CS/frmQueue.cs b/win/CS/frmQueue.cs index c7117068f..f5fb75071 100644 --- a/win/CS/frmQueue.cs +++ b/win/CS/frmQueue.cs @@ -45,6 +45,11 @@ namespace Handbrake private readonly IUserSettingService userSettingService = ServiceManager.UserSettingService;
/// <summary>
+ /// Set to true when the window is ready.
+ /// </summary>
+ private bool isInitialised = false;
+
+ /// <summary>
/// Initializes a new instance of the <see cref="frmQueue"/> class.
/// </summary>
/// <param name="q">
@@ -69,6 +74,7 @@ namespace Handbrake queue.EncodeService.EncodeCompleted += this.queue_EncodeEnded;
drp_completeOption.Text = userSettingService.GetUserSetting<string>(ASUserSettingConstants.WhenCompleteAction);
+ this.isInitialised = true;
}
/// <summary>
@@ -720,7 +726,10 @@ namespace Handbrake /// </param>
private void CompleteOptionChanged(object sender, EventArgs e)
{
- userSettingService.SetUserSetting(ASUserSettingConstants.WhenCompleteAction, drp_completeOption.Text);
+ if (this.isInitialised)
+ {
+ userSettingService.SetUserSetting(ASUserSettingConstants.WhenCompleteAction, drp_completeOption.Text);
+ }
}
/// <summary>
|