diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs | 64 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AboutView.xaml | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AddPresetView.xaml | 10 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/ErrorView.xaml | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/LogView.xaml | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 6 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/OptionsView.xaml | 9 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/PreviewView.xaml | 22 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/TitleSpecificView.xaml | 26 |
10 files changed, 90 insertions, 60 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs index 77210737a..c6ec62f6b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs @@ -19,8 +19,6 @@ namespace HandBrakeWPF.ViewModels using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
- using HandBrake.ApplicationServices.Utilities;
-
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -67,7 +65,7 @@ namespace HandBrakeWPF.ViewModels this.presetService = presetService;
this.errorService = errorService;
this.Title = "Add Preset";
- this.Preset = new Preset { IsBuildIn = false, IsDefault = false, Category = PresetService.UserPresetCatgoryName };
+ this.Preset = new Preset { IsBuildIn = false, IsDefault = false, Category = PresetService.UserPresetCatgoryName, UsePictureFilters = true};
this.PictureSettingsModes = EnumHelper<PresetPictureSettingsMode>.GetEnumList();
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs index 7785552cd..64b24e0e9 100644 --- a/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/LogViewModel.cs @@ -15,9 +15,6 @@ namespace HandBrakeWPF.ViewModels using System.Windows;
using HandBrake.ApplicationServices.Services.Interfaces;
-
- using Caliburn.Micro;
-
using Interfaces;
using HandBrake.ApplicationServices.EventArgs;
@@ -27,11 +24,6 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public class LogViewModel : ViewModelBase, ILogViewModel
{
- /**
- * TODO
- * - Live update the log file.
- */
-
#region Private Fields
/// <summary>
@@ -59,16 +51,13 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Initializes a new instance of the <see cref="LogViewModel"/> class.
/// </summary>
- /// <param name="windowManager">
- /// The window manager.
- /// </param>
/// <param name="encodeService">
/// The encode service.
/// </param>
/// <param name="scanService">
/// The scan service.
/// </param>
- public LogViewModel(IWindowManager windowManager, IEncode encodeService, IScan scanService)
+ public LogViewModel(IEncode encodeService, IScan scanService)
{
this.encodeService = encodeService;
this.scanService = scanService;
@@ -76,6 +65,9 @@ namespace HandBrakeWPF.ViewModels this.SelectedMode = 0;
}
+ /// <summary>
+ /// Gets Log.
+ /// </summary>
public string Log
{
get
@@ -136,21 +128,39 @@ namespace HandBrakeWPF.ViewModels /// </summary>
protected override void OnActivate()
{
- this.scanService.ScanStared += scanService_ScanStared;
- this.scanService.ScanCompleted += scanService_ScanCompleted;
- this.encodeService.EncodeStarted += encodeService_EncodeStarted;
- this.encodeService.EncodeCompleted += encodeService_EncodeCompleted;
- this.encodeService.EncodeStatusChanged += this.encodeService_EncodeStatusChanged;
- this.scanService.ScanStatusChanged += this.scanService_ScanStatusChanged;
+ this.scanService.ScanStared += ScanServiceScanStared;
+ this.scanService.ScanCompleted += ScanServiceScanCompleted;
+ this.encodeService.EncodeStarted += EncodeServiceEncodeStarted;
+ this.encodeService.EncodeCompleted += EncodeServiceEncodeCompleted;
+ this.encodeService.EncodeStatusChanged += this.EncodeServiceEncodeStatusChanged;
+ this.scanService.ScanStatusChanged += this.ScanServiceScanStatusChanged;
base.OnActivate();
}
- private void scanService_ScanStatusChanged(object sender, ScanProgressEventArgs e)
+ /// <summary>
+ /// Scan Status has changed, update log window.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void ScanServiceScanStatusChanged(object sender, ScanProgressEventArgs e)
{
this.NotifyOfPropertyChange(() => this.Log);
}
- private void encodeService_EncodeStatusChanged(object sender, EncodeProgressEventArgs e)
+ /// <summary>
+ /// Encode Status has changed, update log window
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private void EncodeServiceEncodeStatusChanged(object sender, EncodeProgressEventArgs e)
{
this.NotifyOfPropertyChange(() => this.Log);
}
@@ -163,8 +173,8 @@ namespace HandBrakeWPF.ViewModels /// </param>
protected override void OnDeactivate(bool close)
{
- this.scanService.ScanStared -= scanService_ScanStared;
- this.encodeService.EncodeStarted -= encodeService_EncodeStarted;
+ this.scanService.ScanStared -= ScanServiceScanStared;
+ this.encodeService.EncodeStarted -= EncodeServiceEncodeStarted;
this.Load();
base.OnDeactivate(close);
}
@@ -186,10 +196,9 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void encodeService_EncodeStarted(object sender, EventArgs e)
+ private void EncodeServiceEncodeStarted(object sender, EventArgs e)
{
this.SelectedMode = 0;
- this.NotifyOfPropertyChange(() => this.Log);
}
/// <summary>
@@ -201,10 +210,9 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void scanService_ScanStared(object sender, EventArgs e)
+ private void ScanServiceScanStared(object sender, EventArgs e)
{
this.SelectedMode = 1;
- this.NotifyOfPropertyChange(() => this.Log);
}
/// <summary>
@@ -216,7 +224,7 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void scanService_ScanCompleted(object sender, ScanCompletedEventArgs e)
+ private void ScanServiceScanCompleted(object sender, ScanCompletedEventArgs e)
{
this.NotifyOfPropertyChange(() => this.Log);
}
@@ -230,7 +238,7 @@ namespace HandBrakeWPF.ViewModels /// <param name="e">
/// The e.
/// </param>
- private void encodeService_EncodeCompleted(object sender, EncodeCompletedEventArgs e)
+ private void EncodeServiceEncodeCompleted(object sender, EncodeCompletedEventArgs e)
{
this.NotifyOfPropertyChange(() => this.Log);
}
diff --git a/win/CS/HandBrakeWPF/Views/AboutView.xaml b/win/CS/HandBrakeWPF/Views/AboutView.xaml index b764d13bc..c4e048bc5 100644 --- a/win/CS/HandBrakeWPF/Views/AboutView.xaml +++ b/win/CS/HandBrakeWPF/Views/AboutView.xaml @@ -30,7 +30,7 @@ <TextBlock Text="{Binding Version}" Margin="0,0,0,1" VerticalAlignment="Bottom" />
</StackPanel>
- <TextBlock Text="Copyright 2003-2011 HandBrake Team" Margin="5,0,0,0 " Grid.Row="1" />
+ <TextBlock Text="Copyright 2003-2012 HandBrake Team" Margin="5,0,0,0 " Grid.Row="1" />
<TextBlock Text="License:" Margin="5,10,0,5" Grid.Row="2" />
<TextBox VerticalAlignment="Stretch" HorizontalAlignment="Stretch" IsReadOnly="True" TextWrapping="Wrap"
@@ -46,7 +46,7 @@ You should have received a copy of the GNU General Public License along with thi </Grid>
<StackPanel HorizontalAlignment="Stretch" Background="LightGray" Grid.Row="1">
- <Button Content="Close" Micro:Message.Attach="[Event Click] = [Action Close]"
+ <Button Content="Close" IsDefault="True" Micro:Message.Attach="[Event Click] = [Action Close]"
HorizontalAlignment="Right" Padding="12,2" Margin="0,5,10,5" VerticalAlignment="Center" />
</StackPanel>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml index 216ee64e5..33229ca35 100644 --- a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml +++ b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml @@ -5,7 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" mc:Ignorable="d"
Title="{Binding Title}"
- Width="350" Height="310">
+ Width="350" SizeToContent="Height">
<Window.Resources>
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
@@ -22,7 +22,7 @@ <!-- Header -->
<StackPanel Orientation="Horizontal" Grid.Row="0" Background="White" Height="30" Margin="0,0,0,10" >
- <Image Source="Images/Add16.png" Margin="10,0,5,0" Width="16" Height="16" VerticalAlignment="Center" />
+ <Image Source="Images/Add16.png" Margin="10,0,5,0" Width="24" Height="24" VerticalAlignment="Center" />
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<TextBlock Text="Add a Preset" FontWeight="Bold" />
</StackPanel>
@@ -78,8 +78,10 @@ <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <Button Content="Cancel" Padding="8,2" Margin="0,5,10,5" Grid.Column="1" cal:Message.Attach="[Event Click] = [Action Cancel]" />
- <Button Content="Add" Padding="8,2" Margin="0,5,10,5" Grid.Column="2" cal:Message.Attach="[Event Click] = [Action Add]" />
+ <Button Content="Cancel" Padding="8,2" Margin="0,5,10,5" Grid.Column="1"
+ IsCancel="True" cal:Message.Attach="[Event Click] = [Action Cancel]" />
+ <Button Content="Add" Padding="8,2" Margin="0,5,10,5" Grid.Column="2"
+ IsDefault="True" cal:Message.Attach="[Event Click] = [Action Add]" />
</Grid>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/ErrorView.xaml b/win/CS/HandBrakeWPF/Views/ErrorView.xaml index cf6ddd97a..263d2486a 100644 --- a/win/CS/HandBrakeWPF/Views/ErrorView.xaml +++ b/win/CS/HandBrakeWPF/Views/ErrorView.xaml @@ -45,7 +45,7 @@ <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Image Source="Images/copy.png" Grid.Column="0" Width="16" Height="16" Margin="0,0,5,0" />
- <TextBlock Text="Copy" Grid.Column="1" />
+ <TextBlock Text="Copy to Clipboard" Grid.Column="1" />
</Grid>
</Button>
diff --git a/win/CS/HandBrakeWPF/Views/LogView.xaml b/win/CS/HandBrakeWPF/Views/LogView.xaml index f1aea707d..017601471 100644 --- a/win/CS/HandBrakeWPF/Views/LogView.xaml +++ b/win/CS/HandBrakeWPF/Views/LogView.xaml @@ -12,7 +12,7 @@ <Button cal:Message.Attach="[Event Click] = [Action CopyLog]">
<StackPanel Orientation="Horizontal">
<Image Source="Images/copy.png" Width="16"/>
- <TextBlock Text="Copy" Margin="2,0,0,0" />
+ <TextBlock Text="Copy to clipboard" Margin="2,0,0,0" />
</StackPanel>
</Button>
<Button Margin="5,0,0,0" cal:Message.Attach="[Event Click] = [Action OpenLogDirectory]">
@@ -24,6 +24,7 @@ <Separator />
+ <TextBlock Text="Choose Log:" FontWeight="Bold" VerticalAlignment="Center" Margin="10,0,10,0" />
<ComboBox Width="100" HorizontalAlignment="Right" ItemsSource="{Binding LogModes}" SelectedIndex="{Binding SelectedMode}">
</ComboBox>
</ToolBar>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 347b85dac..2161ac590 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -3,9 +3,9 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" Title="{Data:Binding Path=WindowTitle}" Height="625" Width="1015" FontSize="11" Background="#FFF0F0F0"
+ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" Title="{Data:Binding Path=WindowTitle}" Width="1015" FontSize="11" Background="#FFF0F0F0"
Micro:Message.Attach="[Event Loaded] = [Action Load]"
- UseLayoutRounding="True"
+ UseLayoutRounding="True" SizeToContent="Height"
AllowDrop="True">
<i:Interaction.Triggers>
@@ -237,7 +237,7 @@ </StackPanel>
<!-- Tab Control -->
- <TabControl HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="725" Height="300" Margin="10,10,10,10" Name="tabControl" >
+ <TabControl HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="725" Height="310" Margin="10,10,10,10" Name="tabControl" >
<TabItem Header="Picture" Name="pictureTab">
<ContentControl x:Name="PictureSettingsViewModel" ></ContentControl>
</TabItem>
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index c3f60077b..b4e14a088 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -1,7 +1,7 @@ <Window x:Class="HandBrakeWPF.Views.OptionsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cal="http://www.caliburnproject.org"
- xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers" Title="{Binding Title}" MinWidth="620" MinHeight="545" Width="620" Height="545">
+ xmlns:Helpers="clr-namespace:HandBrakeWPF.Helpers" Title="{Binding Title}" MinWidth="620" SizeToContent="Height" Width="620">
<Window.Resources>
<Style TargetType="Button">
@@ -367,8 +367,11 @@ </TabItem>
</TabControl>
- <Button Content="Close" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]"
- HorizontalAlignment="Right" Padding="10,2" Margin="0,0,10,0" />
+ <StackPanel HorizontalAlignment="Stretch" Background="LightGray" >
+ <Button Content="Close" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]"
+ HorizontalAlignment="Right" Padding="10,2" Margin="0,5,10,5" />
+ </StackPanel>
+
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/PreviewView.xaml b/win/CS/HandBrakeWPF/Views/PreviewView.xaml index 4a5399b69..460501930 100644 --- a/win/CS/HandBrakeWPF/Views/PreviewView.xaml +++ b/win/CS/HandBrakeWPF/Views/PreviewView.xaml @@ -5,7 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:cal="http://www.caliburnproject.org"
mc:Ignorable="d"
Title="{Binding Title}"
- Width="380" Height="140">
+ Width="380" SizeToContent="Height" Background="#FFF1F0EF">
<Window.Resources>
<Style TargetType="Button">
@@ -17,8 +17,16 @@ </Style>
</Window.Resources>
- <StackPanel Orientation="Vertical" Margin="10,10,0,0">
- <StackPanel Orientation="Horizontal">
+ <StackPanel Orientation="Vertical" >
+
+ <StackPanel Orientation="Horizontal" Grid.Row="0" Background="White" Height="30" Margin="0,0,0,10" >
+ <Image Source="Images/window.png" Margin="10,0,5,0" Width="24" Height="24" VerticalAlignment="Center" />
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+ <TextBlock Text="Create a video preview" FontWeight="Bold" />
+ </StackPanel>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal" Margin="10,0,0,0">
<TextBlock Text="Start at Preview:" Margin="0,0,5,0" VerticalAlignment="Center" />
<ComboBox ItemsSource="{Binding StartPoints}" Width="60" SelectedItem="{Binding StartAt}" />
@@ -26,14 +34,14 @@ <ComboBox ItemsSource="{Binding AvailableDurations}" Width="60" SelectedItem="{Binding Duration}" />
</StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
+ <StackPanel Orientation="Horizontal" Margin="10,10,0,0">
<ProgressBar Minimum="0" Maximum="100" Width="310" Height="22" Value="{Binding PercentageValue}" />
<TextBlock Text="{Binding Percentage}" Margin="5,0,0,0" />
</StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Width="360">
- <CheckBox Content="Use system default player" IsChecked="{Binding UseSystemDefaultPlayer}" />
- <Button Content="Play" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10,0,0,0"
+ <StackPanel Orientation="Horizontal" Margin="10,10,0,10" Width="360">
+ <CheckBox Content="Use system default player" VerticalAlignment="Center" IsChecked="{Binding UseSystemDefaultPlayer}" />
+ <Button Content="Play" HorizontalAlignment="Right" IsDefault="True" VerticalAlignment="Center" Padding="8,2" Margin="10,0,0,0"
cal:Message.Attach="[Event Click] = [Action Play]" />
</StackPanel>
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/TitleSpecificView.xaml b/win/CS/HandBrakeWPF/Views/TitleSpecificView.xaml index 4cb13468b..5f4c15c58 100644 --- a/win/CS/HandBrakeWPF/Views/TitleSpecificView.xaml +++ b/win/CS/HandBrakeWPF/Views/TitleSpecificView.xaml @@ -5,22 +5,32 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:NumericUpDown="clr-namespace:EagleBoost.Wpf.Presentation.Controls.NumericUpDown;assembly=EagleBoost.Wpf.Presentation"
xmlns:cal="http://www.caliburnproject.org" mc:Ignorable="d" Title="Scan Title"
- Width="210" Height="130"
+ Width="250" SizeToContent="Height"
+ Background="#FFF1F0EF"
>
- <Grid Margin="10">
+ <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
-
- <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="0,10,0,10">
- <TextBlock Text="Scan title number:" />
+
+ <!-- Header -->
+ <StackPanel Orientation="Horizontal" Grid.Row="0" Background="White" Height="30" Margin="0,0,0,10" >
+ <Image Source="Images/Movies.png" Margin="10,0,5,0" Width="24" Height="24" VerticalAlignment="Center" />
+ <StackPanel Orientation="Vertical" VerticalAlignment="Center">
+ <TextBlock Text="Title Specific Scan" FontWeight="Bold" />
+ </StackPanel>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="10,10,0,10">
+ <TextBlock Text="Choose a title to scan:" />
<NumericUpDown:NumericUpDown Value="{Binding SelectedTitle, Mode=TwoWay}" Minimum="0" Maximum="1000" Width="60" Margin="10,0,0,0" />
</StackPanel>
- <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right">
- <Button Name="Cancel" Content="Cancel" cal:Message.Attach="[Event Click] = [Action Cancel]" Margin="0,0,10,0" />
- <Button Name="OpenTitle" Content="Open Title" cal:Message.Attach="[Event Click] = [Action Open]" />
+ <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Right" Margin="0,0,0,10">
+ <Button Name="Cancel" IsCancel="True" Content="Cancel" cal:Message.Attach="[Event Click] = [Action Cancel]" Padding="8,1" Margin="0,0,10,0" />
+ <Button Name="OpenTitle" IsDefault="True" Content="Open Title" cal:Message.Attach="[Event Click] = [Action Open]" Padding="8,1" Margin="0,0,10,0" />
</StackPanel>
</Grid>
|