From 67c37d500d4082ffd8ae9322b13544df423a1854 Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 4 Aug 2023 14:21:03 +0200 Subject: [PATCH] Added stats drop down menu --- .../Network/Manager/EntityController.cs | 2 +- .../ViewModels/MainWindowViewModel.cs | 25 +++++++++ .../Views/MainWindow.xaml | 51 +++++++++++++++++++ .../Views/MainWindow.xaml.cs | 5 ++ 4 files changed, 82 insertions(+), 1 deletion(-) diff --git a/src/StatisticsAnalysisTool/Network/Manager/EntityController.cs b/src/StatisticsAnalysisTool/Network/Manager/EntityController.cs index 154532588..01fc615f9 100644 --- a/src/StatisticsAnalysisTool/Network/Manager/EntityController.cs +++ b/src/StatisticsAnalysisTool/Network/Manager/EntityController.cs @@ -287,7 +287,7 @@ public bool IsEntityInParty(Guid guid) { return _knownEntities?.FirstOrDefault(x => x.Key == guid).Value?.IsInParty ?? false; } - + public void CopyPartyToClipboard() { var output = string.Empty; diff --git a/src/StatisticsAnalysisTool/ViewModels/MainWindowViewModel.cs b/src/StatisticsAnalysisTool/ViewModels/MainWindowViewModel.cs index 3b1105ae5..80c658232 100644 --- a/src/StatisticsAnalysisTool/ViewModels/MainWindowViewModel.cs +++ b/src/StatisticsAnalysisTool/ViewModels/MainWindowViewModel.cs @@ -116,6 +116,7 @@ public class MainWindowViewModel : INotifyPropertyChanged private Visibility _mapHistoryTabVisibility = Visibility.Visible; private Visibility _playerInformationTabVisibility = Visibility.Visible; private Visibility _toolTaskFrontViewVisibility = Visibility.Collapsed; + private Visibility _statsDropDownVisibility = Visibility.Collapsed; private double _toolTaskProgressBarValue; private string _toolTaskCurrentTaskName; private ToolTaskBindings _toolTaskBindings = new(); @@ -426,6 +427,20 @@ public void SwitchToolTasksState() #endregion + #region Stats drop down + + public void SwitchStatsDropDownState() + { + StatsDropDownVisibility = StatsDropDownVisibility switch + { + Visibility.Collapsed => Visibility.Visible, + Visibility.Visible => Visibility.Collapsed, + _ => StatsDropDownVisibility + }; + } + + #endregion + #region Save loot logger public void SaveLootLogger() @@ -1236,6 +1251,16 @@ public Visibility ToolTasksVisibility } } + public Visibility StatsDropDownVisibility + { + get => _statsDropDownVisibility; + set + { + _statsDropDownVisibility = value; + OnPropertyChanged(); + } + } + public Visibility UnsupportedOsVisibility { get => _unsupportedOsVisibility; diff --git a/src/StatisticsAnalysisTool/Views/MainWindow.xaml b/src/StatisticsAnalysisTool/Views/MainWindow.xaml index 912660148..ae6af1bec 100644 --- a/src/StatisticsAnalysisTool/Views/MainWindow.xaml +++ b/src/StatisticsAnalysisTool/Views/MainWindow.xaml @@ -7,6 +7,7 @@ xmlns:userControls="clr-namespace:StatisticsAnalysisTool.UserControls" xmlns:viewModels="clr-namespace:StatisticsAnalysisTool.ViewModels" xmlns:vwp="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel" + xmlns:glob="clr-namespace:System.Globalization;assembly=System.Runtime" mc:Ignorable="d" d:DesignHeight="650" d:DesignWidth="1000" Title="AlbionOnline - StatisticsAnalysisTool" @@ -114,6 +115,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +