diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 7d9e9d2c2..2dc706409 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -205,6 +205,8 @@ namespace HandBrakeWPF.ViewModels private string alertWindowText;
+ private bool hasSource;
+
#endregion
/// <summary>
@@ -258,6 +260,7 @@ namespace HandBrakeWPF.ViewModels this.CurrentTask = new EncodeTask();
this.CurrentTask.PropertyChanged += this.CurrentTask_PropertyChanged;
this.ScannedSource = new Source();
+ this.HasSource = false;
// Setup Events
this.scanService.ScanStared += this.ScanStared;
@@ -1157,6 +1160,26 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets or sets a value indicating whether has source.
+ /// </summary>
+ public bool HasSource
+ {
+ get
+ {
+ return this.hasSource;
+ }
+ set
+ {
+ if (value.Equals(this.hasSource))
+ {
+ return;
+ }
+ this.hasSource = value;
+ this.NotifyOfPropertyChange(() => this.HasSource);
+ }
+ }
+
#endregion
#region Load and Shutdown Handling
@@ -2168,6 +2191,7 @@ namespace HandBrakeWPF.ViewModels {
this.NotifyOfPropertyChange(() => this.ScannedSource);
this.NotifyOfPropertyChange(() => this.ScannedSource.Titles);
+ this.HasSource = true;
this.SelectedTitle = this.ScannedSource.Titles.FirstOrDefault(t => t.MainTitle) ?? this.ScannedSource.Titles.FirstOrDefault();
}
else
|