Пример #1
0
        private void ShowCreateDatabaseWindow()
        {
            var createDatabaseWindow = new CreateDatabaseWindow
            {
                DataContext = new CreateDatabaseWindowViewModel(_container)
            };

            createDatabaseWindow.ShowDialog();
            DatabasesListViewModel.LoadDatabases();
        }
Пример #2
0
        private async void LoadDatabaseMethod()
        {
            var loadFileDialog = new OpenFileDialog();

            bool?result = loadFileDialog.ShowDialog();

            if (result == true)
            {
                string filename = loadFileDialog.FileName;
                string content  = File.ReadAllText(filename);
                await _mediator.Send(new LoadSerializedDatabaseCommand { Content = content });

                DatabasesListViewModel.LoadDatabases();
            }
        }