/// <summary> /// Constructor using dependency injection /// </summary> public MainWindowViewModel( ICustomerRepository customerRepository, IProductRepository productRepository, IUpdateService updateService, IMessageBoxService messageBoxService, IAppDialogService appDialogService, IOpenFileDialogService openFileDialogService, ISaveFileDialogService saveFileDialogService, ILocalizationService localizationService) : base(localizationService) { _customerRepository = customerRepository; _productRepository = productRepository; _updateService = updateService; _messageBoxService = messageBoxService; _appDialogService = appDialogService; _openFileDialogService = openFileDialogService; _saveFileDialogService = saveFileDialogService; OpenFileCommand = new RelayCommand(OpenFileDialog); SaveFileCommand = new RelayCommand(SaveFileDialog); CloseCommand = new RelayCommand(OnRequestClose); OpenAboutCommand = new RelayCommand(OpenAboutDialog); OpenLanguageOptionsCommand = new RelayCommand(OpenLanguageOptions); UpdateCommand = new RelayCommand(Update); }
public ShellViewModel( IBangumiClient client, IUserService userService, IAppDialogService appDialogService, IAppToastService appToastService, IAppCache appCache, IMessenger messenger) { _client = client; _userService = userService; _appDialogService = appDialogService; _appToastService = appToastService; _appCache = appCache; _messenger = messenger; if (IsSignIn) { LoadUser(); } }