diff options
author | sr55 <[email protected]> | 2015-03-01 18:03:28 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-03-01 18:03:28 +0000 |
commit | 29c62be71227ae33e382199f323890ae3bfffa69 (patch) | |
tree | ce95739341715439b97d7ca1b4baebd89474c6c9 /win/CS/HandBrakeWPF/Services/PrePostActionService.cs | |
parent | 5cce72f890bc7b6075a55aa4364b8817c22f11c0 (diff) |
WinGui: Moving the Queue Code out to the UI level. The services library will be strictly a libhb warpper and service provider.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6959 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/PrePostActionService.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/PrePostActionService.cs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs index c57935239..b8501b999 100644 --- a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs +++ b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs @@ -9,21 +9,19 @@ namespace HandBrakeWPF.Services
{
+ using System;
using System.Diagnostics;
using System.Windows.Forms;
using Caliburn.Micro;
- using HandBrake.ApplicationServices.EventArgs;
using HandBrake.ApplicationServices.Services.Encode.EventArgs;
- using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
+ using HandBrakeWPF.EventArgs;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
- using Application = System.Windows.Application;
-
/// <summary>
/// The when done service.
/// </summary>
@@ -76,7 +74,7 @@ namespace HandBrakeWPF.Services /// <param name="e">
/// The e.
/// </param>
- private void EncodeService_EncodeStarted(object sender, System.EventArgs e)
+ private void EncodeService_EncodeStarted(object sender, EventArgs e)
{
if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PreventSleep))
{
@@ -134,7 +132,7 @@ namespace HandBrakeWPF.Services // Give the user the ability to cancel the shutdown. Default 60 second timer.
ICountdownAlertViewModel titleSpecificView = IoC.Get<ICountdownAlertViewModel>();
- Caliburn.Micro.Execute.OnUIThread(
+ Execute.OnUIThread(
() =>
{
titleSpecificView.SetAction(this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction));
@@ -153,16 +151,16 @@ namespace HandBrakeWPF.Services Win32.ExitWindowsEx(0, 0);
break;
case "Suspend":
- System.Windows.Forms.Application.SetSuspendState(PowerState.Suspend, true, true);
+ Application.SetSuspendState(PowerState.Suspend, true, true);
break;
case "Hibernate":
- System.Windows.Forms.Application.SetSuspendState(PowerState.Hibernate, true, true);
+ Application.SetSuspendState(PowerState.Hibernate, true, true);
break;
case "Lock System":
Win32.LockWorkStation();
break;
case "Quit HandBrake":
- Execute.OnUIThread(() => Application.Current.Shutdown());
+ Execute.OnUIThread(() => System.Windows.Application.Current.Shutdown());
break;
}
}
@@ -180,8 +178,8 @@ namespace HandBrakeWPF.Services !string.IsNullOrEmpty(this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileTo)))
{
string args = string.Format(
- "{0} \"{1}\"",
- this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileToArgs),
+ "{0} \"{1}\"",
+ this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileToArgs),
file);
var vlc =
new ProcessStartInfo(
|