From c892e3697bc617bcb3ffdc67f2e6e56a341c9691 Mon Sep 17 00:00:00 2001 From: sr55 Date: Mon, 18 Apr 2016 21:17:09 +0100 Subject: WinGui: Strip out the overlay panel code. It's not used. --- .../Commands/CloseOverlayPanelCommand.cs | 58 -------------------- .../Commands/OpenOverlayPanelCommand.cs | 62 ---------------------- win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 3 -- .../Interfaces/IAudioDefaultsViewModel.cs | 2 +- .../ViewModels/Interfaces/IOverlayPanel.cs | 18 ------- .../ViewModels/Interfaces/IShellViewModel.cs | 13 ----- win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs | 52 ------------------ win/CS/HandBrakeWPF/Views/ShellView.xaml | 4 -- 8 files changed, 1 insertion(+), 211 deletions(-) delete mode 100644 win/CS/HandBrakeWPF/Commands/CloseOverlayPanelCommand.cs delete mode 100644 win/CS/HandBrakeWPF/Commands/OpenOverlayPanelCommand.cs delete mode 100644 win/CS/HandBrakeWPF/ViewModels/Interfaces/IOverlayPanel.cs diff --git a/win/CS/HandBrakeWPF/Commands/CloseOverlayPanelCommand.cs b/win/CS/HandBrakeWPF/Commands/CloseOverlayPanelCommand.cs deleted file mode 100644 index 582cca925..000000000 --- a/win/CS/HandBrakeWPF/Commands/CloseOverlayPanelCommand.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// -// -// The open overlay panel command. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrakeWPF.Commands -{ - using System; - using System.Windows.Input; - - using Caliburn.Micro; - - using HandBrakeWPF.ViewModels.Interfaces; - - /// - /// The open overlay panel command. - /// - public class CloseOverlayPanelCommand : ICommand - { - /// - /// The execute. - /// - /// - /// The parameter. - /// - public void Execute(object parameter) - { - IShellViewModel shellViewModel = IoC.Get(); - if (shellViewModel != null) - { - shellViewModel.HideOverlay(); - } - } - - /// - /// The can execute. - /// - /// - /// The parameter. - /// - /// - /// The . - /// - public bool CanExecute(object parameter) - { - return true; - } - - /// - /// The can execute changed. - /// - public event EventHandler CanExecuteChanged; - } -} diff --git a/win/CS/HandBrakeWPF/Commands/OpenOverlayPanelCommand.cs b/win/CS/HandBrakeWPF/Commands/OpenOverlayPanelCommand.cs deleted file mode 100644 index 5d2e3cba2..000000000 --- a/win/CS/HandBrakeWPF/Commands/OpenOverlayPanelCommand.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// -// -// The open overlay panel command. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrakeWPF.Commands -{ - using System; - using System.Windows.Input; - - using Caliburn.Micro; - - using HandBrakeWPF.ViewModels.Interfaces; - - /// - /// The open overlay panel command. - /// - public class OpenOverlayPanelCommand : ICommand - { - /// - /// The execute. - /// - /// - /// The parameter. - /// - public void Execute(object parameter) - { - IOverlayPanel overlayPanel = parameter as IOverlayPanel; - if (overlayPanel != null) - { - IShellViewModel shellViewModel = IoC.Get(); - if (shellViewModel != null) - { - shellViewModel.ShowOverlay(overlayPanel); - } - } - } - - /// - /// The can execute. - /// - /// - /// The parameter. - /// - /// - /// The . - /// - public bool CanExecute(object parameter) - { - return true; - } - - /// - /// The can execute changed. - /// - public event EventHandler CanExecuteChanged; - } -} diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 4ba16c677..5869f24bb 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -138,8 +138,6 @@ - - @@ -263,7 +261,6 @@ SourceSelection.xaml - diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioDefaultsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioDefaultsViewModel.cs index e9e31d0ab..897568ed8 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioDefaultsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IAudioDefaultsViewModel.cs @@ -16,7 +16,7 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// /// The Audio View Model Interface /// - public interface IAudioDefaultsViewModel : IOverlayPanel, IViewModelBase + public interface IAudioDefaultsViewModel : IViewModelBase { /// /// Gets the audio behaviours. diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOverlayPanel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOverlayPanel.cs deleted file mode 100644 index c713ce283..000000000 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOverlayPanel.cs +++ /dev/null @@ -1,18 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. -// -// -// The OverlayPanel interface. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace HandBrakeWPF.ViewModels.Interfaces -{ - /// - /// The OverlayPanel interface. - /// - public interface IOverlayPanel - { - } -} diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IShellViewModel.cs index 0b156109a..6c537ef66 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IShellViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IShellViewModel.cs @@ -16,19 +16,6 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// public interface IShellViewModel { - /// - /// The show overlay. - /// - /// - /// The panel. - /// - void ShowOverlay(IOverlayPanel panel); - - /// - /// The hide overlay. - /// - void HideOverlay(); - /// /// Change the page displayed on this window. /// diff --git a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs index 848472899..35c8d6a86 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ShellViewModel.cs @@ -42,12 +42,8 @@ namespace HandBrakeWPF.ViewModels /// private bool showOptions; - private bool showOverlayPanel; - private bool isMainPanelEnabled; - private IMainViewModel mainViewModel; - #endregion /// @@ -72,28 +68,6 @@ namespace HandBrakeWPF.ViewModels this.OptionsViewModel = optionsViewModel; } - /// - /// The show overlay. - /// - /// - /// The panel. - /// - public void ShowOverlay(IOverlayPanel panel) - { - this.OverlayPanelViewModel = panel; - this.NotifyOfPropertyChange(() => this.OverlayPanelViewModel); - this.ShowOverlayPanel = true; - } - - /// - /// The hide overlay. - /// - public void HideOverlay() - { - this.ShowOverlayPanel = false; - this.OverlayPanelViewModel = null; - } - /// /// Change the page displayed on this window. /// @@ -131,11 +105,6 @@ namespace HandBrakeWPF.ViewModels /// public IOptionsViewModel OptionsViewModel { get; set; } - /// - /// Gets or sets the overlay panel view model. - /// - public IOverlayPanel OverlayPanelViewModel { get; set; } - /// /// Gets or sets a value indicating whether ShowMainWindow. /// @@ -188,27 +157,6 @@ namespace HandBrakeWPF.ViewModels } } - /// - /// Gets or sets a value indicating whether show overlay panel. - /// - public bool ShowOverlayPanel - { - get - { - return this.showOverlayPanel; - } - set - { - if (value.Equals(this.showOverlayPanel)) - { - return; - } - this.showOverlayPanel = value; - this.IsMainPanelEnabled = !value; - this.NotifyOfPropertyChange(() => this.ShowOverlayPanel); - } - } - /// /// Gets WindowTitle. /// diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml index 9cc976584..fafa28d31 100644 --- a/win/CS/HandBrakeWPF/Views/ShellView.xaml +++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml @@ -34,9 +34,5 @@ IsEnabled="{Binding IsMainPanelEnabled}" /> - - - -- cgit v1.2.3