diff options
Diffstat (limited to 'win/CS/HandBrakeWPF')
34 files changed, 218 insertions, 272 deletions
diff --git a/win/CS/HandBrakeWPF/App.xaml b/win/CS/HandBrakeWPF/App.xaml index a00960ad3..f0af595ce 100644 --- a/win/CS/HandBrakeWPF/App.xaml +++ b/win/CS/HandBrakeWPF/App.xaml @@ -1,11 +1,11 @@ <Application x:Class="HandBrakeWPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:HandBrakeWPF.Services">
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:HandBrakeWPF.Startup">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary>
- <local:MefBootstrapper x:Key="bootstrapper" />
+ <local:CastleBootstrapper x:Key="bootstrapper" />
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
diff --git a/win/CS/HandBrakeWPF/App.xaml.cs b/win/CS/HandBrakeWPF/App.xaml.cs index 8b47a6291..e934546cf 100644 --- a/win/CS/HandBrakeWPF/App.xaml.cs +++ b/win/CS/HandBrakeWPF/App.xaml.cs @@ -10,13 +10,6 @@ namespace HandBrakeWPF /// </summary>
public partial class App
{
- /*
- * TODO:
- * - Setup Castle Windsor support for services.
- *
- *
- */
-
/// <summary>
/// Initializes a new instance of the <see cref="App"/> class.
/// </summary>
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 65b497534..b0c4119c7 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -36,26 +36,8 @@ <WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Caliburn.Core">
- <HintPath>..\libraries\caliburn\Caliburn.Core.dll</HintPath>
- </Reference>
- <Reference Include="Caliburn.DynamicProxy">
- <HintPath>..\libraries\caliburn\Caliburn.DynamicProxy.dll</HintPath>
- </Reference>
- <Reference Include="Caliburn.FluentValidation">
- <HintPath>..\libraries\caliburn\Caliburn.FluentValidation.dll</HintPath>
- </Reference>
- <Reference Include="Caliburn.MEF">
- <HintPath>..\libraries\caliburn\Caliburn.MEF.dll</HintPath>
- </Reference>
- <Reference Include="Caliburn.PresentationFramework">
- <HintPath>..\libraries\caliburn\Caliburn.PresentationFramework.dll</HintPath>
- </Reference>
- <Reference Include="Caliburn.ShellFramework">
- <HintPath>..\libraries\caliburn\Caliburn.ShellFramework.dll</HintPath>
- </Reference>
- <Reference Include="Caliburn.Windsor">
- <HintPath>..\libraries\caliburn\Caliburn.Windsor.dll</HintPath>
+ <Reference Include="Caliburn.Micro">
+ <HintPath>..\libraries\caliburn\Caliburn.Micro.dll</HintPath>
</Reference>
<Reference Include="Castle.Core">
<HintPath>..\libraries\caliburn\Castle.Core.dll</HintPath>
@@ -66,32 +48,17 @@ <Reference Include="Common.Logging">
<HintPath>..\libraries\caliburn\Common.Logging.dll</HintPath>
</Reference>
- <Reference Include="FluentValidation">
- <HintPath>..\libraries\caliburn\FluentValidation.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Practices.Composite">
- <HintPath>..\libraries\caliburn\Microsoft.Practices.Composite.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Practices.Composite.Presentation">
- <HintPath>..\libraries\caliburn\Microsoft.Practices.Composite.Presentation.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
- <Reference Include="System.CoreEx">
- <HintPath>..\libraries\caliburn\System.CoreEx.dll</HintPath>
- </Reference>
+ <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
- <Reference Include="System.Interactive">
- <HintPath>..\libraries\caliburn\System.Interactive.dll</HintPath>
- </Reference>
- <Reference Include="System.Reactive">
- <HintPath>..\libraries\caliburn\System.Reactive.dll</HintPath>
+ <Reference Include="System.Windows.Interactivity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\libraries\caliburn\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
@@ -107,7 +74,8 @@ <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
- <Compile Include="Services\MefBootstrapper.cs" />
+ <Compile Include="Startup\CastleBootstrapper.cs" />
+ <Compile Include="Startup\MefBootstrapper.cs" />
<Compile Include="ViewModels\AboutViewModel.cs" />
<Compile Include="ViewModels\AddPresetViewModel.cs" />
<Compile Include="ViewModels\Interfaces\IMainViewModel.cs" />
@@ -181,6 +149,7 @@ <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
+ <None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -245,9 +214,7 @@ <Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
- <ItemGroup>
- <Folder Include="Model\" />
- </ItemGroup>
+ <ItemGroup />
<ItemGroup>
<Resource Include="Views\Images\ActivityWindow.png" />
</ItemGroup>
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index b9eb47749..1a2ffcc81 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -1,17 +1,17 @@ //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:4.0.30319.1
+// Runtime Version:4.0.30319.468
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace HandBrakeWPF.Properties
-{
-
-
+namespace HandBrakeWPF.Properties {
+ using System;
+
+
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@@ -22,48 +22,40 @@ namespace HandBrakeWPF.Properties [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
+ internal class Resources {
+
private static global::System.Resources.ResourceManager resourceMan;
-
+
private static global::System.Globalization.CultureInfo resourceCulture;
-
+
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
+ internal Resources() {
}
-
+
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HandBrakeWPF.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
return resourceCulture;
}
- set
- {
+ set {
resourceCulture = value;
}
}
diff --git a/win/CS/HandBrakeWPF/Properties/Settings.Designer.cs b/win/CS/HandBrakeWPF/Properties/Settings.Designer.cs index ae1b86547..f0eac0f2b 100644 --- a/win/CS/HandBrakeWPF/Properties/Settings.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Settings.Designer.cs @@ -1,28 +1,24 @@ //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:4.0.30319.1
+// Runtime Version:4.0.30319.468
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace HandBrakeWPF.Properties
-{
-
-
+namespace HandBrakeWPF.Properties {
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
+
+ public static Settings Default {
+ get {
return defaultInstance;
}
}
diff --git a/win/CS/HandBrakeWPF/Services/MefBootstrapper.cs b/win/CS/HandBrakeWPF/Services/MefBootstrapper.cs deleted file mode 100644 index bd05356c0..000000000 --- a/win/CS/HandBrakeWPF/Services/MefBootstrapper.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace HandBrakeWPF.Services
-{
- using System.ComponentModel.Composition.Hosting;
- using System.Linq;
-
- using Caliburn.Core.InversionOfControl;
- using Caliburn.MEF;
- using Caliburn.PresentationFramework.ApplicationModel;
-
- using HandBrakeWPF.ViewModels.Interfaces;
-
- public class MefBootstrapper : Bootstrapper<IMainViewModel>
- {
- protected override IServiceLocator CreateContainer()
- {
- var container = new CompositionContainer(new AggregateCatalog(SelectAssemblies().Select(x => new AssemblyCatalog(x))));
-
- return new MEFAdapter(container);
- }
- }
-}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs new file mode 100644 index 000000000..22811d348 --- /dev/null +++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs @@ -0,0 +1,63 @@ +namespace HandBrakeWPF.Startup
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Reflection;
+
+ using Caliburn.Micro;
+
+ using Castle.Core;
+ using Castle.MicroKernel.Registration;
+ using Castle.Windsor;
+
+ using HandBrakeWPF.ViewModels;
+ using HandBrakeWPF.ViewModels.Interfaces;
+
+ /// <summary>
+ /// The Castle Bootstrapper
+ /// </summary>
+ public class CastleBootstrapper : Bootstrapper<IMainViewModel>
+ {
+ /// <summary>
+ /// The Windsor Container
+ /// </summary>
+ private IWindsorContainer windsorContainer;
+
+ /// <summary>
+ /// Configure Castle Windsor
+ /// </summary>
+ protected override void Configure()
+ {
+ this.windsorContainer = new WindsorContainer();
+ this.windsorContainer.Register(Component.For<IWindowManager>().ImplementedBy<WindowManager>());
+ this.windsorContainer.Register(Component.For<IEventAggregator>().ImplementedBy<EventAggregator>());
+
+ // Shell
+ this.windsorContainer.Register(Component.For<IMainViewModel>().ImplementedBy<MainViewModel>().LifeStyle.Is(LifestyleType.Singleton));
+ }
+
+ protected override IEnumerable<Assembly> SelectAssemblies()
+ {
+ return AppDomain.CurrentDomain.GetAssemblies();
+ }
+
+ protected override object GetInstance(Type service, string key)
+ {
+ return string.IsNullOrWhiteSpace(key) ? this.windsorContainer.Resolve(service) : this.windsorContainer.Resolve(key, new { });
+ }
+
+ protected override IEnumerable<object> GetAllInstances(Type service)
+ {
+ return this.windsorContainer.ResolveAll(service).Cast<object>();
+ }
+
+ protected override void BuildUp(object instance)
+ {
+ instance.GetType().GetProperties()
+ .Where(property => property.CanWrite && property.PropertyType.IsPublic)
+ .Where(property => this.windsorContainer.Kernel.HasComponent(property.PropertyType))
+ .ForEach(property => property.SetValue(instance, this.windsorContainer.Resolve(property.PropertyType), null));
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs new file mode 100644 index 000000000..c03d4baf9 --- /dev/null +++ b/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs @@ -0,0 +1,53 @@ +namespace HandBrakeWPF.Startup
+{
+ using System;
+ using System.Collections.Generic;
+ using System.ComponentModel.Composition;
+ using System.ComponentModel.Composition.Hosting;
+ using System.Linq;
+
+ using Caliburn.Micro;
+
+ using HandBrakeWPF.ViewModels.Interfaces;
+
+ public class MefBootstrapper : Bootstrapper<IMainViewModel>
+ {
+ private CompositionContainer container;
+
+ protected override void Configure()
+ {
+ container = new CompositionContainer(
+ new AggregateCatalog(AssemblySource.Instance.Select(x => new AssemblyCatalog(x)))
+ );
+
+ var batch = new CompositionBatch();
+
+ batch.AddExportedValue<IWindowManager>(new WindowManager());
+ batch.AddExportedValue<IEventAggregator>(new EventAggregator());
+ batch.AddExportedValue(container);
+
+ container.Compose(batch);
+ }
+
+ protected override object GetInstance(Type serviceType, string key)
+ {
+ string contract = string.IsNullOrEmpty(key) ? AttributedModelServices.GetContractName(serviceType) : key;
+ var exports = container.GetExportedValues<object>(contract);
+
+ if (exports.Count() > 0)
+ return exports.First();
+
+ throw new Exception(string.Format("Could not locate any instances of contract {0}.", contract));
+ }
+
+ protected override IEnumerable<object> GetAllInstances(Type serviceType)
+ {
+ return container.GetExportedValues<object>(AttributedModelServices.GetContractName(serviceType));
+ }
+
+ protected override void BuildUp(object instance)
+ {
+ container.SatisfyImportsOnce(instance);
+ }
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs index aeb0ee822..aff760ad7 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs @@ -5,7 +5,7 @@ namespace HandBrakeWPF.ViewModels
{
- using Caliburn.PresentationFramework.ApplicationModel;
+ using Caliburn.Micro;
/// <summary>
/// The About View Model
@@ -15,6 +15,5 @@ namespace HandBrakeWPF.ViewModels public AboutViewModel(IWindowManager windowManager) : base(windowManager)
{
}
-
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs index 6a44bb1a5..0c9373b57 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs @@ -5,7 +5,7 @@ namespace HandBrakeWPF.ViewModels
{
- using Caliburn.PresentationFramework.ApplicationModel;
+ using Caliburn.Micro;
/// <summary>
/// The Add Preset View Model
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index dc8a62a48..f833695c6 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -12,7 +12,7 @@ namespace HandBrakeWPF.ViewModels using System.IO;
using System.Windows;
- using Caliburn.PresentationFramework.ApplicationModel;
+ using Caliburn.Micro;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Parsing;
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 6d634bbbb..5979cdf60 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -5,7 +5,7 @@ namespace HandBrakeWPF.ViewModels
{
- using Caliburn.PresentationFramework.ApplicationModel;
+ using Caliburn.Micro;
/// <summary>
/// The Options View Model
diff --git a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs index b41fd69f5..a72d0d665 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs @@ -5,7 +5,7 @@ namespace HandBrakeWPF.ViewModels
{
- using Caliburn.PresentationFramework.ApplicationModel;
+ using Caliburn.Micro;
/// <summary>
/// The About View Model
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 07f3f486f..e74722792 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -5,7 +5,7 @@ namespace HandBrakeWPF.ViewModels
{
- using Caliburn.PresentationFramework.ApplicationModel;
+ using Caliburn.Micro;
/// <summary>
/// The Preview View Model
diff --git a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs index b946d7c7e..29379938a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs @@ -1,7 +1,6 @@ namespace HandBrakeWPF.ViewModels
{
- using Caliburn.PresentationFramework.ApplicationModel;
- using Caliburn.PresentationFramework.Screens;
+ using Caliburn.Micro;
/// <summary>
/// A Base Class for the View Models which contains reusable code.
diff --git a/win/CS/HandBrakeWPF/Views/AboutView.xaml b/win/CS/HandBrakeWPF/Views/AboutView.xaml index 7316ab49a..ce52f61a5 100644 --- a/win/CS/HandBrakeWPF/Views/AboutView.xaml +++ b/win/CS/HandBrakeWPF/Views/AboutView.xaml @@ -1,6 +1,6 @@ <Window x:Class="HandBrakeWPF.Views.AboutView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:PresentationFramework="clr-namespace:Caliburn.PresentationFramework;assembly=Caliburn.PresentationFramework" xmlns:RoutedMessaging="clr-namespace:Caliburn.PresentationFramework.RoutedMessaging;assembly=Caliburn.PresentationFramework" Title="AboutView" Height="268" Width="511">
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" Title="AboutView" Height="268" Width="511">
<StackPanel Orientation="Horizontal">
<Image Source="Images/logo64.png" Width="64" Height="64" SnapsToDevicePixels="True" Margin="10,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Top" />
@@ -18,7 +18,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
</TextBox>
- <Button Content="OK" RoutedMessaging:Message.Attach="[Event Click] = [Action Close]"
+ <Button Content="OK" Micro:Message.Attach="[Event Click] = [Action Close]"
HorizontalAlignment="Right" Padding="10,2" Margin="0,0,10,10" />
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml b/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml index 3adb82821..9b2010852 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml +++ b/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.AdvancedView"
+<UserControl x:Class="HandBrakeWPF.Views.Controls.AdvancedView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml.cs index b7ad6ef86..247100750 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/Controls/AdvancedView.xaml.cs @@ -1,19 +1,7 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace HandBrakeWPF.Views
+namespace HandBrakeWPF.Views.Controls
{
+ using System.Windows.Controls;
+
/// <summary>
/// Interaction logic for AdvancedView.xaml
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml b/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml index 6087c7d07..0ec8c866c 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml +++ b/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.AudioView"
+<UserControl x:Class="HandBrakeWPF.Views.Controls.AudioView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml.cs index 3518eea56..ad4bb96c8 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/Controls/AudioView.xaml.cs @@ -1,19 +1,7 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace HandBrakeWPF.Views
+namespace HandBrakeWPF.Views.Controls
{
+ using System.Windows.Controls;
+
/// <summary>
/// Interaction logic for AudioView.xaml
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml b/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml index ac39a7062..982142385 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml +++ b/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.ChaptersView"
+<UserControl x:Class="HandBrakeWPF.Views.Controls.ChaptersView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml.cs index f61b201c9..4bb0e2d1f 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/Controls/ChaptersView.xaml.cs @@ -1,19 +1,7 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace HandBrakeWPF.Views
+namespace HandBrakeWPF.Views.Controls
{
+ using System.Windows.Controls;
+
/// <summary>
/// Interaction logic for ChaptersView.xaml
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/Controls/FiltersView.xaml index 6ac8f5a10..7729dc553 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/FiltersView.xaml +++ b/win/CS/HandBrakeWPF/Views/Controls/FiltersView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.FiltersView"
+<UserControl x:Class="HandBrakeWPF.Views.Controls.FiltersView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/win/CS/HandBrakeWPF/Views/Controls/FiltersView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/FiltersView.xaml.cs index 27f38be95..a8b26716a 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/FiltersView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/Controls/FiltersView.xaml.cs @@ -1,19 +1,7 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace HandBrakeWPF.Views
+namespace HandBrakeWPF.Views.Controls
{
+ using System.Windows.Controls;
+
/// <summary>
/// Interaction logic for VideoFilters.xaml
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml index 80b82c52f..f39f61528 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml +++ b/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.PictureSettingsView"
+<UserControl x:Class="HandBrakeWPF.Views.Controls.PictureSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml.cs index 9401168dc..c86e0f8e0 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/Controls/PictureSettingsView.xaml.cs @@ -1,19 +1,7 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace HandBrakeWPF.Views
+namespace HandBrakeWPF.Views.Controls
{
+ using System.Windows.Controls;
+
/// <summary>
/// Interaction logic for PictureSettingsView.xaml
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/QueryEditorView.xaml b/win/CS/HandBrakeWPF/Views/Controls/QueryEditorView.xaml index 694dcd8df..86d19f5ff 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/QueryEditorView.xaml +++ b/win/CS/HandBrakeWPF/Views/Controls/QueryEditorView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.QueryEditorView"
+<UserControl x:Class="HandBrakeWPF.Views.Controls.QueryEditorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/win/CS/HandBrakeWPF/Views/Controls/QueryEditorView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/QueryEditorView.xaml.cs index d67b7eb5c..6b1735815 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/QueryEditorView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/Controls/QueryEditorView.xaml.cs @@ -1,19 +1,7 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace HandBrakeWPF.Views
+namespace HandBrakeWPF.Views.Controls
{
+ using System.Windows.Controls;
+
/// <summary>
/// Interaction logic for QueryEditorView.xaml
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml index 4594f62b5..842807931 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.SubtitlesView"
+<UserControl x:Class="HandBrakeWPF.Views.Controls.SubtitlesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs index 589462c40..539ae5793 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/Controls/SubtitlesView.xaml.cs @@ -1,19 +1,7 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace HandBrakeWPF.Views
+namespace HandBrakeWPF.Views.Controls
{
+ using System.Windows.Controls;
+
/// <summary>
/// Interaction logic for SubtitlesView.xaml
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Views/Controls/VideoView.xaml b/win/CS/HandBrakeWPF/Views/Controls/VideoView.xaml index 72ab1f67c..d1b22c15b 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/VideoView.xaml +++ b/win/CS/HandBrakeWPF/Views/Controls/VideoView.xaml @@ -1,4 +1,4 @@ -<UserControl x:Class="HandBrakeWPF.Views.VideoView"
+<UserControl x:Class="HandBrakeWPF.Views.Controls.VideoView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/win/CS/HandBrakeWPF/Views/Controls/VideoView.xaml.cs b/win/CS/HandBrakeWPF/Views/Controls/VideoView.xaml.cs index f59435f02..12f96979d 100644 --- a/win/CS/HandBrakeWPF/Views/Controls/VideoView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/Controls/VideoView.xaml.cs @@ -1,19 +1,7 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace HandBrakeWPF.Views
+namespace HandBrakeWPF.Views.Controls
{
+ using System.Windows.Controls;
+
/// <summary>
/// Interaction logic for VideoView.xaml
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 496afc4ee..999f73c84 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -1,9 +1,7 @@ <Window x:Class="HandBrakeWPF.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Views="clr-namespace:HandBrakeWPF.Views"
- xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
- xmlns:RoutedMessaging="clr-namespace:Caliburn.PresentationFramework.RoutedMessaging;assembly=Caliburn.PresentationFramework"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
+ xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" xmlns:Controls="clr-namespace:HandBrakeWPF.Views.Controls"
Title="{Data:Binding Path=WindowTitle}" Height="655" Width="1015" FontSize="11">
<Grid>
@@ -14,30 +12,30 @@ <Menu Height="23" VerticalAlignment="Top" HorizontalAlignment="Stretch">
<MenuItem Header="File">
<MenuItem Header="Cancel Scan" />
- <MenuItem Header="Exit" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Exit" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
</MenuItem>
<MenuItem Header="Tools">
- <MenuItem Header="Show Queue" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
- <MenuItem Header="Activity Window" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Show Queue" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Activity Window" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
</MenuItem>
<MenuItem Header="Presets">
- <MenuItem Header="Reset Built-in Presets" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
- <MenuItem Header="Delete Built-in Presets" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Reset Built-in Presets" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Delete Built-in Presets" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
<Separator />
- <MenuItem Header="Save As New Preset" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
- <MenuItem Header="Import" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
- <MenuItem Header="Export" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
- <MenuItem Header="Set as Default" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Save As New Preset" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Import" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Export" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Set as Default" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
</MenuItem>
<MenuItem Header="Help">
- <MenuItem Header="HandBrake User Guide" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="HandBrake User Guide" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
<Separator />
- <MenuItem Header="Check for Updates" RoutedMessaging:Message.Attach="[Event Click] = [Action ExitApplication]" />
+ <MenuItem Header="Check for Updates" Micro:Message.Attach="[Event Click] = [Action ExitApplication]" />
<Separator />
- <MenuItem Header="About..." RoutedMessaging:Message.Attach="[Event Click] = [Action AboutApplication]" />
+ <MenuItem Header="About..." Micro:Message.Attach="[Event Click] = [Action AboutApplication]" />
</MenuItem>
</Menu>
@@ -144,22 +142,22 @@ <!-- Tab Control -->
<TabControl HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="725" Height="330" Margin="10,10,10,10" Name="tabControl" >
<TabItem Header="Picture" Name="pictureTab">
- <Views:PictureSettingsView x:Name="pictureSettingsView"></Views:PictureSettingsView>
+ <Controls:PictureSettingsView x:Name="pictureSettingsView"></Controls:PictureSettingsView>
</TabItem>
<TabItem Header="Video Filters" Name="filtersTab">
- <Views:FiltersView></Views:FiltersView>
+ <Controls:FiltersView></Controls:FiltersView>
</TabItem>
<TabItem Header="Video" Name="videoTab">
- <Views:VideoView></Views:VideoView>
+ <Controls:VideoView></Controls:VideoView>
</TabItem>
<TabItem Header="Audio" Name="audioTab">
- <Views:AudioView></Views:AudioView>
+ <Controls:AudioView></Controls:AudioView>
</TabItem>
<TabItem Header="Chapters" Name="chaptersTab">
- <Views:ChaptersView></Views:ChaptersView>
+ <Controls:ChaptersView></Controls:ChaptersView>
</TabItem>
<TabItem Header="Advanced" Name="advancedTab">
- <Views:AdvancedView></Views:AdvancedView>
+ <Controls:AdvancedView></Controls:AdvancedView>
</TabItem>
</TabControl>
diff --git a/win/CS/HandBrakeWPF/app.config b/win/CS/HandBrakeWPF/app.config new file mode 100644 index 000000000..f76deb94f --- /dev/null +++ b/win/CS/HandBrakeWPF/app.config @@ -0,0 +1,3 @@ +<?xml version="1.0"?>
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>
|