/// <summary> /// Nézetmodell példányosítása. /// </summary> /// <param name="model">A modell.</param> public LoginViewModel(ICarServiceModel model) { if (model == null) { throw new ArgumentNullException(nameof(model)); } _model = model; UserName = String.Empty; ExitCommand = new DelegateCommand(param => OnExitApplication()); LoginCommand = new DelegateCommand(param => LoginAsync(param as PasswordBox)); }
public MainViewModel(ICarServiceModel model) { if (model == null) { throw new ArgumentNullException("model"); } _model = model; LoadAsync(); LoadCommand = new DelegateCommand(param => LoadAsync()); SaveCommand = new DelegateCommand(param => SaveAsync()); OpenEditorCommand = new DelegateCommand(param => EditWorksheet(param as AppointmentDTO)); CloseWorksheetCommand = new DelegateCommand(param => CloseWorksheet()); SaveWorksheetCommand = new DelegateCommand(param => SaveWorksheet()); CancelWorksheetCommand = new DelegateCommand(param => CancelWorksheet()); //ExitCommand = new DelegateCommand(param => OnExitApplication()); LogoutCommand = new DelegateCommand(param => OnLogout()); AddWorkItemCommand = new DelegateCommand(param => AddWorkItem()); DeleteWorkItemCommand = new DelegateCommand(param => DeleteWorkItem()); }
private void App_Startup(object sender, StartupEventArgs e) { _model = new CarServiceModel(new CarServicePersistence("https://localhost:44300/")); // megadjuk a szolgáltatás címét ShowLoginWindow(); }