/// <summary> /// Création d'un nouveau ViewModel /// </summary> public AppViewModel( Services.IAstroService astroService, Services.IDialogService dialogService, Services.IResolverService resolverService ) { if (astroService == null) { throw new ArgumentNullException("astroService"); } if (dialogService == null) { throw new ArgumentNullException("dialogService"); } if (resolverService == null) { throw new ArgumentNullException("resolverService"); } this.AstroService = astroService; this.DialogService = dialogService; CurrentNatalChart = resolverService.CreateViewModel <NatalChartViewModel>(); }
/// <summary> /// Nouveau ViewModel principal /// </summary> public MainViewModel(Services.IAstroService astroService, Services.IDialogService dialogService, Services.IResolverService resolverService) : base(astroService, dialogService, resolverService) { NewNatalChartCommand = new RelayCommand(async() => { await NewNatalChart(); }); LoadNatalChartCommand = new RelayCommand(async() => { await LoadNatalChart(); }); SaveNatalChartCommand = new RelayCommand(async() => { await SaveNatalChart(); }); SaveAsNatalChartCommand = new RelayCommand(async() => { await SaveAsNatalChart(); }); CalculateNatalChartCommand = new RelayCommand(async() => { await CalculateNatalChart(); }); }