diff options
author | sr55 <[email protected]> | 2011-10-22 21:26:28 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-10-22 21:26:28 +0000 |
commit | 4e0db6ec1bfa440ef7f142e84ad064affbd64490 (patch) | |
tree | 02cb20d37fa5bf10329cf14b1b81b0be8249a498 | |
parent | 16ab8ff2bf50476537c9755b2c1670cc25da80b6 (diff) |
WinGui: (WPF) Added backing properties for binding on the options window & some general tidy up of the code/comments.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4310 b64f7644-9d1e-0410-96f1-a4d463321fa5
23 files changed, 1523 insertions, 85 deletions
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 7eaa3b2fa..272d09ab4 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -78,6 +78,7 @@ <Compile Include="ViewModels\Interfaces\IAboutViewModel.cs" />
<Compile Include="ViewModels\Interfaces\IMainViewModel.cs" />
<Compile Include="ViewModels\Interfaces\IOptionsViewModel.cs" />
+ <Compile Include="ViewModels\Interfaces\IViewModelBase.cs" />
<Compile Include="ViewModels\PreviewViewModel.cs" />
<Compile Include="ViewModels\QueueViewModel.cs" />
<Compile Include="ViewModels\OptionsViewModel.cs" />
diff --git a/win/CS/HandBrakeWPF/Settings.StyleCop b/win/CS/HandBrakeWPF/Settings.StyleCop index 7f55ce6c6..1b0202d91 100644 --- a/win/CS/HandBrakeWPF/Settings.StyleCop +++ b/win/CS/HandBrakeWPF/Settings.StyleCop @@ -1 +1,39 @@ -<StyleCopSettings Version="4.3" />
\ No newline at end of file +<StyleCopSettings Version="105">
+ <Analyzers>
+ <Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
+ <Rules>
+ <Rule Name="FileMustHaveHeader">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustShowCopyright">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustHaveCopyrightText">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustContainFileName">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ <Rule Name="FileHeaderMustHaveSummary">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">True</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ </Rules>
+ <AnalyzerSettings />
+ </Analyzer>
+ </Analyzers>
+</StyleCopSettings>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs index 02710b161..695e0c7c1 100644 --- a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs +++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs @@ -1,4 +1,13 @@ -namespace HandBrakeWPF.Startup
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="CastleBootstrapper.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Castle Bootstrapper
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Startup
{
using System;
using System.Collections.Generic;
@@ -43,21 +52,54 @@ this.windsorContainer.Register(Component.For<IMainViewModel>().ImplementedBy<MainViewModel>().LifeStyle.Is(LifestyleType.Singleton));
}
+ /// <summary>
+ /// Select Assemblies
+ /// </summary>
+ /// <returns>
+ /// A List of Assembly objects
+ /// </returns>
protected override IEnumerable<Assembly> SelectAssemblies()
{
return AppDomain.CurrentDomain.GetAssemblies();
}
+ /// <summary>
+ /// Get an Instance of a service
+ /// </summary>
+ /// <param name="service">
+ /// The service.
+ /// </param>
+ /// <param name="key">
+ /// The key.
+ /// </param>
+ /// <returns>
+ /// The Service Requested
+ /// </returns>
protected override object GetInstance(Type service, string key)
{
return string.IsNullOrWhiteSpace(key) ? this.windsorContainer.Resolve(service) : this.windsorContainer.Resolve(key, new { });
}
+ /// <summary>
+ /// Get all instances of a service
+ /// </summary>
+ /// <param name="service">
+ /// The service.
+ /// </param>
+ /// <returns>
+ /// A collection of instances of the requested service type.
+ /// </returns>
protected override IEnumerable<object> GetAllInstances(Type service)
{
return this.windsorContainer.ResolveAll(service).Cast<object>();
}
+ /// <summary>
+ /// Build Up
+ /// </summary>
+ /// <param name="instance">
+ /// The instance.
+ /// </param>
protected override void BuildUp(object instance)
{
instance.GetType().GetProperties()
diff --git a/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs index c03d4baf9..730081af7 100644 --- a/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs +++ b/win/CS/HandBrakeWPF/Startup/MefBootstrapper.cs @@ -1,4 +1,13 @@ -namespace HandBrakeWPF.Startup
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="MefBootstrapper.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The MEF Bootstrapper (Not Used)
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Startup
{
using System;
using System.Collections.Generic;
@@ -10,10 +19,19 @@ using HandBrakeWPF.ViewModels.Interfaces;
+ /// <summary>
+ /// The MEF Bootstrapper (Not Used)
+ /// </summary>
public class MefBootstrapper : Bootstrapper<IMainViewModel>
{
+ /// <summary>
+ /// The Backing field for the container
+ /// </summary>
private CompositionContainer container;
+ /// <summary>
+ /// MEF Configure
+ /// </summary>
protected override void Configure()
{
container = new CompositionContainer(
@@ -29,6 +47,18 @@ container.Compose(batch);
}
+ /// <summary>
+ /// Get an Instance of a service
+ /// </summary>
+ /// <param name="serviceType">
+ /// The service.
+ /// </param>
+ /// <param name="key">
+ /// The key.
+ /// </param>
+ /// <returns>
+ /// The Service Requested
+ /// </returns>
protected override object GetInstance(Type serviceType, string key)
{
string contract = string.IsNullOrEmpty(key) ? AttributedModelServices.GetContractName(serviceType) : key;
@@ -40,11 +70,26 @@ throw new Exception(string.Format("Could not locate any instances of contract {0}.", contract));
}
+ /// <summary>
+ /// Get all instances of a service
+ /// </summary>
+ /// <param name="serviceType">
+ /// The service.
+ /// </param>
+ /// <returns>
+ /// A collection of instances of the requested service type.
+ /// </returns>
protected override IEnumerable<object> GetAllInstances(Type serviceType)
{
return container.GetExportedValues<object>(AttributedModelServices.GetContractName(serviceType));
}
+ /// <summary>
+ /// Build Up
+ /// </summary>
+ /// <param name="instance">
+ /// The instance.
+ /// </param>
protected override void BuildUp(object instance)
{
container.SatisfyImportsOnce(instance);
diff --git a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs index 759be462d..d6e5d5598 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs @@ -1,7 +1,11 @@ -/* AboutViewModel.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AboutViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The About View Model
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
@@ -9,6 +13,9 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro;
+ using HandBrake.ApplicationServices;
+ using HandBrake.ApplicationServices.Services.Interfaces;
+
using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
@@ -18,20 +25,47 @@ namespace HandBrakeWPF.ViewModels public class AboutViewModel : ViewModelBase, IAboutViewModel
{
/// <summary>
+ /// Backing Field for the User setting service.
+ /// </summary>
+ private readonly IUserSettingService userSettingService;
+
+ /// <summary>
/// Initializes a new instance of the <see cref="AboutViewModel"/> class.
/// </summary>
/// <param name="windowManager">
/// The window manager.
/// </param>
- public AboutViewModel(IWindowManager windowManager) : base(windowManager)
+ /// <param name="userSettingService">
+ /// The user Setting Service.
+ /// </param>
+ public AboutViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
+ : base(windowManager)
{
+ this.userSettingService = userSettingService;
+ }
+
+ /// <summary>
+ /// Gets Version.
+ /// </summary>
+ public string Version
+ {
+ get
+ {
+ string nightly = userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeVersion).Contains("svn") ? " (SVN / Nightly Build)" : string.Empty;
+ return string.Format(
+ "{0} ({1}) {2}",
+ userSettingService.GetUserSetting<string>(ASUserSettingConstants.HandBrakeVersion),
+ userSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild),
+ nightly);
+ }
}
/// <summary>
/// Close this window.
/// </summary>
public void Close()
- {
+ {
+ this.TryClose();
}
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs index 199e44be2..8f6919e9d 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs @@ -1,12 +1,14 @@ -/* AddPresetViewModel.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AddPresetViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Add Preset View Model
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
- using System.ComponentModel.Composition;
-
using Caliburn.Micro;
/// <summary>
@@ -14,8 +16,22 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public class AddPresetViewModel : ViewModelBase
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AddPresetViewModel"/> class.
+ /// </summary>
+ /// <param name="windowManager">
+ /// The window manager.
+ /// </param>
public AddPresetViewModel(IWindowManager windowManager) : base(windowManager)
{
}
+
+ /// <summary>
+ /// Close this window.
+ /// </summary>
+ public void Close()
+ {
+ this.TryClose();
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAboutViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAboutViewModel.cs index 7e592ccde..05d085299 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAboutViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAboutViewModel.cs @@ -1,3 +1,12 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IAboutViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The About View Model Interface
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
namespace HandBrakeWPF.ViewModels.Interfaces
{
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs index 31ce54db0..96519f42b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs @@ -1,5 +1,17 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IMainViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Main Window View Model
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
namespace HandBrakeWPF.ViewModels.Interfaces
{
+ /// <summary>
+ /// The Main Window View Model
+ /// </summary>
public interface IMainViewModel
{
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs index b6b75ad87..7805aea63 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs @@ -1,3 +1,12 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IOptionsViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Options Screen View Model Interface
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
namespace HandBrakeWPF.ViewModels.Interfaces
{
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IViewModelBase.cs new file mode 100644 index 000000000..4b99d6206 --- /dev/null +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IViewModelBase.cs @@ -0,0 +1,18 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="IViewModelBase.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Defines the IViewModelBase type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.ViewModels.Interfaces
+{
+ /// <summary>
+ /// The View Model base class interface
+ /// </summary>
+ public interface IViewModelBase
+ {
+ }
+}
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 30c705381..ddc0f4472 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1,7 +1,11 @@ -/* MainViewModel.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="MainViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// HandBrakes Main Window
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
@@ -30,6 +34,11 @@ namespace HandBrakeWPF.ViewModels #region Private Variables and Services
/// <summary>
+ /// The Backing field for the user setting service.
+ /// </summary>
+ private readonly IUserSettingService userSettingService;
+
+ /// <summary>
/// The Source Scan Service.
/// </summary>
private readonly IScan scanService;
@@ -61,8 +70,6 @@ namespace HandBrakeWPF.ViewModels #endregion
- #region Properties
-
/// <summary>
/// Initializes a new instance of the <see cref="MainViewModel"/> class.
/// The viewmodel for HandBrakes main window.
@@ -70,9 +77,12 @@ namespace HandBrakeWPF.ViewModels /// <param name="windowManager">
/// The window manager.
/// </param>
+ /// <param name="userSettingService">The User Setting Service</param>
[ImportingConstructor]
- public MainViewModel(IWindowManager windowManager) : base(windowManager)
+ public MainViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
+ : base(windowManager)
{
+ this.userSettingService = userSettingService;
// Setup Services (TODO - Bring Castle back into the project to wire these up for us)
this.scanService = File.Exists("hb.dll") ? (IScan)new LibScan() : new ScanService();
this.queueProcessor = new QueueProcessor(Process.GetProcessesByName("HandBrake").Length);
@@ -92,6 +102,7 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged;
}
+ #region Properties
/// <summary>
/// Gets or sets TestProperty.
/// </summary>
@@ -192,22 +203,31 @@ namespace HandBrakeWPF.ViewModels }
#region Menu and Taskbar
-
+
+ /// <summary>
+ /// Open the About Window
+ /// </summary>
public void OpenAboutApplication()
{
- this.WindowManager.ShowWindow(new AboutViewModel(this.WindowManager));
+ this.WindowManager.ShowWindow(new AboutViewModel(this.WindowManager, this.userSettingService));
}
+ /// <summary>
+ /// Open the Options Window
+ /// </summary>
public void OpenOptionsWindow()
{
this.WindowManager.ShowWindow(new OptionsViewModel(this.WindowManager));
}
+ /// <summary>
+ /// Open the Queue Window.
+ /// </summary>
public void OpenQueueWindow()
{
this.WindowManager.ShowWindow(new QueueViewModel(this.WindowManager));
}
-
+
/// <summary>
/// Shutdown the Application
/// </summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 6b8e4d939..2e945a008 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -1,10 +1,15 @@ -/* OptionsViewModel.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="OptionsViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Options View Model
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
+ using System.ComponentModel;
using System.ComponentModel.Composition;
using Caliburn.Micro;
@@ -17,21 +22,1120 @@ namespace HandBrakeWPF.ViewModels [Export(typeof(IOptionsViewModel))]
public class OptionsViewModel : ViewModelBase, IOptionsViewModel
{
+ #region Constants and Fields
+
+ /// <summary>
+ /// The add audio mode options.
+ /// </summary>
+ private BindingList<string> addAudioModeOptions;
+
+ /// <summary>
+ /// The add closed captions.
+ /// </summary>
+ private bool addClosedCaptions;
+
+ /// <summary>
+ /// The add only one audio track per language.
+ /// </summary>
+ private bool addOnlyOneAudioTrackPerLanguage;
+
+ /// <summary>
+ /// The add subtitle mode options.
+ /// </summary>
+ private BindingList<string> addSubtitleModeOptions;
+
+ /// <summary>
+ /// The arguments.
+ /// </summary>
+ private string arguments;
+
+ /// <summary>
+ /// The auto name default path.
+ /// </summary>
+ private string autoNameDefaultPath;
+
+ /// <summary>
+ /// The automatically name files.
+ /// </summary>
+ private bool automaticallyNameFiles;
+
+ /// <summary>
+ /// The autoname format.
+ /// </summary>
+ private string autonameFormat;
+
+ /// <summary>
+ /// The available languages.
+ /// </summary>
+ private BindingList<string> availableLanguages;
+
+ /// <summary>
+ /// The change to title case.
+ /// </summary>
+ private bool changeToTitleCase;
+
+ /// <summary>
+ /// The check for updates.
+ /// </summary>
+ private bool checkForUpdates;
+
+ /// <summary>
+ /// The check for updates frequencies.
+ /// </summary>
+ private BindingList<string> checkForUpdatesFrequencies;
+
+ /// <summary>
+ /// The check for updates frequency.
+ /// </summary>
+ private bool checkForUpdatesFrequency;
+
+ /// <summary>
+ /// The clear old olgs.
+ /// </summary>
+ private bool clearOldOlgs;
+
+ /// <summary>
+ /// The constant quality granularity.
+ /// </summary>
+ private BindingList<string> constantQualityGranularity;
+
+ /// <summary>
+ /// The copy log to encode directory.
+ /// </summary>
+ private bool copyLogToEncodeDirectory;
+
+ /// <summary>
+ /// The copy log to sepcficed location.
+ /// </summary>
+ private bool copyLogToSepcficedLocation;
+
+ /// <summary>
+ /// The disable libdvd nav.
+ /// </summary>
+ private bool disableLibdvdNav;
+
+ /// <summary>
+ /// The disable p reset update check notification.
+ /// </summary>
+ private bool disablePResetUpdateCheckNotification;
+
+ /// <summary>
+ /// The display status messages tray icon.
+ /// </summary>
+ private bool displayStatusMessagesTrayIcon;
+
+ /// <summary>
+ /// The enable gui tooltips.
+ /// </summary>
+ private bool enableGuiTooltips;
+
+ /// <summary>
+ /// The enable query editor.
+ /// </summary>
+ private bool enableQueryEditor;
+
+ /// <summary>
+ /// The growl after encode.
+ /// </summary>
+ private bool growlAfterEncode;
+
+ /// <summary>
+ /// The growl after queue.
+ /// </summary>
+ private bool growlAfterQueue;
+
+ /// <summary>
+ /// The log directory.
+ /// </summary>
+ private string logDirectory;
+
+ /// <summary>
+ /// The log verbosity options.
+ /// </summary>
+ private BindingList<string> logVerbosityOptions;
+
+ /// <summary>
+ /// The min length.
+ /// </summary>
+ private long minLength;
+
+ /// <summary>
+ /// The minimise to tray.
+ /// </summary>
+ private bool minimiseToTray;
+
+ /// <summary>
+ /// The mp 4 extension options.
+ /// </summary>
+ private BindingList<string> mp4ExtensionOptions;
+
+ /// <summary>
+ /// The prevent sleep.
+ /// </summary>
+ private bool preventSleep;
+
+ /// <summary>
+ /// The preview pictures to scan.
+ /// </summary>
+ private BindingList<int> previewPicturesToScan;
+
+ /// <summary>
+ /// The priority level options.
+ /// </summary>
+ private BindingList<string> priorityLevelOptions;
+
+ /// <summary>
+ /// The prompt on different query.
+ /// </summary>
+ private bool promptOnDifferentQuery;
+
+ /// <summary>
+ /// The remove underscores.
+ /// </summary>
+ private bool removeUnderscores;
+
+ /// <summary>
+ /// The selected add audio mode.
+ /// </summary>
+ private string selectedAddAudioMode;
+
+ /// <summary>
+ /// The selected add subtitle mode.
+ /// </summary>
+ private string selectedAddSubtitleMode;
+
+ /// <summary>
+ /// The selected granulairty.
+ /// </summary>
+ private bool selectedGranulairty;
+
+ /// <summary>
+ /// The selected mp 4 extension.
+ /// </summary>
+ private string selectedMp4Extension;
+
+ /// <summary>
+ /// The selected preferred languages.
+ /// </summary>
+ private BindingList<string> selectedPreferredLanguages;
+
+ /// <summary>
+ /// The selected preferreed langauge.
+ /// </summary>
+ private string selectedPreferreedLangauge;
+
+ /// <summary>
+ /// The selected preview count.
+ /// </summary>
+ private int selectedPreviewCount;
+
+ /// <summary>
+ /// The selected priority.
+ /// </summary>
+ private string selectedPriority;
+
+ /// <summary>
+ /// The selected verbosity.
+ /// </summary>
+ private string selectedVerbosity;
+
+ /// <summary>
+ /// The send file after encode.
+ /// </summary>
+ private bool sendFileAfterEncode;
+
+ /// <summary>
+ /// The send file to.
+ /// </summary>
+ private string sendFileTo;
+
+ /// <summary>
+ /// The show cli window.
+ /// </summary>
+ private bool showCliWindow;
+
+ /// <summary>
+ /// The vlc path.
+ /// </summary>
+ private string vlcPath;
+
+ /// <summary>
+ /// The when done.
+ /// </summary>
+ private string whenDone;
+
+ /// <summary>
+ /// The when done options.
+ /// </summary>
+ private BindingList<string> whenDoneOptions;
+
+ #endregion
+
+ #region Constructors and Destructors
+
/// <summary>
/// Initializes a new instance of the <see cref="OptionsViewModel"/> class.
/// </summary>
/// <param name="windowManager">
/// The window manager.
/// </param>
- public OptionsViewModel(IWindowManager windowManager) : base(windowManager)
+ public OptionsViewModel(IWindowManager windowManager)
+ : base(windowManager)
+ {
+ }
+
+ #endregion
+
+ #region Properties
+ /* General */
+
+ /// <summary>
+ /// Gets or sets AddAudioModeOptions.
+ /// </summary>
+ public BindingList<string> AddAudioModeOptions
+ {
+ get
+ {
+ return this.addAudioModeOptions;
+ }
+
+ set
+ {
+ this.addAudioModeOptions = value;
+ this.NotifyOfPropertyChange("AddAudioModeOptions");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether AddClosedCaptions.
+ /// </summary>
+ public bool AddClosedCaptions
{
+ get
+ {
+ return this.addClosedCaptions;
+ }
+
+ set
+ {
+ this.addClosedCaptions = value;
+ this.NotifyOfPropertyChange("AddClosedCaptions");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether AddOnlyOneAudioTrackPerLanguage.
+ /// </summary>
+ public bool AddOnlyOneAudioTrackPerLanguage
+ {
+ get
+ {
+ return this.addOnlyOneAudioTrackPerLanguage;
+ }
+
+ set
+ {
+ this.addOnlyOneAudioTrackPerLanguage = value;
+ this.NotifyOfPropertyChange("AddOnlyOneAudioTrackPerLanguage");
+ }
}
/// <summary>
+ /// Gets or sets AddSubtitleModeOptions.
+ /// </summary>
+ public BindingList<string> AddSubtitleModeOptions
+ {
+ get
+ {
+ return this.addSubtitleModeOptions;
+ }
+
+ set
+ {
+ this.addSubtitleModeOptions = value;
+ this.NotifyOfPropertyChange("AddSubtitleModeOptions");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets Arguments.
+ /// </summary>
+ public string Arguments
+ {
+ get
+ {
+ return this.arguments;
+ }
+
+ set
+ {
+ this.arguments = value;
+ this.NotifyOfPropertyChange("Arguments");
+ }
+ }
+
+ /* Output Files */
+
+ /// <summary>
+ /// Gets or sets AutoNameDefaultPath.
+ /// </summary>
+ public string AutoNameDefaultPath
+ {
+ get
+ {
+ return this.autoNameDefaultPath;
+ }
+
+ set
+ {
+ this.autoNameDefaultPath = value;
+ this.NotifyOfPropertyChange("AutoNameDefaultPath");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether AutomaticallyNameFiles.
+ /// </summary>
+ public bool AutomaticallyNameFiles
+ {
+ get
+ {
+ return this.automaticallyNameFiles;
+ }
+
+ set
+ {
+ this.automaticallyNameFiles = value;
+ this.NotifyOfPropertyChange("AutomaticallyNameFiles");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets AutonameFormat.
+ /// </summary>
+ public string AutonameFormat
+ {
+ get
+ {
+ return this.autonameFormat;
+ }
+
+ set
+ {
+ this.autonameFormat = value;
+ this.NotifyOfPropertyChange("AutonameFormat");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets AvailableLanguages.
+ /// </summary>
+ public BindingList<string> AvailableLanguages
+ {
+ get
+ {
+ return this.availableLanguages;
+ }
+
+ set
+ {
+ this.availableLanguages = value;
+ this.NotifyOfPropertyChange("AvailableLanguages");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether ChangeToTitleCase.
+ /// </summary>
+ public bool ChangeToTitleCase
+ {
+ get
+ {
+ return this.changeToTitleCase;
+ }
+
+ set
+ {
+ this.changeToTitleCase = value;
+ this.NotifyOfPropertyChange("ChangeToTitleCase");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether CheckForUpdates.
+ /// </summary>
+ public bool CheckForUpdates
+ {
+ get
+ {
+ return this.checkForUpdates;
+ }
+
+ set
+ {
+ this.checkForUpdates = value;
+ this.NotifyOfPropertyChange("CheckForUpdates");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets CheckForUpdatesFrequencies.
+ /// </summary>
+ public BindingList<string> CheckForUpdatesFrequencies
+ {
+ get
+ {
+ return this.checkForUpdatesFrequencies;
+ }
+
+ set
+ {
+ this.checkForUpdatesFrequencies = value;
+ this.NotifyOfPropertyChange("CheckForUpdatesFrequencies");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether CheckForUpdatesFrequency.
+ /// </summary>
+ public bool CheckForUpdatesFrequency
+ {
+ get
+ {
+ return this.checkForUpdatesFrequency;
+ }
+
+ set
+ {
+ this.checkForUpdatesFrequency = value;
+ this.NotifyOfPropertyChange("CheckForUpdatesFrequency");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether ClearOldOlgs.
+ /// </summary>
+ public bool ClearOldOlgs
+ {
+ get
+ {
+ return this.clearOldOlgs;
+ }
+
+ set
+ {
+ this.clearOldOlgs = value;
+ this.NotifyOfPropertyChange("ClearOldOlgs");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets ConstantQualityGranularity.
+ /// </summary>
+ public BindingList<string> ConstantQualityGranularity
+ {
+ get
+ {
+ return this.constantQualityGranularity;
+ }
+
+ set
+ {
+ this.constantQualityGranularity = value;
+ this.NotifyOfPropertyChange("ConstantQualityGranularity");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether CopyLogToEncodeDirectory.
+ /// </summary>
+ public bool CopyLogToEncodeDirectory
+ {
+ get
+ {
+ return this.copyLogToEncodeDirectory;
+ }
+
+ set
+ {
+ this.copyLogToEncodeDirectory = value;
+ this.NotifyOfPropertyChange("CopyLogToEncodeDirectory");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether CopyLogToSepcficedLocation.
+ /// </summary>
+ public bool CopyLogToSepcficedLocation
+ {
+ get
+ {
+ return this.copyLogToSepcficedLocation;
+ }
+
+ set
+ {
+ this.copyLogToSepcficedLocation = value;
+ this.NotifyOfPropertyChange("CopyLogToSepcficedLocation");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether DisableLibdvdNav.
+ /// </summary>
+ public bool DisableLibdvdNav
+ {
+ get
+ {
+ return this.disableLibdvdNav;
+ }
+
+ set
+ {
+ this.disableLibdvdNav = value;
+ this.NotifyOfPropertyChange("DisableLibdvdNav");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether DisablePResetUpdateCheckNotification.
+ /// </summary>
+ public bool DisablePResetUpdateCheckNotification
+ {
+ get
+ {
+ return this.disablePResetUpdateCheckNotification;
+ }
+
+ set
+ {
+ this.disablePResetUpdateCheckNotification = value;
+ this.NotifyOfPropertyChange("DisablePResetUpdateCheckNotification");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether DisplayStatusMessagesTrayIcon.
+ /// </summary>
+ public bool DisplayStatusMessagesTrayIcon
+ {
+ get
+ {
+ return this.displayStatusMessagesTrayIcon;
+ }
+
+ set
+ {
+ this.displayStatusMessagesTrayIcon = value;
+ this.NotifyOfPropertyChange("DisplayStatusMessagesTrayIcon");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether EnableGuiTooltips.
+ /// </summary>
+ public bool EnableGuiTooltips
+ {
+ get
+ {
+ return this.enableGuiTooltips;
+ }
+
+ set
+ {
+ this.enableGuiTooltips = value;
+ this.NotifyOfPropertyChange("EnableGuiTooltips");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether EnableQueryEditor.
+ /// </summary>
+ public bool EnableQueryEditor
+ {
+ get
+ {
+ return this.enableQueryEditor;
+ }
+
+ set
+ {
+ this.enableQueryEditor = value;
+ this.NotifyOfPropertyChange("EnableQueryEditor");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether GrowlAfterEncode.
+ /// </summary>
+ public bool GrowlAfterEncode
+ {
+ get
+ {
+ return this.growlAfterEncode;
+ }
+
+ set
+ {
+ this.growlAfterEncode = value;
+ this.NotifyOfPropertyChange("GrowlAfterEncode");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether GrowlAfterQueue.
+ /// </summary>
+ public bool GrowlAfterQueue
+ {
+ get
+ {
+ return this.growlAfterQueue;
+ }
+
+ set
+ {
+ this.growlAfterQueue = value;
+ this.NotifyOfPropertyChange("GrowlAfterQueue");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets LogDirectory.
+ /// </summary>
+ public string LogDirectory
+ {
+ get
+ {
+ return this.logDirectory;
+ }
+
+ set
+ {
+ this.logDirectory = value;
+ this.NotifyOfPropertyChange("LogDirectory");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets LogVerbosityOptions.
+ /// </summary>
+ public BindingList<string> LogVerbosityOptions
+ {
+ get
+ {
+ return this.logVerbosityOptions;
+ }
+
+ set
+ {
+ this.logVerbosityOptions = value;
+ this.NotifyOfPropertyChange("LogVerbosityOptions");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets MinLength.
+ /// </summary>
+ public long MinLength
+ {
+ get
+ {
+ return this.minLength;
+ }
+
+ set
+ {
+ this.minLength = value;
+ this.NotifyOfPropertyChange("MinLength");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether MinimiseToTray.
+ /// </summary>
+ public bool MinimiseToTray
+ {
+ get
+ {
+ return this.minimiseToTray;
+ }
+
+ set
+ {
+ this.minimiseToTray = value;
+ this.NotifyOfPropertyChange("MinimiseToTray");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets Mp4ExtensionOptions.
+ /// </summary>
+ public BindingList<string> Mp4ExtensionOptions
+ {
+ get
+ {
+ return this.mp4ExtensionOptions;
+ }
+
+ set
+ {
+ this.mp4ExtensionOptions = value;
+ this.NotifyOfPropertyChange("Mp4ExtensionOptions");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether PreventSleep.
+ /// </summary>
+ public bool PreventSleep
+ {
+ get
+ {
+ return this.preventSleep;
+ }
+
+ set
+ {
+ this.preventSleep = value;
+ this.NotifyOfPropertyChange("PreventSleep");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets PreviewPicturesToScan.
+ /// </summary>
+ public BindingList<int> PreviewPicturesToScan
+ {
+ get
+ {
+ return this.previewPicturesToScan;
+ }
+
+ set
+ {
+ this.previewPicturesToScan = value;
+ this.NotifyOfPropertyChange("PreviewPicturesToScan");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets PriorityLevelOptions.
+ /// </summary>
+ public BindingList<string> PriorityLevelOptions
+ {
+ get
+ {
+ return this.priorityLevelOptions;
+ }
+
+ set
+ {
+ this.priorityLevelOptions = value;
+ this.NotifyOfPropertyChange("PriorityLevelOptions");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether PromptOnDifferentQuery.
+ /// </summary>
+ public bool PromptOnDifferentQuery
+ {
+ get
+ {
+ return this.promptOnDifferentQuery;
+ }
+
+ set
+ {
+ this.promptOnDifferentQuery = value;
+ this.NotifyOfPropertyChange("PromptOnDifferentQuery");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether RemoveUnderscores.
+ /// </summary>
+ public bool RemoveUnderscores
+ {
+ get
+ {
+ return this.removeUnderscores;
+ }
+
+ set
+ {
+ this.removeUnderscores = value;
+ this.NotifyOfPropertyChange("RemoveUnderscores");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SelectedAddAudioMode.
+ /// </summary>
+ public string SelectedAddAudioMode
+ {
+ get
+ {
+ return this.selectedAddAudioMode;
+ }
+
+ set
+ {
+ this.selectedAddAudioMode = value;
+ this.NotifyOfPropertyChange("SelectedAddAudioMode");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SelectedAddSubtitleMode.
+ /// </summary>
+ public string SelectedAddSubtitleMode
+ {
+ get
+ {
+ return this.selectedAddSubtitleMode;
+ }
+
+ set
+ {
+ this.selectedAddSubtitleMode = value;
+ this.NotifyOfPropertyChange("SelectedAddSubtitleMode");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether SelectedGranulairty.
+ /// </summary>
+ public bool SelectedGranulairty
+ {
+ get
+ {
+ return this.selectedGranulairty;
+ }
+
+ set
+ {
+ this.selectedGranulairty = value;
+ this.NotifyOfPropertyChange("SelectedGranulairty");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SelectedMp4Extension.
+ /// </summary>
+ public string SelectedMp4Extension
+ {
+ get
+ {
+ return this.selectedMp4Extension;
+ }
+
+ set
+ {
+ this.selectedMp4Extension = value;
+ this.NotifyOfPropertyChange("SelectedMp4Extension");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SelectedPreferredLanguages.
+ /// </summary>
+ public BindingList<string> SelectedPreferredLanguages
+ {
+ get
+ {
+ return this.selectedPreferredLanguages;
+ }
+
+ set
+ {
+ this.selectedPreferredLanguages = value;
+ this.NotifyOfPropertyChange("SelectedPreferredLanguages");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SelectedPreferreedLangauge.
+ /// </summary>
+ public string SelectedPreferreedLangauge
+ {
+ get
+ {
+ return this.selectedPreferreedLangauge;
+ }
+
+ set
+ {
+ this.selectedPreferreedLangauge = value;
+ this.NotifyOfPropertyChange("SelectedPreferreedLangauge");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SelectedPreviewCount.
+ /// </summary>
+ public int SelectedPreviewCount
+ {
+ get
+ {
+ return this.selectedPreviewCount;
+ }
+
+ set
+ {
+ this.selectedPreviewCount = value;
+ this.NotifyOfPropertyChange("SelectedPreviewCount");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SelectedPriority.
+ /// </summary>
+ public string SelectedPriority
+ {
+ get
+ {
+ return this.selectedPriority;
+ }
+
+ set
+ {
+ this.selectedPriority = value;
+ this.NotifyOfPropertyChange("SelectedPriority");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SelectedVerbosity.
+ /// </summary>
+ public string SelectedVerbosity
+ {
+ get
+ {
+ return this.selectedVerbosity;
+ }
+
+ set
+ {
+ this.selectedVerbosity = value;
+ this.NotifyOfPropertyChange("SelectedVerbosity");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether SendFileAfterEncode.
+ /// </summary>
+ public bool SendFileAfterEncode
+ {
+ get
+ {
+ return this.sendFileAfterEncode;
+ }
+
+ set
+ {
+ this.sendFileAfterEncode = value;
+ this.NotifyOfPropertyChange("SendFileAfterEncode");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets SendFileTo.
+ /// </summary>
+ public string SendFileTo
+ {
+ get
+ {
+ return this.sendFileTo;
+ }
+
+ set
+ {
+ this.sendFileTo = value;
+ this.NotifyOfPropertyChange("SendFileTo");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether ShowCliWindow.
+ /// </summary>
+ public bool ShowCliWindow
+ {
+ get
+ {
+ return this.showCliWindow;
+ }
+
+ set
+ {
+ this.showCliWindow = value;
+ this.NotifyOfPropertyChange("ShowCliWindow");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets VLCPath.
+ /// </summary>
+ public string VLCPath
+ {
+ get
+ {
+ return this.vlcPath;
+ }
+
+ set
+ {
+ this.vlcPath = value;
+ this.NotifyOfPropertyChange("VLCPath");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets WhenDone.
+ /// </summary>
+ public string WhenDone
+ {
+ get
+ {
+ return this.whenDone;
+ }
+
+ set
+ {
+ this.whenDone = value;
+ this.NotifyOfPropertyChange("WhenDone");
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets WhenDoneOptions.
+ /// </summary>
+ public BindingList<string> WhenDoneOptions
+ {
+ get
+ {
+ return this.whenDoneOptions;
+ }
+
+ set
+ {
+ this.whenDoneOptions = value;
+ this.NotifyOfPropertyChange("WhenDoneOptions");
+ }
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ /// <summary>
/// Close this window.
/// </summary>
public void Close()
- {
+ {
+ this.TryClose();
}
+
+ #endregion
}
-}
+}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs index a72d0d665..16177a55e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PreviewViewModel.cs @@ -1,7 +1,11 @@ -/* PreviewViewModel.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PreviewViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The About View Model
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
@@ -12,8 +16,22 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public class PreviewViewModel : ViewModelBase
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PreviewViewModel"/> class.
+ /// </summary>
+ /// <param name="windowManager">
+ /// The window manager.
+ /// </param>
public PreviewViewModel(IWindowManager windowManager) : base(windowManager)
{
}
+
+ /// <summary>
+ /// Close this window.
+ /// </summary>
+ public void Close()
+ {
+ this.TryClose();
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index e74722792..d294e311b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -1,7 +1,11 @@ -/* QueueViewModel.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueueViewModel.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The Preview View Model
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
@@ -12,8 +16,22 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public class QueueViewModel : ViewModelBase
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueueViewModel"/> class.
+ /// </summary>
+ /// <param name="windowManager">
+ /// The window manager.
+ /// </param>
public QueueViewModel(IWindowManager windowManager) : base(windowManager)
{
}
+
+ /// <summary>
+ /// Close this window.
+ /// </summary>
+ public void Close()
+ {
+ this.TryClose();
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs index cc2d9307a..eea335d84 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs @@ -1,11 +1,22 @@ -namespace HandBrakeWPF.ViewModels
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ViewModelBase.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// A Base Class for the View Models which contains reusable code.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.ViewModels
{
using Caliburn.Micro;
+ using HandBrakeWPF.ViewModels.Interfaces;
+
/// <summary>
/// A Base Class for the View Models which contains reusable code.
/// </summary>
- public class ViewModelBase : Screen
+ public class ViewModelBase : Screen, IViewModelBase
{
/// <summary>
/// Initializes a new instance of the <see cref="ViewModelBase"/> class.
diff --git a/win/CS/HandBrakeWPF/Views/AboutView.xaml b/win/CS/HandBrakeWPF/Views/AboutView.xaml index ce52f61a5..0c8bf0ecb 100644 --- a/win/CS/HandBrakeWPF/Views/AboutView.xaml +++ b/win/CS/HandBrakeWPF/Views/AboutView.xaml @@ -1,16 +1,20 @@ <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:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" 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="270" Width="500">
+
<StackPanel Orientation="Horizontal">
<Image Source="Images/logo64.png" Width="64" Height="64" SnapsToDevicePixels="True" Margin="10,10,10,10" HorizontalAlignment="Left" VerticalAlignment="Top" />
<StackPanel Orientation="Vertical">
- <Label Content="HandBrake WPF Demo App" FontWeight="Bold" FontSize="14" Margin="0,10,0,0" />
- <Label Content="Copyright 2003-2011 HandBrake Team" />
-
+ <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
+ <TextBlock Text="HandBrake" FontWeight="Bold" FontSize="14" Margin="0,0,5,0" />
+ <TextBlock Text="{Binding Version}" Margin="0,0,0,1" VerticalAlignment="Bottom" />
+ </StackPanel>
+ <TextBlock Text="Copyright 2003-2011 HandBrake Team" />
+
<Label Content="License:" />
- <TextBox Width="380" Height="100" IsReadOnly="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" Margin="10,0,10,10">
+ <TextBox Width="380" Height="125" IsReadOnly="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" Margin="10,0,10,10">
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -18,11 +22,9 @@ 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" Micro:Message.Attach="[Event Click] = [Action Close]"
- HorizontalAlignment="Right" Padding="10,2" Margin="0,0,10,10" />
-
- </StackPanel>
-
+ <Button Content="Close" Micro:Message.Attach="[Event Click] = [Action Close]"
+ HorizontalAlignment="Right" Padding="12,2" Margin="0,0,10,10" />
+ </StackPanel>
</StackPanel>
</Window>
diff --git a/win/CS/HandBrakeWPF/Views/AboutView.xaml.cs b/win/CS/HandBrakeWPF/Views/AboutView.xaml.cs index 22de6967b..55665fc8b 100644 --- a/win/CS/HandBrakeWPF/Views/AboutView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/AboutView.xaml.cs @@ -1,4 +1,13 @@ -namespace HandBrakeWPF.Views
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AboutView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for AboutView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
{
using System.Windows;
@@ -7,6 +16,9 @@ /// </summary>
public partial class AboutView : Window
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AboutView"/> class.
+ /// </summary>
public AboutView()
{
InitializeComponent();
diff --git a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml.cs b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml.cs index b99e48b26..9cb9e39e1 100644 --- a/win/CS/HandBrakeWPF/Views/AddPresetView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/AddPresetView.xaml.cs @@ -1,24 +1,24 @@ -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;
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="AddPresetView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for VideoView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Views
{
+ using System.Windows.Controls;
+
/// <summary>
/// Interaction logic for VideoView.xaml
/// </summary>
public partial class AddPresetView : UserControl
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AddPresetView"/> class.
+ /// </summary>
public AddPresetView()
{
InitializeComponent();
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs index efb3e7d6e..165e74923 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs @@ -1,7 +1,11 @@ -/* MainView.xaml.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="MainView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for MainView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Views
{
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs b/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs index 9d0fc947c..e17c98514 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs @@ -1,23 +1,24 @@ -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.Shapes;
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="OptionsView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for OptionsView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Views
{
+ using System.Windows;
+
/// <summary>
/// Interaction logic for OptionsView.xaml
/// </summary>
public partial class OptionsView : Window
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="OptionsView"/> class.
+ /// </summary>
public OptionsView()
{
InitializeComponent();
diff --git a/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs b/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs index 0bbf84b0a..e64f70411 100644 --- a/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/PreviewView.xaml.cs @@ -1,4 +1,13 @@ -namespace HandBrakeWPF.Views
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PreviewView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for VideoView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
{
using System.Windows.Controls;
@@ -7,6 +16,9 @@ /// </summary>
public partial class PreviewView : UserControl
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="PreviewView"/> class.
+ /// </summary>
public PreviewView()
{
InitializeComponent();
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs index ae0743166..7b6fa9fdf 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs @@ -1,4 +1,13 @@ -namespace HandBrakeWPF.Views
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="QueueView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Interaction logic for VideoView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Views
{
using System.Windows.Controls;
@@ -7,6 +16,9 @@ /// </summary>
public partial class QueueView : UserControl
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="QueueView"/> class.
+ /// </summary>
public QueueView()
{
InitializeComponent();
diff --git a/win/CS/libraries/WPFToolkit.Extended.dll b/win/CS/libraries/WPFToolkit.Extended.dll Binary files differdeleted file mode 100644 index 6eccad0d4..000000000 --- a/win/CS/libraries/WPFToolkit.Extended.dll +++ /dev/null |