</ItemGroup>\r
<ItemGroup>\r
<Compile Include="Converters\EnumToDescConverter.cs" />\r
- <Compile Include="EventArgs\QueueCompletedEventArgs.cs" />\r
- <Compile Include="EventArgs\SettingChangedEventArgs.cs" />\r
<Compile Include="Exceptions\GeneralApplicationException.cs" />\r
- <Compile Include="EventArgs\QueueProgressEventArgs.cs" />\r
<Compile Include="Interop\Attributes\ShortName.cs" />\r
<Compile Include="Interop\EventArgs\EncodeCompletedEventArgs.cs" />\r
<Compile Include="Interop\EventArgs\EncodeProgressEventArgs.cs" />\r
<Compile Include="Services\Encode\Model\Models\Video\VideoProfile.cs" />\r
<Compile Include="Services\Encode\Model\Models\Video\VideoTune.cs" />\r
<Compile Include="Services\Interfaces\IHbServiceCallback.cs" />\r
- <Compile Include="Services\Interfaces\IServerService.cs" />\r
<Compile Include="Services\Scan\EventArgs\ScanCompletedEventArgs.cs" />\r
<Compile Include="Services\Scan\EventArgs\ScanProgressEventArgs.cs" />\r
- <Compile Include="Services\ServerService.cs" />\r
<Compile Include="Utilities\Converters.cs" />\r
<Compile Include="Utilities\EnumHelper.cs" />\r
<Compile Include="Utilities\InteropModelCreator.cs" />\r
<DesignTime>True</DesignTime>\r
<DependentUpon>Resources.resx</DependentUpon>\r
</Compile>\r
- <Compile Include="ServicesWindsorInstaller.cs" />\r
<Compile Include="Services\Encode\EncodeBase.cs" />\r
<Compile Include="Services\Encode\Interfaces\IEncode.cs" />\r
- <Compile Include="Services\Interfaces\IQueueProcessor.cs" />\r
<Compile Include="Services\Scan\Interfaces\IScan.cs" />\r
<Compile Include="Services\Encode\LibEncode.cs" />\r
<Compile Include="Services\Scan\LibScan.cs" />\r
- <Compile Include="Services\QueueProcessor.cs" />\r
<Compile Include="Utilities\CharCodesUtilities.cs" />\r
<Compile Include="Utilities\GeneralUtilities.cs" />\r
<Compile Include="Utilities\LanguageUtilities.cs" />\r
+++ /dev/null
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="IServerService.cs" company="HandBrake Project (http://handbrake.fr)">\r
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-// Defines the IServerService type.\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Services.Interfaces\r
-{\r
- using System.Runtime.Serialization;\r
- using System.ServiceModel;\r
-\r
- using HandBrake.ApplicationServices.Model;\r
-\r
- /// <summary>\r
- /// The HandBrakeService interface.\r
- /// </summary>\r
- [ServiceContract(CallbackContract = typeof(IHbServiceCallback), SessionMode = SessionMode.Required)]\r
- public interface IServerService\r
- {\r
- /// <summary>\r
- /// Gets the activity log.\r
- /// </summary>\r
- [DataMember]\r
- string EncodeActivityLog { get; }\r
-\r
- /// <summary>\r
- /// Gets a value indicating whether is encoding.\r
- /// </summary>\r
- bool IsEncoding\r
- {\r
- [OperationContract]\r
- get;\r
- }\r
-\r
- /// <summary>\r
- /// Start the WCF Service\r
- /// </summary>\r
- /// <param name="port">\r
- /// The port.\r
- /// </param>\r
- void Start(string port);\r
-\r
- /// <summary>\r
- /// Stop the WCF Service\r
- /// </summary>\r
- void Stop();\r
-\r
- /// <summary>\r
- /// Start and Encode\r
- /// </summary>\r
- /// <param name="job">\r
- /// The job.\r
- /// </param>\r
- [OperationContract]\r
- void StartEncode(QueueTask job);\r
-\r
- /// <summary>\r
- /// The process encode logs.\r
- /// </summary>\r
- /// <param name="destination">\r
- /// The destination.\r
- /// </param>\r
- /// <param name="configuration">\r
- /// The configuration.\r
- /// </param>\r
- [OperationContract]\r
- void ProcessEncodeLogs(string destination, HBConfiguration configuration);\r
-\r
- /// <summary>\r
- /// Stop and Encode\r
- /// </summary>\r
- [OperationContract]\r
- void StopEncode();\r
-\r
- /// <summary>\r
- /// Subscribe for callbacks from the called functions\r
- /// </summary>\r
- /// <returns>\r
- /// The System.Boolean.\r
- /// </returns>\r
- [OperationContract]\r
- bool Subscribe();\r
-\r
- /// <summary>\r
- /// Unsubscribe from callbacks.\r
- /// </summary>\r
- /// <returns>\r
- /// The System.Boolean.\r
- /// </returns>\r
- [OperationContract]\r
- bool Unsubscribe();\r
- }\r
-}
\ No newline at end of file
+++ /dev/null
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="ServerService.cs" company="HandBrake Project (http://handbrake.fr)">\r
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-// HandBrake WCF Service\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices.Services\r
-{\r
- using System;\r
- using System.Collections.Generic;\r
- using System.ServiceModel;\r
- using System.Threading;\r
-\r
- using HandBrake.ApplicationServices.Model;\r
- using HandBrake.ApplicationServices.Services.Encode;\r
- using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
- using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
- using HandBrake.ApplicationServices.Services.Interfaces;\r
-\r
- /// <summary>\r
- /// HandBrake WCF Service\r
- /// </summary>\r
- [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, IncludeExceptionDetailInFaults = true, ConcurrencyMode = ConcurrencyMode.Single)]\r
- public class ServerService : IServerService\r
- {\r
- #region Constants and Fields\r
-\r
- /// <summary>\r
- /// List of connected Clients. For now, this should only be one.\r
- /// </summary>\r
- private static readonly List<IHbServiceCallback> Subscribers = new List<IHbServiceCallback>();\r
-\r
- /// <summary>\r
- /// The encode service.\r
- /// </summary>\r
- private static IEncode encodeService;\r
-\r
- /// <summary>\r
- /// The host.\r
- /// </summary>\r
- private static ServiceHost host;\r
-\r
- /// <summary>\r
- /// The shutdown flag.\r
- /// </summary>\r
- private static ManualResetEvent shutdownFlag;\r
-\r
- #endregion\r
-\r
- #region Properties\r
-\r
- /// <summary>\r
- /// Gets the activity log.\r
- /// </summary>\r
- public string EncodeActivityLog { get; private set; }\r
-\r
- /// <summary>\r
- /// Gets a value indicating whether is encoding.\r
- /// </summary>\r
- public bool IsEncoding { get; private set; }\r
-\r
- /// <summary>\r
- /// Gets the activity log.\r
- /// </summary>\r
- public string ScanActivityLog { get; private set; }\r
-\r
- #endregion\r
-\r
- #region Implemented Interfaces\r
-\r
- #region IServerService\r
-\r
- /// <summary>\r
- /// The process encode logs.\r
- /// </summary>\r
- /// <param name="destination">\r
- /// The destination.\r
- /// </param>\r
- /// <param name="configuration">\r
- /// The configuration.\r
- /// </param>\r
- public void ProcessEncodeLogs(string destination, HBConfiguration configuration)\r
- {\r
- encodeService.ProcessLogs(destination, configuration);\r
- }\r
-\r
- /// <summary>\r
- /// Start the service\r
- /// </summary>\r
- /// <param name="port">\r
- /// The port.\r
- /// </param>\r
- public void Start(string port)\r
- {\r
- using (host = new ServiceHost(typeof(ServerService), new Uri(string.Format("net.tcp://127.0.0.1:{0}", port))))\r
- {\r
- // Setup a listener\r
- host.AddServiceEndpoint(typeof(IServerService), new NetTcpBinding(), "IHbService");\r
- host.Open();\r
- Console.WriteLine("::: HandBrake Isolation Server - Debug Console:::");\r
- Console.WriteLine("Service Started. Waiting for Clients...");\r
-\r
- // Setup the services we are going to use.\r
- encodeService = new LibEncode(); \r
- shutdownFlag = new ManualResetEvent(false);\r
- shutdownFlag.WaitOne();\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Start and Encode\r
- /// </summary>\r
- /// <param name="job">\r
- /// The job.\r
- /// </param>\r
- public void StartEncode(QueueTask job)\r
- {\r
- Console.WriteLine("Starting Source Encode for: " + job.Task.Source);\r
- encodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;\r
- encodeService.EncodeStarted += this.encodeService_EncodeStarted;\r
- encodeService.EncodeStatusChanged += this.encodeService_EncodeStatusChanged;\r
- encodeService.Start(job);\r
- }\r
-\r
- /// <summary>\r
- /// Stop this service\r
- /// </summary>\r
- public void Stop()\r
- {\r
- if (host != null)\r
- {\r
- host.BeginClose(null, null);\r
- // host.Abort(); \r
- shutdownFlag.Set();\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// Stop and Encode\r
- /// </summary>\r
- public void StopEncode()\r
- {\r
- encodeService.Stop();\r
- }\r
-\r
- /// <summary>\r
- /// The subscribe.\r
- /// </summary>\r
- /// <returns>\r
- /// The System.Boolean.\r
- /// </returns>\r
- public bool Subscribe()\r
- {\r
- try\r
- {\r
- // Get the hashCode of the connecting app and store it as a connection\r
- var callback = OperationContext.Current.GetCallbackChannel<IHbServiceCallback>();\r
- if (!Subscribers.Contains(callback))\r
- {\r
- Console.WriteLine("Client Connected");\r
- Subscribers.Add(callback);\r
- }\r
- return true;\r
- }\r
- catch (Exception e)\r
- {\r
- Console.WriteLine(e.Message);\r
- return false;\r
- }\r
- }\r
-\r
- /// <summary>\r
- /// The unsubscribe.\r
- /// </summary>\r
- /// <returns>\r
- /// The System.Boolean.\r
- /// </returns>\r
- public bool Unsubscribe()\r
- {\r
- try\r
- {\r
- var callback = OperationContext.Current.GetCallbackChannel<IHbServiceCallback>();\r
- if (Subscribers.Contains(callback))\r
- {\r
- Subscribers.Remove(callback);\r
- if (Subscribers.Count == 0)\r
- {\r
- Console.WriteLine("Client Disconnected, Shutting down...");\r
-\r
- // Shutdown the service. We no longer have any clients to serve.\r
- // It is the responsibility of the UI to maintain a subscription while this service is in use.\r
- this.Stop();\r
- }\r
- }\r
- return true;\r
- }\r
- catch\r
- {\r
- return false;\r
- }\r
- }\r
-\r
- #endregion\r
-\r
- #endregion\r
-\r
- #region Methods\r
-\r
- /// <summary>\r
- /// The encode service_ encode completed.\r
- /// </summary>\r
- /// <param name="sender">\r
- /// The sender.\r
- /// </param>\r
- /// <param name="e">\r
- /// The e.\r
- /// </param>\r
- private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e)\r
- {\r
- encodeService.EncodeCompleted -= this.EncodeServiceEncodeCompleted;\r
- encodeService.EncodeStarted -= this.encodeService_EncodeStarted;\r
- encodeService.EncodeStatusChanged -= this.encodeService_EncodeStatusChanged;\r
-\r
- Subscribers.ForEach(\r
- delegate(IHbServiceCallback callback)\r
- {\r
- if (((ICommunicationObject)callback).State == CommunicationState.Opened)\r
- {\r
- Console.WriteLine("Encode Completed Callback");\r
- callback.EncodeCompletedCallback(e);\r
- }\r
- else\r
- {\r
- Subscribers.Remove(callback);\r
- }\r
- });\r
- }\r
-\r
- /// <summary>\r
- /// The encode service_ encode started.\r
- /// </summary>\r
- /// <param name="sender">\r
- /// The sender.\r
- /// </param>\r
- /// <param name="e">\r
- /// The e.\r
- /// </param>\r
- private void encodeService_EncodeStarted(object sender, EventArgs e)\r
- {\r
- Subscribers.ForEach(\r
- delegate(IHbServiceCallback callback)\r
- {\r
- if (((ICommunicationObject)callback).State == CommunicationState.Opened)\r
- {\r
- Console.WriteLine("Encode Started Callback");\r
- callback.EncodeStartedCallback();\r
- }\r
- else\r
- {\r
- Subscribers.Remove(callback);\r
- }\r
- });\r
- }\r
-\r
- /// <summary>\r
- /// The encode service_ encode status changed.\r
- /// </summary>\r
- /// <param name="sender">\r
- /// The sender.\r
- /// </param>\r
- /// <param name="e">\r
- /// The e.\r
- /// </param>\r
- private void encodeService_EncodeStatusChanged(object sender, EncodeProgressEventArgs e)\r
- {\r
- Subscribers.ForEach(\r
- delegate(IHbServiceCallback callback)\r
- {\r
- if (((ICommunicationObject)callback).State == CommunicationState.Opened)\r
- {\r
- Console.WriteLine("Encode Status Callback");\r
- callback.EncodeProgressCallback(e);\r
- }\r
- else\r
- {\r
- Subscribers.Remove(callback);\r
- }\r
- });\r
- }\r
-\r
- #endregion\r
- }\r
-}
\ No newline at end of file
+++ /dev/null
-// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="ServicesWindsorInstaller.cs" company="HandBrake Project (http://handbrake.fr)">\r
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
-// </copyright>\r
-// <summary>\r
-// The Windsor Installer Interface Implementation\r
-// </summary>\r
-// --------------------------------------------------------------------------------------------------------------------\r
-\r
-namespace HandBrake.ApplicationServices\r
-{\r
- using Castle.MicroKernel.Registration;\r
- using Castle.MicroKernel.SubSystems.Configuration;\r
- using Castle.Windsor;\r
-\r
- using HandBrake.ApplicationServices.Services;\r
- using HandBrake.ApplicationServices.Services.Interfaces;\r
-\r
- /// <summary>\r
- /// An Implimentation of IWindsorInstaller for this library.\r
- /// </summary>\r
- public class ServicesWindsorInstaller : IWindsorInstaller\r
- {\r
- #region Implementation of IWindsorInstaller\r
-\r
- /// <summary>\r
- /// Performs the installation in the <see cref="T:Castle.Windsor.IWindsorContainer"/>.\r
- /// </summary>\r
- /// <param name="container">The container.</param><param name="store">The configuration store.</param>\r
- public void Install(IWindsorContainer container, IConfigurationStore store)\r
- {\r
- container.Register(Component.For<IQueueProcessor>().ImplementedBy<QueueProcessor>());\r
- }\r
-\r
- #endregion\r
- }\r
-}\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.EventArgs\r
+namespace HandBrakeWPF.EventArgs\r
{\r
using System;\r
using System.Runtime.Serialization;\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.EventArgs\r
+namespace HandBrakeWPF.EventArgs\r
{\r
using System;\r
\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.EventArgs\r
+namespace HandBrakeWPF.EventArgs\r
{\r
/// <summary>\r
/// The setting changed event args.\r
<Compile Include="Converters\Subtitles\SubtitleBehaviourConverter.cs" />\r
<Compile Include="Converters\Video\VideoOptionsTooltipConverter.cs" />\r
<Compile Include="Converters\Video\ScalingConverter.cs" />\r
+ <Compile Include="EventArgs\QueueCompletedEventArgs.cs" />\r
+ <Compile Include="EventArgs\QueueProgressEventArgs.cs" />\r
+ <Compile Include="EventArgs\SettingChangedEventArgs.cs" />\r
<Compile Include="Extensions\StringExtensions.cs" />\r
<Compile Include="Model\Audio\AudioBehaviourModes.cs" />\r
<Compile Include="Model\Audio\AudioBehaviours.cs" />\r
<Compile Include="Model\Picture\PresetPictureSettingsMode.cs" />\r
<Compile Include="Model\Subtitles\SubtitleBehaviourModes.cs" />\r
<Compile Include="Model\Subtitles\SubtitleBehaviours.cs" />\r
+ <Compile Include="Services\Interfaces\IQueueProcessor.cs" />\r
<Compile Include="Services\Presets\Factories\PlistPresetFactory.cs" />\r
<Compile Include="Helpers\FileHelper.cs" />\r
<Compile Include="Services\Presets\Model\Preset.cs" />\r
<Compile Include="Services\Interfaces\IUserSettingService.cs" />\r
<Compile Include="Services\Presets\Model\PresetContainer.cs" />\r
<Compile Include="Services\Presets\PresetService.cs" />\r
+ <Compile Include="Services\QueueProcessor.cs" />\r
<Compile Include="Services\UserSettingService.cs" />\r
<Compile Include="Utilities\AppcastReader.cs" />\r
<Compile Include="Utilities\DelayedActionProcessor.cs" />\r
\r
using HandBrakeWPF.Services.Interfaces;\r
\r
+ using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+\r
/// <summary>\r
/// Queue Recovery Helper\r
/// </summary>\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Services.Interfaces\r
+namespace HandBrakeWPF.Services.Interfaces\r
{\r
using System;\r
using System.ComponentModel;\r
\r
namespace HandBrakeWPF.Services.Interfaces\r
{\r
- using HandBrake.ApplicationServices.EventArgs;\r
+ using SettingChangedEventArgs = HandBrakeWPF.EventArgs.SettingChangedEventArgs;\r
\r
/// <summary>\r
/// The setting event handler.\r
\r
using HandBrakeWPF.Services.Interfaces;\r
\r
+ using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+\r
/// <summary>\r
/// The Notification Service (Growl Connector)\r
/// </summary>\r
\r
namespace HandBrakeWPF.Services\r
{\r
+ using System;\r
using System.Diagnostics;\r
using System.Windows.Forms;\r
\r
using Caliburn.Micro;\r
\r
- using HandBrake.ApplicationServices.EventArgs;\r
using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
- using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
\r
+ using HandBrakeWPF.EventArgs;\r
using HandBrakeWPF.Services.Interfaces;\r
using HandBrakeWPF.ViewModels.Interfaces;\r
\r
- using Application = System.Windows.Application;\r
-\r
/// <summary>\r
/// The when done service.\r
/// </summary>\r
/// <param name="e">\r
/// The e.\r
/// </param>\r
- private void EncodeService_EncodeStarted(object sender, System.EventArgs e)\r
+ private void EncodeService_EncodeStarted(object sender, EventArgs e)\r
{\r
if (this.userSettingService.GetUserSetting<bool>(UserSettingConstants.PreventSleep))\r
{\r
\r
// Give the user the ability to cancel the shutdown. Default 60 second timer.\r
ICountdownAlertViewModel titleSpecificView = IoC.Get<ICountdownAlertViewModel>();\r
- Caliburn.Micro.Execute.OnUIThread(\r
+ Execute.OnUIThread(\r
() =>\r
{\r
titleSpecificView.SetAction(this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction));\r
Win32.ExitWindowsEx(0, 0);\r
break;\r
case "Suspend":\r
- System.Windows.Forms.Application.SetSuspendState(PowerState.Suspend, true, true);\r
+ Application.SetSuspendState(PowerState.Suspend, true, true);\r
break;\r
case "Hibernate":\r
- System.Windows.Forms.Application.SetSuspendState(PowerState.Hibernate, true, true);\r
+ Application.SetSuspendState(PowerState.Hibernate, true, true);\r
break;\r
case "Lock System":\r
Win32.LockWorkStation();\r
break;\r
case "Quit HandBrake":\r
- Execute.OnUIThread(() => Application.Current.Shutdown());\r
+ Execute.OnUIThread(() => System.Windows.Application.Current.Shutdown());\r
break;\r
}\r
}\r
!string.IsNullOrEmpty(this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileTo)))\r
{\r
string args = string.Format(\r
- "{0} \"{1}\"",\r
- this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileToArgs),\r
+ "{0} \"{1}\"", \r
+ this.userSettingService.GetUserSetting<string>(UserSettingConstants.SendFileToArgs), \r
file);\r
var vlc =\r
new ProcessStartInfo(\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-namespace HandBrake.ApplicationServices.Services\r
+namespace HandBrakeWPF.Services\r
{\r
using System;\r
using System.Collections.Generic;\r
\r
using Caliburn.Micro;\r
\r
- using HandBrake.ApplicationServices.EventArgs;\r
using HandBrake.ApplicationServices.Exceptions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
using HandBrake.ApplicationServices.Services.Encode.Interfaces;\r
- using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
\r
+ using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+ using QueueCompletedEventArgs = HandBrakeWPF.EventArgs.QueueCompletedEventArgs;\r
+ using QueueProgressEventArgs = HandBrakeWPF.EventArgs.QueueProgressEventArgs;\r
+\r
/// <summary>\r
/// The HandBrake Queue\r
/// </summary>\r
throw new Exception("Already Processing the Queue");\r
}\r
\r
- clearCompleted = isClearCompleted;\r
+ this.clearCompleted = isClearCompleted;\r
\r
this.EncodeService.EncodeCompleted -= this.EncodeServiceEncodeCompleted;\r
this.EncodeService.EncodeCompleted += this.EncodeServiceEncodeCompleted;\r
this.LastProcessedJob.Status = QueueItemStatus.Completed;\r
\r
// Clear the completed item of the queue if the setting is set.\r
- if (clearCompleted)\r
+ if (this.clearCompleted)\r
{\r
this.ClearCompleted();\r
}\r
using System.Reflection;\r
using System.Xml.Serialization;\r
\r
- using HandBrake.ApplicationServices.EventArgs;\r
using HandBrake.ApplicationServices.Exceptions;\r
\r
using HandBrakeWPF.Services.Interfaces;\r
\r
+ using SettingChangedEventArgs = HandBrakeWPF.EventArgs.SettingChangedEventArgs;\r
+\r
/// <summary>\r
/// The User Setting Serivce\r
/// </summary>\r
this.windsorContainer.Register(Component.For<IEventAggregator>().ImplementedBy<EventAggregator>());\r
\r
// Initialise the ApplicationServices IWindsorInstaller\r
- this.windsorContainer.Register(Component.For<IWindsorInstaller>().ImplementedBy<ServicesWindsorInstaller>());\r
- this.windsorContainer.Install(windsorContainer.ResolveAll<IWindsorInstaller>());\r
+ // this.windsorContainer.Register(Component.For<IWindsorInstaller>().ImplementedBy<ServicesWindsorInstaller>());\r
+ // this.windsorContainer.Install(windsorContainer.ResolveAll<IWindsorInstaller>());\r
\r
// Services\r
this.windsorContainer.Register(Component.For<IUpdateService>().ImplementedBy<UpdateService>().LifeStyle.Is(LifestyleType.Singleton));\r
this.windsorContainer.Register(Component.For<IPrePostActionService>().ImplementedBy<PrePostActionService>().LifeStyle.Is(LifestyleType.Singleton));\r
this.windsorContainer.Register(Component.For<IUserSettingService>().ImplementedBy<UserSettingService>());\r
this.windsorContainer.Register(Component.For<IPresetService>().ImplementedBy<PresetService>());\r
+ this.windsorContainer.Register(Component.For<IQueueProcessor>().ImplementedBy<QueueProcessor>());\r
\r
// Commands\r
this.windsorContainer.Register(Component.For<IAdvancedEncoderOptionsCommand>().ImplementedBy<AdvancedEncoderOptionsCommand>().LifeStyle.Is(LifestyleType.Singleton));\r
using HandBrake.ApplicationServices.Interop;\r
\r
using HandBrakeWPF.Commands;\r
+ using HandBrakeWPF.EventArgs;\r
using HandBrakeWPF.Factories;\r
using HandBrakeWPF.Helpers;\r
using HandBrakeWPF.Model;\r
\r
using Ookii.Dialogs.Wpf;\r
\r
+ using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+\r
/// <summary>\r
/// HandBrakes Main Window\r
/// </summary>\r
/// <param name="e">\r
/// The e.\r
/// </param>\r
- void QueueProcessorJobProcessingStarted(object sender, HandBrake.ApplicationServices.EventArgs.QueueProgressEventArgs e)\r
+ void QueueProcessorJobProcessingStarted(object sender, QueueProgressEventArgs e)\r
{\r
Execute.OnUIThread(\r
() =>\r
/// <param name="e">\r
/// The e.\r
/// </param>\r
- private void UserSettingServiceSettingChanged(object sender, HandBrake.ApplicationServices.EventArgs.SettingChangedEventArgs e)\r
+ private void UserSettingServiceSettingChanged(object sender, SettingChangedEventArgs e)\r
{\r
if (e.Key == UserSettingConstants.ShowAdvancedTab)\r
{\r
\r
using Caliburn.Micro;\r
\r
- using HandBrake.ApplicationServices.EventArgs;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Services.Encode.EventArgs;\r
using HandBrake.ApplicationServices.Services.Encode.Model;\r
- using HandBrake.ApplicationServices.Services.Interfaces;\r
\r
+ using HandBrakeWPF.EventArgs;\r
using HandBrakeWPF.Properties;\r
using HandBrakeWPF.Services.Interfaces;\r
using HandBrakeWPF.ViewModels.Interfaces;\r
this.JobsPending = string.Format("{0} jobs pending", this.queueProcessor.Count);\r
this.IsEncoding = false;\r
\r
- MessageBox.Show("The Queue has been paused. The currently running job will run to completion and no further jobs will start.", "Queue",\r
+ MessageBox.Show("The Queue has been paused. The currently running job will run to completion and no further jobs will start.", "Queue", \r
MessageBoxButton.OK, MessageBoxImage.Information);\r
}\r
\r
{\r
MessageBoxResult result =\r
this.errorService.ShowMessageBox(\r
- "This encode is currently in progress. If you delete it, the encode will be stopped. Are you sure you wish to proceed?",\r
- Resources.Warning,\r
- MessageBoxButton.YesNo,\r
+ "This encode is currently in progress. If you delete it, the encode will be stopped. Are you sure you wish to proceed?", \r
+ Resources.Warning, \r
+ MessageBoxButton.YesNo, \r
MessageBoxImage.Question);\r
\r
if (result == MessageBoxResult.Yes)\r
{\r
SaveFileDialog dialog = new SaveFileDialog\r
{\r
- Filter = "HandBrake Queue Files (*.hbq)|*.hbq",\r
- OverwritePrompt = true,\r
- DefaultExt = ".hbq",\r
+ Filter = "HandBrake Queue Files (*.hbq)|*.hbq", \r
+ OverwritePrompt = true, \r
+ DefaultExt = ".hbq", \r
AddExtension = true\r
};\r
if (dialog.ShowDialog() == true)\r
public void EditJob(QueueTask task)\r
{\r
MessageBoxResult result = this.errorService.ShowMessageBox(\r
- "Are you sure you wish to edit this job? It will be removed from the queue and sent to the main window.",\r
- "Modify Job?",\r
- MessageBoxButton.YesNo,\r
+ "Are you sure you wish to edit this job? It will be removed from the queue and sent to the main window.", \r
+ "Modify Job?", \r
+ MessageBoxButton.YesNo, \r
MessageBoxImage.Question);\r
\r
if (result != MessageBoxResult.Yes)\r
/// </param>\r
private void EncodeService_EncodeStatusChanged(object sender, EncodeProgressEventArgs e)\r
{\r
- Caliburn.Micro.Execute.OnUIThread(() =>\r
+ Execute.OnUIThread(() =>\r
{\r
this.JobStatus =\r
string.Format(\r
- "Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}",\r
- e.Task,\r
- e.TaskCount,\r
- e.PercentComplete,\r
- e.CurrentFrameRate,\r
- e.AverageFrameRate,\r
- e.EstimatedTimeLeft,\r
+ "Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}", \r
+ e.Task, \r
+ e.TaskCount, \r
+ e.PercentComplete, \r
+ e.CurrentFrameRate, \r
+ e.AverageFrameRate, \r
+ e.EstimatedTimeLeft, \r
e.ElapsedTime);\r
});\r
}\r
using HandBrakeWPF.Services.Interfaces;\r
using HandBrakeWPF.ViewModels.Interfaces;\r
\r
+ using IQueueProcessor = HandBrakeWPF.Services.Interfaces.IQueueProcessor;\r
+\r
/// <summary>\r
/// The Shell View Model\r
/// </summary>\r
\r
using Caliburn.Micro;\r
\r
- using HandBrake.ApplicationServices.EventArgs;\r
using HandBrake.ApplicationServices.Services.Encode.Model;\r
using HandBrake.ApplicationServices.Services.Encode.Model.Models;\r
using HandBrake.ApplicationServices.Services.Encode.Model.Models.Video;\r
using HandBrakeWPF.ViewModels.Interfaces;\r
\r
using Clipboard = System.Windows.Clipboard;\r
+ using SettingChangedEventArgs = HandBrakeWPF.EventArgs.SettingChangedEventArgs;\r
\r
/// <summary>\r
/// The Video View Model\r