diff options
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs | 7 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs | 10 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 72 |
4 files changed, 55 insertions, 39 deletions
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 504d7760d..351b6da15 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -81,6 +81,9 @@ <Reference Include="Caliburn.Micro">
<HintPath>..\libraries\caliburn\Caliburn.Micro.dll</HintPath>
</Reference>
+ <Reference Include="Caliburn.Micro.Platform">
+ <HintPath>..\libraries\caliburn\Caliburn.Micro.Platform.dll</HintPath>
+ </Reference>
<Reference Include="GongSolutions.Wpf.DragDrop">
<HintPath>..\libraries\WPFDragDrop\GongSolutions.Wpf.DragDrop.dll</HintPath>
</Reference>
@@ -106,7 +109,7 @@ <Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Windows.Forms" />
- <Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\libraries\caliburn\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs index 8e43dc4bb..06d05e739 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs @@ -21,7 +21,12 @@ namespace HandBrakeWPF.Services.Presets.Model /// <summary>
/// A Preset for encoding with.
/// </summary>
- public class Preset : PropertyChangedBase
+ /// <remarks>
+ /// Using App Services PropertyChangedBase because Caliburn Micro has [DataContract] on their base class which causes json.net not to serialise properties without [DataContract]
+ /// https://github.com/Caliburn-Micro/Caliburn.Micro/issues/89
+ /// https://github.com/Caliburn-Micro/Caliburn.Micro/issues/96
+ /// </remarks>
+ public class Preset : HandBrake.ApplicationServices.Utilities.PropertyChangedBase // Delibery not
{
#region Constants and Fields
diff --git a/win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs index 5d9b0daf5..2be728b58 100644 --- a/win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs +++ b/win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs @@ -34,11 +34,19 @@ namespace HandBrakeWPF.Startup /// <summary>
/// The Castle Bootstrapper
/// </summary>
- public class AppBootstrapper : Bootstrapper<IShellViewModel>
+ public class AppBootstrapper : BootstrapperBase
{
private SimpleContainer container;
/// <summary>
+ /// Initializes a new instance of the <see cref="AppBootstrapper"/> class.
+ /// </summary>
+ public AppBootstrapper()
+ {
+ this.Initialize();
+ }
+
+ /// <summary>
/// Configure Castle Windsor
/// </summary>
protected override void Configure()
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 13c1ccd8b..1487e46e1 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -3,13 +3,13 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
- xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:commands="clr-namespace:HandBrakeWPF.Commands"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
+ xmlns:cal="http://www.caliburnproject.org"
AllowDrop="True"
FontSize="11"
- Micro:Message.Attach="[Event Loaded] = [Action Load]"
+ cal:Message.Attach="[Event Loaded] = [Action Load]"
SnapsToDevicePixels="True"
UseLayoutRounding="True"
>
@@ -72,24 +72,24 @@ VerticalAlignment="Top"
>
<MenuItem Header="_File">
- <MenuItem Header="Choose Source" Micro:Message.Attach="[Event Click] = [Action SelectSourceWindow]" InputGestureText="Alt + O" />
+ <MenuItem Header="Choose Source" cal:Message.Attach="[Event Click] = [Action SelectSourceWindow]" InputGestureText="Alt + O" />
<Separator />
- <MenuItem Header="_Exit" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" InputGestureText="Alt + F4" />
+ <MenuItem Header="_Exit" cal:Message.Attach="[Event Click] = [Action ExitApplication]" InputGestureText="Alt + F4" />
</MenuItem>
<MenuItem Header="_Tools">
- <MenuItem Header="_Show Queue" Micro:Message.Attach="[Event Click] = [Action OpenQueueWindow]" InputGestureText="Ctrl + Q">
+ <MenuItem Header="_Show Queue" cal:Message.Attach="[Event Click] = [Action OpenQueueWindow]" InputGestureText="Ctrl + Q">
<MenuItem.Icon>
<Image Width="16" Source="Images/Queue_Small.png" />
</MenuItem.Icon>
</MenuItem>
- <MenuItem Header="_Activity Log" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]" InputGestureText="Ctrl + L">
+ <MenuItem Header="_Activity Log" cal:Message.Attach="[Event Click] = [Action OpenLogWindow]" InputGestureText="Ctrl + L">
<MenuItem.Icon>
<Image Width="16" Source="Images/Output_Small.png" />
</MenuItem.Icon>
</MenuItem>
<Separator />
- <MenuItem Header="_Options" Micro:Message.Attach="[Event Click] = [Action OpenOptionsWindow]">
+ <MenuItem Header="_Options" cal:Message.Attach="[Event Click] = [Action OpenOptionsWindow]">
<MenuItem.Icon>
<Image Width="16" Source="Images/Pref_Small.png" />
</MenuItem.Icon>
@@ -102,8 +102,8 @@ <MenuItem.ItemContainerStyle>
<Style TargetType="MenuItem">
<Setter Property="Tag" Value="{Binding}" />
- <Setter Property="Micro:Action.TargetWithoutContext" Value="{Binding DataContext, ElementName=presetMenu}"/>
- <Setter Property="Micro:Message.Attach" Value="[Event Click] = [Action PresetSelect($this.Tag)]"/>
+ <Setter Property="cal:Action.TargetWithoutContext" Value="{Binding DataContext, ElementName=presetMenu}"/>
+ <Setter Property="cal:Message.Attach" Value="[Event Click] = [Action PresetSelect($this.Tag)]"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsDefault}" Value="True">
<Setter Property="FontStyle" Value="Italic" />
@@ -113,11 +113,11 @@ </MenuItem.ItemContainerStyle>
</MenuItem>
<Separator />
- <MenuItem Header="_Import" Micro:Message.Attach="[Event Click] = [Action PresetImport]" />
- <MenuItem Header="_Export" Micro:Message.Attach="[Event Click] = [Action PresetExport]" />
+ <MenuItem Header="_Import" cal:Message.Attach="[Event Click] = [Action PresetImport]" />
+ <MenuItem Header="_Export" cal:Message.Attach="[Event Click] = [Action PresetExport]" />
<Separator />
- <MenuItem Header="_Set Current as Default" Micro:Message.Attach="[Event Click] = [Action PresetSetDefault]" />
- <MenuItem Header="_Reset Built-In Presets" Micro:Message.Attach="[Event Click] = [Action PresetReset]" />
+ <MenuItem Header="_Set Current as Default" cal:Message.Attach="[Event Click] = [Action PresetSetDefault]" />
+ <MenuItem Header="_Reset Built-In Presets" cal:Message.Attach="[Event Click] = [Action PresetReset]" />
<Separator />
<MenuItem IsCheckable="True" x:Name="showPresetPanelMenuItem" IsChecked="{Binding IsPresetPanelShowing}"
Header="S_how Preset Panel">
@@ -125,15 +125,15 @@ </MenuItem>
<MenuItem Header="_Help">
- <MenuItem Header="_HandBrake User Guide (HTTP)" Micro:Message.Attach="[Event Click] = [Action LaunchHelp]" InputGestureText="F1">
+ <MenuItem Header="_HandBrake User Guide (HTTP)" cal:Message.Attach="[Event Click] = [Action LaunchHelp]" InputGestureText="F1">
<MenuItem.Icon>
<Image Width="16" Height="16" Source="Images/information.png" />
</MenuItem.Icon>
</MenuItem>
<Separator />
- <MenuItem Header="_Check for Updates" Micro:Message.Attach="[Event Click] = [Action CheckForUpdates]" />
+ <MenuItem Header="_Check for Updates" cal:Message.Attach="[Event Click] = [Action CheckForUpdates]" />
<Separator />
- <MenuItem Header="_About..." Micro:Message.Attach="[Event Click] = [Action OpenAboutApplication]" />
+ <MenuItem Header="_About..." cal:Message.Attach="[Event Click] = [Action OpenAboutApplication]" />
</MenuItem>
</Menu>
@@ -148,7 +148,7 @@ >
<Button Name="SelectSource" x:Uid="Choose Source" AutomationProperties.Name="Choose Source"
- Micro:Message.Attach="[Event Click] = [Action SelectSourceWindow]">
+ cal:Message.Attach="[Event Click] = [Action SelectSourceWindow]">
<StackPanel Orientation="Horizontal">
<Image Width="32"
Height="32"
@@ -164,7 +164,7 @@ <Separator />
<Button Name="Start" AutomationProperties.Name="Start Encode"
- Micro:Message.Attach="[Event Click] = [Action StartEncode]"
+ cal:Message.Attach="[Event Click] = [Action StartEncode]"
Visibility="{Binding IsEncoding,
Converter={StaticResource boolToVisConverter},
ConverterParameter=true}"
@@ -182,7 +182,7 @@ </Button>
<Button Name="Stop" AutomationProperties.Name="Stop Encode"
- Micro:Message.Attach="[Event Click] = [Action StopEncode]"
+ cal:Message.Attach="[Event Click] = [Action StopEncode]"
Visibility="{Binding IsEncoding,
Converter={StaticResource boolToVisConverter},
ConverterParameter=false}"
@@ -201,7 +201,7 @@ </Button>
<Button Name="Pause" AutomationProperties.Name="Pause"
- Micro:Message.Attach="[Event Click] = [Action PauseEncode]"
+ cal:Message.Attach="[Event Click] = [Action PauseEncode]"
Visibility="{Binding CanPause,
Converter={StaticResource boolToVisConverter},
ConverterParameter=false}"
@@ -229,7 +229,7 @@ HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
Background="Transparent"
- Micro:Message.Attach="[Event Click] = [Action AddToQueue]"
+ cal:Message.Attach="[Event Click] = [Action AddToQueue]"
>
<StackPanel Orientation="Horizontal">
<Image Width="32"
@@ -272,12 +272,12 @@ />
</StackPanel>
</MenuItem.Header>
- <MenuItem Header="Add All" Micro:Message.Attach="[Event Click] = [Action AddAllToQueue]" AutomationProperties.Name="Add all to Queue" />
- <MenuItem Header="Add Selection" Micro:Message.Attach="[Event Click] = [Action AddSelectionToQueue]" AutomationProperties.Name="Add Selection to Queue" />
+ <MenuItem Header="Add All" cal:Message.Attach="[Event Click] = [Action AddAllToQueue]" AutomationProperties.Name="Add all to Queue" />
+ <MenuItem Header="Add Selection" cal:Message.Attach="[Event Click] = [Action AddSelectionToQueue]" AutomationProperties.Name="Add Selection to Queue" />
</MenuItem>
</Menu>
- <Button Name="ShowQueue" AutomationProperties.Name="Show Queue" Micro:Message.Attach="[Event Click] = [Action OpenQueueWindow]">
+ <Button Name="ShowQueue" AutomationProperties.Name="Show Queue" cal:Message.Attach="[Event Click] = [Action OpenQueueWindow]">
<StackPanel Orientation="Horizontal">
<Image Width="32"
Height="32"
@@ -293,7 +293,7 @@ <Separator />
- <Button Name="Preview" AutomationProperties.Name="Preview Encode" Micro:Message.Attach="[Event Click] = [Action OpenPreviewWindow]" >
+ <Button Name="Preview" AutomationProperties.Name="Preview Encode" cal:Message.Attach="[Event Click] = [Action OpenPreviewWindow]" >
<StackPanel Orientation="Horizontal">
<Image Width="32"
Height="32"
@@ -307,7 +307,7 @@ </StackPanel>
</Button>
- <Button Name="ActivityWindow" AutomationProperties.Name="Activity Window" Micro:Message.Attach="[Event Click] = [Action OpenLogWindow]">
+ <Button Name="ActivityWindow" AutomationProperties.Name="Activity Window" cal:Message.Attach="[Event Click] = [Action OpenLogWindow]">
<StackPanel Orientation="Horizontal">
<Image Width="32"
Height="32"
@@ -429,7 +429,7 @@ >
<TextBox.ContextMenu>
<ContextMenu>
- <MenuItem Header="Open this Directory" Micro:Message.Attach="[Event Click] = [Action OpenDestinationDirectory]" />
+ <MenuItem Header="Open this Directory" cal:Message.Attach="[Event Click] = [Action OpenDestinationDirectory]" />
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>
@@ -437,7 +437,7 @@ Grid.Column="2"
Margin="8,0,0,0" FontWeight="Bold"
Content="Browse"
- Micro:Message.Attach="[Event Click] = [Action BrowseDestination]"
+ cal:Message.Attach="[Event Click] = [Action BrowseDestination]"
/>
</Grid>
</StackPanel>
@@ -553,7 +553,7 @@ <commands:InputBindingTrigger.InputBinding>
<KeyBinding Key="Delete"/>
</commands:InputBindingTrigger.InputBinding>
- <Micro:ActionMessage MethodName="PresetRemove" />
+ <cal:ActionMessage MethodName="PresetRemove" />
</commands:InputBindingTrigger>
</i:Interaction.Triggers>
@@ -581,7 +581,7 @@ Loaded="ToolBarLoaded"
KeyboardNavigation.TabNavigation="Continue"
>
- <Button Micro:Message.Attach="[Event Click] = [Action PresetAdd]" AutomationProperties.Name="Add Preset">
+ <Button cal:Message.Attach="[Event Click] = [Action PresetAdd]" AutomationProperties.Name="Add Preset">
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Width="20"
@@ -596,7 +596,7 @@ </StackPanel>
</Button.Content>
</Button>
- <Button Micro:Message.Attach="[Event Click] = [Action PresetRemove]" AutomationProperties.Name="Remove Preset">
+ <Button cal:Message.Attach="[Event Click] = [Action PresetRemove]" AutomationProperties.Name="Remove Preset">
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Width="20"
@@ -628,14 +628,14 @@ />
</StackPanel>
</MenuItem.Header>
- <MenuItem Header="{x:Static Properties:ResourcesUI.MainView_SetDefault}" Micro:Message.Attach="[Event Click] = [Action PresetSetDefault]" />
+ <MenuItem Header="{x:Static Properties:ResourcesUI.MainView_SetDefault}" cal:Message.Attach="[Event Click] = [Action PresetSetDefault]" />
<Separator />
- <MenuItem Header="{x:Static Properties:ResourcesUI.MainView_UpdateSelectedPreset}" Micro:Message.Attach="[Event Click] = [Action PresetUpdate]" />
+ <MenuItem Header="{x:Static Properties:ResourcesUI.MainView_UpdateSelectedPreset}" cal:Message.Attach="[Event Click] = [Action PresetUpdate]" />
<Separator />
- <MenuItem Header="{x:Static Properties:ResourcesUI.Generic_Import}" Micro:Message.Attach="[Event Click] = [Action PresetImport]" />
- <MenuItem Header="{x:Static Properties:ResourcesUI.Generic_Export}" Micro:Message.Attach="[Event Click] = [Action PresetExport]" />
+ <MenuItem Header="{x:Static Properties:ResourcesUI.Generic_Import}" cal:Message.Attach="[Event Click] = [Action PresetImport]" />
+ <MenuItem Header="{x:Static Properties:ResourcesUI.Generic_Export}" cal:Message.Attach="[Event Click] = [Action PresetExport]" />
<Separator />
- <MenuItem Header="{x:Static Properties:ResourcesUI.MainView_ResetBuiltInPresets}" Micro:Message.Attach="[Event Click] = [Action PresetReset]" />
+ <MenuItem Header="{x:Static Properties:ResourcesUI.MainView_ResetBuiltInPresets}" cal:Message.Attach="[Event Click] = [Action PresetReset]" />
</MenuItem>
</Menu>
</ToolBar>
|