diff --git a/osrs-toolbox/Models/CompetitionOverlayModel.cs b/osrs-toolbox/Models/CompetitionOverlayModel.cs index 4869621..b7e7407 100644 --- a/osrs-toolbox/Models/CompetitionOverlayModel.cs +++ b/osrs-toolbox/Models/CompetitionOverlayModel.cs @@ -9,16 +9,11 @@ namespace osrs_toolbox private int _competitionId = -1; private int _groupId = -1; private string _playerName = string.Empty; - private string _testOutput = string.Empty; private StackPanel _gridOutput = new StackPanel(); - private Visibility _controlsVisible = Visibility.Visible; - private string _toggleButtonText = string.Empty; private bool _hideOtherPlayers = false; private bool _hideZeroKC = false; private ICommand _update; - private ICommand _toggleVisibility; - private ICommand _closeApp; public int CompetitionID { @@ -35,26 +30,11 @@ namespace osrs_toolbox get { return _playerName; } set { SetProperty(ref _playerName, value, nameof(PlayerName)); } } - public string TestOutput - { - get { return _testOutput; } - set { SetProperty(ref _testOutput, value, nameof(TestOutput)); } - } public StackPanel GridOutput { get { return _gridOutput; } set { SetProperty(ref _gridOutput, value, nameof(GridOutput)); } } - public Visibility ControlsVisible - { - get { return _controlsVisible; } - set { SetProperty(ref _controlsVisible, value, nameof(ControlsVisible)); } - } - public string ToggleButtonText - { - get { return _toggleButtonText; } - set { SetProperty(ref _toggleButtonText, value, nameof(ToggleButtonText)); } - } public bool HideOtherPlayers { get { return _hideOtherPlayers; } @@ -71,15 +51,5 @@ namespace osrs_toolbox get { return _update; } set { SetProperty(ref _update, value, nameof(Update)); } } - public ICommand ToggleVisibility - { - get { return _toggleVisibility; } - set { SetProperty(ref _toggleVisibility, value, nameof(ToggleVisibility)); } - } - public ICommand CloseApp - { - get { return _closeApp; } - set { SetProperty(ref _closeApp, value, nameof(CloseApp)); } - } } } diff --git a/osrs-toolbox/ViewModels/CompetitionOverlayViewModel.cs b/osrs-toolbox/ViewModels/CompetitionOverlayViewModel.cs index ab00df0..0a27de1 100644 --- a/osrs-toolbox/ViewModels/CompetitionOverlayViewModel.cs +++ b/osrs-toolbox/ViewModels/CompetitionOverlayViewModel.cs @@ -26,10 +26,7 @@ namespace osrs_toolbox CompetitionID = 80030; GroupID = 11197; PlayerName = "kalakoi"; - TestOutput = string.Empty; GridOutput = new StackPanel(); - ControlsVisible = Visibility.Visible; - ToggleButtonText = "V"; HideOtherPlayers = false; HideZeroKC = false; } @@ -39,10 +36,7 @@ namespace osrs_toolbox this.CompetitionID = CompetitionID; this.GroupID = GroupID; PlayerName = Username; - TestOutput = string.Empty; GridOutput = new StackPanel(); - ControlsVisible = Visibility.Visible; - ToggleButtonText = "V"; HideOtherPlayers = false; HideZeroKC = false; } @@ -50,8 +44,6 @@ namespace osrs_toolbox private void InitializeCommands() { Update = new RelayCommand(DoUpdate); - CloseApp = new RelayCommand(DoCloseApp); - ToggleVisibility = new RelayCommand(DoToggleControls); } private void InitializeTimer() @@ -295,28 +287,5 @@ namespace osrs_toolbox }); OnPropertyChanged(nameof(GridOutput)); } - - private void DoCloseApp(object obj) - { - Application.Current.Shutdown(); - } - - private void DoToggleControls(object obj) - { - if (ControlsVisible == Visibility.Visible) - { - ControlsVisible = Visibility.Collapsed; - Application.Current.MainWindow.ResizeMode = ResizeMode.NoResize; - Application.Current.MainWindow.Topmost = true; - ToggleButtonText = ">"; - } - else - { - ControlsVisible = Visibility.Visible; - Application.Current.MainWindow.ResizeMode = ResizeMode.CanResizeWithGrip; - Application.Current.MainWindow.Topmost = false; - ToggleButtonText = "V"; - } - } } } diff --git a/osrs-toolbox/Views/CompetitionOverlayView.xaml b/osrs-toolbox/Views/CompetitionOverlayView.xaml index 80b8eed..b188f76 100644 --- a/osrs-toolbox/Views/CompetitionOverlayView.xaml +++ b/osrs-toolbox/Views/CompetitionOverlayView.xaml @@ -31,23 +31,9 @@ -