diff options
author | sr55 <[email protected]> | 2013-06-29 15:36:48 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-06-29 15:36:48 +0000 |
commit | 75e97b7e676869c9ea83200b2f882ba4e0435f23 (patch) | |
tree | d164b9e581cf1bb85b4d15a8b68eb6f3dcb49ab3 /win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs | |
parent | acd0b75397ae0dfc18d1fd31c4031e87c22a6134 (diff) |
WinGui: Just some prototype code for safe keeping. Some ideas around an Instant HandBrake window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5617 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs index 39fee77fd..4a4aebf43 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs @@ -13,6 +13,8 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro;
+ using Castle.Facilities.FactorySupport;
+
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.Helpers;
@@ -42,6 +44,11 @@ namespace HandBrakeWPF.ViewModels /// </summary>
private bool showOptions;
+ /// <summary>
+ /// The show instant.
+ /// </summary>
+ private bool showInstant;
+
#endregion
/// <summary>
@@ -53,8 +60,19 @@ namespace HandBrakeWPF.ViewModels public ShellViewModel(IErrorService errorService)
{
this.errorService = errorService;
- this.showMainWindow = true;
- this.showOptions = false;
+
+ if (!AppArguments.IsInstantHandBrake)
+ {
+ this.showMainWindow = true;
+ this.showOptions = false;
+ this.showInstant = false;
+ }
+ else
+ {
+ this.showMainWindow = false;
+ this.showOptions = false;
+ this.showInstant = true;
+ }
}
/// <summary>
@@ -69,16 +87,29 @@ namespace HandBrakeWPF.ViewModels {
this.ShowMainWindow = true;
this.ShowOptions = false;
+ this.ShowInstant = false;
+ this.MainViewModel.IsInstandHandBrake = false;
}
else if (window == ShellWindow.OptionsWindow)
{
this.ShowOptions = true;
this.ShowMainWindow = false;
+ this.ShowInstant = false;
+ this.MainViewModel.IsInstandHandBrake = false;
+ }
+ else if (window == ShellWindow.InstantMainWindow)
+ {
+ this.ShowInstant = true;
+ this.ShowOptions = false;
+ this.ShowMainWindow = false;
+ this.MainViewModel.IsInstandHandBrake = true;
}
else
{
this.ShowMainWindow = true;
this.ShowOptions = false;
+ this.ShowInstant = false;
+ this.MainViewModel.IsInstandHandBrake = false;
}
}
@@ -127,13 +158,29 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
+ /// Gets or sets a value indicating whether ShowInstant.
+ /// </summary>
+ public bool ShowInstant
+ {
+ get
+ {
+ return this.showInstant;
+ }
+ set
+ {
+ this.showInstant = value;
+ this.NotifyOfPropertyChange(() => this.ShowInstant);
+ }
+ }
+
+ /// <summary>
/// Gets WindowTitle.
/// </summary>
public string WindowTitle
{
get
{
- return "HandBrake";
+ return AppArguments.IsInstantHandBrake ? "Instant HandBrake" : "HandBrake";
}
}
|