summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/ServerService.cs14
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs15
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml4
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml6
5 files changed, 24 insertions, 17 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/ServerService.cs b/win/CS/HandBrake.ApplicationServices/Services/ServerService.cs
index f6b6edf44..d8966c192 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/ServerService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/ServerService.cs
@@ -20,6 +20,12 @@ namespace HandBrake.ApplicationServices.Services
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrake.Interop;
+ using HandBrake.Interop.Interfaces;
+
+ using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs;
+ using EncodeProgressEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs;
+ using ScanProgressEventArgs = HandBrake.ApplicationServices.EventArgs.ScanProgressEventArgs;
/// <summary>
/// HandBrake WCF Service
@@ -152,6 +158,9 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// Start the service
/// </summary>
+ /// <param name="port">
+ /// The port.
+ /// </param>
public void Start(string port)
{
using (host = new ServiceHost(typeof(ServerService), new Uri(string.Format("net.tcp://127.0.0.1:{0}", port))))
@@ -163,8 +172,9 @@ namespace HandBrake.ApplicationServices.Services
Console.WriteLine("Service Started. Waiting for Clients...");
// Setup the services we are going to use.
- scanService = new ScanService(new UserSettingService()); // TODO this needs wired up with castle
- encodeService = new Encode(new UserSettingService());
+ IHandBrakeInstance instance = new HandBrakeInstance();
+ scanService = new LibScan(new UserSettingService(), instance); // TODO this needs wired up with castle
+ encodeService = new LibEncode(new UserSettingService(), instance);
shutdownFlag = new ManualResetEvent(false);
shutdownFlag.WaitOne();
diff --git a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs
index 209e3c091..4c97ab412 100644
--- a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs
@@ -40,12 +40,6 @@ namespace HandBrakeWPF.ViewModels
/// Backing field for the selected mode
/// </summary>
private int selectedMode;
-
- /// <summary>
- /// Backing field for the log info.
- /// </summary>
- private string log;
-
#endregion
/// <summary>
@@ -62,7 +56,8 @@ namespace HandBrakeWPF.ViewModels
this.encodeService = encodeService;
this.scanService = scanService;
this.Title = "Log Viewer";
- this.SelectedMode = 0;
+
+ this.SelectedMode = this.encodeService.IsEncoding ? 0 : 1;
}
/// <summary>
@@ -174,8 +169,12 @@ namespace HandBrakeWPF.ViewModels
protected override void OnDeactivate(bool close)
{
this.scanService.ScanStared -= ScanServiceScanStared;
+ this.scanService.ScanCompleted -= ScanServiceScanCompleted;
this.encodeService.EncodeStarted -= EncodeServiceEncodeStarted;
- this.Load();
+ this.encodeService.EncodeCompleted -= EncodeServiceEncodeCompleted;
+ this.encodeService.EncodeStatusChanged -= this.EncodeServiceEncodeStatusChanged;
+ this.scanService.ScanStatusChanged -= this.ScanServiceScanStatusChanged;
+
base.OnDeactivate(close);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index acc59e60e..c2aef69ed 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1080,7 +1080,7 @@ namespace HandBrakeWPF.ViewModels
}
// Otherwise, perform Santiy Checking then add to the queue and start if everything is ok.
- if (this.ScannedSource == null || this.CurrentTask == null)
+ if (this.SelectedTitle == null)
{
this.errorService.ShowMessageBox("You must first scan a source.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index d4cea73db..0ab5e87b9 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -106,7 +106,7 @@
<Image Width="16" Source="Images/Queue_Small.png" />
</MenuItem.Icon>
</MenuItem>
- <MenuItem Header="Activity Window" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]">
+ <MenuItem Header="Activity Log" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]">
<MenuItem.Icon>
<Image Width="16" Source="Images/Output_Small.png" />
</MenuItem.Icon>
@@ -311,7 +311,7 @@
/>
<Label Margin="8,0,0,0"
VerticalAlignment="Center"
- Content="Activity Window"
+ Content="Activity Log"
/>
</StackPanel>
</Button>
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index 4412c7bfb..a2be6c113 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -14,8 +14,6 @@
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
-
-
<Style TargetType="TextBlock">
<Setter Property="Margin" Value="0,0,5,0" />
</Style>
@@ -336,9 +334,9 @@
<TextBlock Text="These options are for developer testing of features that are currently in progress!!!!" FontWeight="Bold" Margin="0,0,0,10" />
<StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
- <CheckBox Content="Enable Process Isolation (Run Scans and Encodes via an intermediate service)" IsChecked="{Binding EnableProcessIsolation}" />
- <CheckBox Content="Enable LibHB (uses hb.dll instead of HandBrakeCLI.exe)" Margin="0,5,0,0" IsChecked="{Binding EnableLibHb}" />
+ <CheckBox Content="Enable LibHB (uses hb.dll instead of HandBrakeCLI.exe)" Margin="0,5,0,0" IsChecked="{Binding EnableLibHb}" />
+ <CheckBox Content="Enable Process Isolation (Run Scans and Encodes via an intermediate service)" Margin="20,10,0,0" IsChecked="{Binding EnableProcessIsolation}" />
<StackPanel Orientation="Horizontal" Margin="0,10,0,0" Grid.Column="1">
<TextBlock Text="Server Port:" VerticalAlignment="Center" />
<TextBox Width="50" MaxLength="5" Text="{Binding ServerPort}" />