Add project files.

This commit is contained in:
2022-05-26 15:19:31 +02:00
parent 44afa68e45
commit a57dcfe03b
57 changed files with 1907 additions and 0 deletions

View File

@ -0,0 +1,48 @@
using OemanTrader.FinantialModelingPrepAPI.Services;
using OemanTrader.WPF.State.Navigators;
using OemanTrader.WPF.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace OemanTrader.WPF.Commands
{
public class UpdateCurrentViewModelCommand : ICommand
{
public event EventHandler? CanExecuteChanged;
private INavigator _navigator;
public UpdateCurrentViewModelCommand(INavigator navigator)
{
_navigator = navigator;
}
public bool CanExecute(object? parameter)
{
return true;
}
public void Execute(object? parameter)
{
if (parameter is ViewType)
{
ViewType viewType = (ViewType)parameter;
switch (viewType)
{
case ViewType.Home:
// OBS OBS
//_navigator.CurrentViewModel = new HomeViewModel(MajorIndexViewModel.LoadMajorIndexViewModel(new MajorIndexService()));
break;
case ViewType.Portfolio:
_navigator.CurrentViewModel = new PortfolioViewModel();
break;
default:
break;
}
}
}
}
}