diff --git a/osrs-toolbox/Models/HiscoreLookupModel.cs b/osrs-toolbox/Models/HiscoreLookupModel.cs new file mode 100644 index 0000000..c7a138d --- /dev/null +++ b/osrs-toolbox/Models/HiscoreLookupModel.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; + +namespace osrs_toolbox +{ + public abstract class HiscoreLookupModel : ModelBase + { + private string _playerName; + private string _displayOption; + private string[] _displayOptions; + private string _displayOutput; + + private ICommand _lookupPlayer; + + private PlayerInfo _hiscoreInfo; + + public string PlayerName + { + get { return _playerName; } + set { SetProperty(ref _playerName, value, nameof(PlayerName)); } + } + public string DisplayOption + { + get { return _displayOption; } + set { SetProperty(ref _displayOption, value, nameof(DisplayOption)); } + } + public string[] DisplayOptions + { + get { return _displayOptions; } + set { SetProperty(ref _displayOptions, value, nameof(DisplayOptions)); } + } + public string DisplayOutput + { + get { return _displayOutput; } + set { SetProperty(ref _displayOutput, value, nameof(DisplayOutput)); } + } + + public ICommand LookupPlayer + { + get { return _lookupPlayer; } + set { SetProperty(ref _lookupPlayer, value, nameof(LookupPlayer)); } + } + + public PlayerInfo HiscoreInfo + { + get { return _hiscoreInfo; } + set { SetProperty(ref _hiscoreInfo, value, nameof(HiscoreInfo)); } + } + } +} diff --git a/osrs-toolbox/ViewModels/HiscoreLookupViewModel.cs b/osrs-toolbox/ViewModels/HiscoreLookupViewModel.cs new file mode 100644 index 0000000..77f0469 --- /dev/null +++ b/osrs-toolbox/ViewModels/HiscoreLookupViewModel.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace osrs_toolbox +{ + public class HiscoreLookupViewModel : HiscoreLookupModel + { + public HiscoreLookupViewModel() + { + InitializeVariables(); + InitializeCommands(); + } + + private void InitializeVariables() + { + PlayerName = string.Empty; + DisplayOption = "Skills"; + DisplayOptions = ["Skills", "Activities", "Bosses"]; + DisplayOutput = string.Empty; + HiscoreInfo = new(); + } + + private void InitializeCommands() + { + LookupPlayer = new RelayCommand(DoPlayerLookup); + } + + private async void DoPlayerLookup(object obj) + { + + } + } +}