diff options
author | sr55 <[email protected]> | 2011-10-22 16:38:47 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-10-22 16:38:47 +0000 |
commit | 76140507f1d927f4faa4b7d806a5ddca4b5d7753 (patch) | |
tree | a6824b83e770945c43316f2ea48d21bed9d2059b /win/CS/HandBrakeWPF/ViewModels | |
parent | fffc46565e4eacf9b5e7485430d72ecf037d436e (diff) |
WinGui: Initial layout of the WPF options window
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4306 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
7 files changed, 86 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs index aff760ad7..759be462d 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs @@ -5,15 +5,33 @@ namespace HandBrakeWPF.ViewModels
{
+ using System.ComponentModel.Composition;
+
using Caliburn.Micro;
+ using HandBrakeWPF.ViewModels.Interfaces;
+
/// <summary>
/// The About View Model
/// </summary>
- public class AboutViewModel : ViewModelBase
+ [Export(typeof(IAboutViewModel))]
+ public class AboutViewModel : ViewModelBase, IAboutViewModel
{
+ /// <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)
{
}
+
+ /// <summary>
+ /// Close this window.
+ /// </summary>
+ public void Close()
+ {
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs index 0c9373b57..199e44be2 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs @@ -5,6 +5,8 @@ namespace HandBrakeWPF.ViewModels
{
+ using System.ComponentModel.Composition;
+
using Caliburn.Micro;
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAboutViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAboutViewModel.cs new file mode 100644 index 000000000..7e592ccde --- /dev/null +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAboutViewModel.cs @@ -0,0 +1,9 @@ +namespace HandBrakeWPF.ViewModels.Interfaces
+{
+ /// <summary>
+ /// The About View Model Interface
+ /// </summary>
+ public interface IAboutViewModel
+ {
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs new file mode 100644 index 000000000..b6b75ad87 --- /dev/null +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs @@ -0,0 +1,9 @@ +namespace HandBrakeWPF.ViewModels.Interfaces
+{
+ /// <summary>
+ /// The Options Screen View Model Interface
+ /// </summary>
+ public interface IOptionsViewModel
+ {
+ }
+}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index f833695c6..30c705381 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -63,6 +63,13 @@ namespace HandBrakeWPF.ViewModels #region Properties
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MainViewModel"/> class.
+ /// The viewmodel for HandBrakes main window.
+ /// </summary>
+ /// <param name="windowManager">
+ /// The window manager.
+ /// </param>
[ImportingConstructor]
public MainViewModel(IWindowManager windowManager) : base(windowManager)
{
@@ -184,11 +191,21 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.EncodeService.EncodeStatusChanged -= this.EncodeStatusChanged;
}
-
#region Menu and Taskbar
- public void AboutApplication()
+ public void OpenAboutApplication()
{
+ this.WindowManager.ShowWindow(new AboutViewModel(this.WindowManager));
+ }
+
+ public void OpenOptionsWindow()
+ {
+ this.WindowManager.ShowWindow(new OptionsViewModel(this.WindowManager));
+ }
+
+ public void OpenQueueWindow()
+ {
+ this.WindowManager.ShowWindow(new QueueViewModel(this.WindowManager));
}
/// <summary>
@@ -201,7 +218,6 @@ namespace HandBrakeWPF.ViewModels #endregion
-
#region Event Handlers
/// <summary>
/// Handle the Scan Status Changed Event.
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 5979cdf60..6b8e4d939 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -5,15 +5,33 @@ namespace HandBrakeWPF.ViewModels
{
+ using System.ComponentModel.Composition;
+
using Caliburn.Micro;
+ using HandBrakeWPF.ViewModels.Interfaces;
+
/// <summary>
/// The Options View Model
/// </summary>
- public class OptionsViewModel : ViewModelBase
+ [Export(typeof(IOptionsViewModel))]
+ public class OptionsViewModel : ViewModelBase, IOptionsViewModel
{
+ /// <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)
{
}
+
+ /// <summary>
+ /// Close this window.
+ /// </summary>
+ public void Close()
+ {
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs index 29379938a..cc2d9307a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ViewModelBase.cs @@ -7,11 +7,20 @@ /// </summary>
public class ViewModelBase : Screen
{
+ /// <summary>
+ /// Initializes a new instance of the <see cref="ViewModelBase"/> class.
+ /// </summary>
+ /// <param name="windowManager">
+ /// The window manager.
+ /// </param>
public ViewModelBase(IWindowManager windowManager)
{
this.WindowManager = windowManager;
}
+ /// <summary>
+ /// Gets WindowManager.
+ /// </summary>
public IWindowManager WindowManager { get; private set; }
}
}
|