summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs33
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs55
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml21
3 files changed, 67 insertions, 42 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index c4e45208c..f97ac2c8c 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -595,7 +595,7 @@ namespace HandBrakeWPF.ViewModels
set
{
this.isMkv = value;
- this.NotifyOfPropertyChange("IsMkv");
+ this.NotifyOfPropertyChange(() => this.IsMkv);
}
}
@@ -1549,15 +1549,20 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.ScannedSource.Titles);
// Select the Users Title
- this.CurrentTask = new EncodeTask(queueEditTask);
- this.NotifyOfPropertyChange(() => this.CurrentTask);
this.SelectedTitle = this.ScannedSource.Titles.FirstOrDefault(t => t.TitleNumber == this.CurrentTask.Title);
-
- // Update the Main UI control Area (TODO)
this.CurrentTask = new EncodeTask(queueEditTask);
this.NotifyOfPropertyChange(() => this.CurrentTask);
- // Update the Tab Controls (TODO)
+ // Update the Main Window
+ this.NotifyOfPropertyChange(() => this.Destination);
+ this.NotifyOfPropertyChange(() => this.SelectedStartPoint);
+ this.NotifyOfPropertyChange(() => this.SelectedEndPoint);
+ this.NotifyOfPropertyChange(() => this.SelectedAngle);
+ this.NotifyOfPropertyChange(() => this.SelectedPointToPoint);
+ this.NotifyOfPropertyChange(() => this.SelectedOutputFormat);
+ this.NotifyOfPropertyChange(() => IsMkv);
+
+ // Update the Tab Controls
this.PictureSettingsViewModel.UpdateTask(this.CurrentTask);
this.VideoViewModel.UpdateTask(this.CurrentTask);
this.FiltersViewModel.UpdateTask(this.CurrentTask);
@@ -1566,8 +1571,23 @@ namespace HandBrakeWPF.ViewModels
this.ChaptersViewModel.UpdateTask(this.CurrentTask);
this.AdvancedViewModel.UpdateTask(this.CurrentTask);
+ // Tell the Preivew Window
+ IPreviewViewModel viewModel = IoC.Get<IPreviewViewModel>();
+ viewModel.Task = this.CurrentTask;
+
// Cleanup
this.ShowStatusWindow = false;
+
+ if (this.SelectedTitle != null && !string.IsNullOrEmpty(this.SelectedTitle.SourceName))
+ {
+ this.SourceLabel = this.SelectedTitle.SourceName;
+ }
+ else
+ {
+ this.SourceLabel = this.SourceName;
+ }
+
+ this.StatusLabel = "Scan Completed";
});
}
@@ -1676,6 +1696,7 @@ namespace HandBrakeWPF.ViewModels
this.ProgramStatusLabel = "A New Update is Available. Goto Tools Menu > Options to Install";
}
}
+
#endregion
#region Event Handlers
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index a3998be21..4f344db08 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -11,6 +11,7 @@ namespace HandBrakeWPF.ViewModels
{
using System;
using System.Collections.ObjectModel;
+ using System.ComponentModel;
using System.Windows;
using Caliburn.Micro;
@@ -30,6 +31,13 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public class QueueViewModel : ViewModelBase, IQueueViewModel
{
+ /*
+
+ * TODO FIX THE DRAP/DROP ADORNER!
+ */
+
+
+
#region Constants and Fields
/// <summary>
@@ -152,17 +160,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets QueueJobs.
- /// </summary>
- public ObservableCollection<QueueTask> QueueJobs
- {
- get
- {
- return this.queueProcessor.Queue;
- }
- }
-
- /// <summary>
/// Gets or sets WhenDoneAction.
/// </summary>
public string WhenDoneAction
@@ -178,6 +175,17 @@ namespace HandBrakeWPF.ViewModels
}
}
+ /// <summary>
+ /// Gets the queue tasks.
+ /// </summary>
+ public BindingList<QueueTask> QueueTasks
+ {
+ get
+ {
+ return this.queueProcessor.Queue;
+ }
+ }
+
#endregion
#region Public Methods
@@ -270,8 +278,6 @@ namespace HandBrakeWPF.ViewModels
{
this.queueProcessor.Remove(task);
}
-
- this.JobsPending = string.Format("{0} jobs pending", this.queueProcessor.Count);
}
/// <summary>
@@ -408,16 +414,19 @@ namespace HandBrakeWPF.ViewModels
private void EncodeService_EncodeStatusChanged(
object sender, EncodeProgressEventArgs e)
{
- this.JobStatus =
- string.Format(
- "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}",
- e.Task,
- e.TaskCount,
- e.PercentComplete,
- e.CurrentFrameRate,
- e.AverageFrameRate,
- e.EstimatedTimeLeft,
- e.ElapsedTime);
+ if (this.IsEncoding)
+ {
+ this.JobStatus =
+ string.Format(
+ "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}",
+ e.Task,
+ e.TaskCount,
+ e.PercentComplete,
+ e.CurrentFrameRate,
+ e.AverageFrameRate,
+ e.EstimatedTimeLeft,
+ e.ElapsedTime);
+ }
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index 5384948b3..394eb35e4 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -137,15 +137,14 @@
<TextBlock Text="{Binding JobsPending}" />
<TextBlock Text="{Binding JobStatus}" />
</StackPanel>
-
+
<ListBox Grid.Row="2"
Margin="10,0,10,10"
Background="LightGray"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
- ItemsSource="{Binding QueueJobs}"
- SelectedItem="{Binding SelectedJob}"
+ ItemsSource="{Binding QueueTasks, Mode=OneWay}"
SelectionMode="Extended">
<ListBox.ContextMenu>
@@ -263,16 +262,16 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <Image Width="20" Grid.Row="0" Grid.Column="0" Grid.RowSpan="2"
- Height="20" VerticalAlignment="Center" Margin="0,0,5,0"
+ <Image Width="20" Grid.Row="0" Grid.Column="0"
+ Height="20" VerticalAlignment="Center" Margin="0,5,0,0"
Source="Images/Refresh.ico"
ToolTip="Reset job status to Waiting."
Visibility="{Binding Status,
@@ -288,7 +287,7 @@
<Image Width="20" Grid.Row="0" Grid.Column="1"
Height="20"
- Margin="0,5,0,0"
+ Margin="10,5,0,0"
Source="Images/Options24.png"
ToolTip="Edit this Job">
<i:Interaction.Triggers>
@@ -300,9 +299,9 @@
</i:Interaction.Triggers>
</Image>
- <Image Width="20" Grid.Row="1" Grid.Column="1"
+ <Image Width="20" Grid.Row="0" Grid.Column="2"
Height="20"
- Margin="0,5,0,0"
+ Margin="10,5,0,0"
Source="Images/delete.png"
ToolTip="Remove this Job">
<i:Interaction.Triggers>
@@ -317,11 +316,7 @@
</Grid>
-
-
</Grid>
-
-
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>