예제 #1
0
        private void OpenAddDialog()
        {
            AddDialogWindow addDialogWindow = new AddDialogWindow();

            addDialogWindow.ShowDialog();

            Document.Add(addDialogWindow.Abonent);
        }
예제 #2
0
        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());
        }