private void OpenAddDialog() { AddDialogWindow addDialogWindow = new AddDialogWindow(); addDialogWindow.ShowDialog(); Document.Add(addDialogWindow.Abonent); }
public MainWindowViewModel(AppSettings appSettings, MultiDriveClientsService multiDriveClientsService) { _appSettings = appSettings; _multiDriveClientsService = multiDriveClientsService; AddCommand = new DelegateCommand(() => { var dialog = new AddDialogWindow(); dialog.ShowDialog(); UpdateSessions(); }); InitializeViewModelCommand = new DelegateCommand(() => OnInitialized()); OnClosingCommand = new DelegateCommand(() => _multiDriveClientsService.StopAll()); }