From e8eaebade8cd06cec7f8338c122fcb169471308e Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 24 Jan 2013 21:48:45 +0000 Subject: WinGui: Remember the last used preview duration. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5201 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/UserSettingConstants.cs | 5 +++++ win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs | 2 ++ win/CS/HandBrakeWPF/defaultsettings.xml | 8 ++++++++ 3 files changed, 15 insertions(+) (limited to 'win') diff --git a/win/CS/HandBrakeWPF/UserSettingConstants.cs b/win/CS/HandBrakeWPF/UserSettingConstants.cs index 01fcea409..f0414ef6b 100644 --- a/win/CS/HandBrakeWPF/UserSettingConstants.cs +++ b/win/CS/HandBrakeWPF/UserSettingConstants.cs @@ -216,6 +216,11 @@ namespace HandBrakeWPF /// public const string ShowAdvancedTab = "ShowAdvancedTab"; + /// + /// The last preview duration + /// + public const string LastPreviewDuration = "LastPreviewDuration"; + #endregion } } \ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs index 0f964846f..7ebb88619 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs @@ -95,6 +95,7 @@ namespace HandBrakeWPF.ViewModels this.Duration = 30; UseSystemDefaultPlayer = userSettingService.GetUserSetting(UserSettingConstants.DefaultPlayer); + this.Duration = userSettingService.GetUserSetting(UserSettingConstants.LastPreviewDuration); } #endregion @@ -381,6 +382,7 @@ namespace HandBrakeWPF.ViewModels this.encodeService.EncodeStatusChanged += this.encodeService_EncodeStatusChanged; this.encodeService.Start((QueueTask)state, false); + this.userSettingService.SetUserSetting(UserSettingConstants.LastPreviewDuration, this.Duration); } #endregion diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 73d5742fc..c1a645647 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -481,4 +481,12 @@ true + + + LastPreviewDuration + + + 30 + + \ No newline at end of file -- cgit v1.2.3