Example #1
0
 void OnShowQueryWindow(object sender, DatabaseConnectionInfoEventArgs e)
 {
     var model = GetQueryModel(e.ConnectionInfo);
     var viewModel = new QueryVM(model);
     viewModel.ConnectionInfo = e.ConnectionInfo;
     var window = new QueryWindow(viewModel);
     window.Show();
 }
Example #2
0
 void OnShowSchemaBrowserWindow(object sender, DatabaseConnectionInfoEventArgs e)
 {
     var model = GetSchemaBrowserModel(e.ConnectionInfo);
     ISchemaBrowserVM viewModel = new SchemaBrowserVM(model, new CodeGeneration.RazorEngine.Generator(), e.ConnectionInfo);
     viewModel.OnShowQueryWindow += OnShowQueryWindow;
     viewModel.OnShowConnectionManagerWindow += OnShowConnectionManagerWindow;
     viewModel.OnShowGenerateTableSqlWindow += ShowGenerateTableSqlWindow;
     viewModel.OnShowGenerateStoredProcWindow += ShowGenerateStoredProcWindow;
     viewModel.OnShowCodeGenerationWindow += ShowCodeGenerationWindow;
     viewModel.OnShowExportTableDialog += ShowExportTableDialog;
     var window = new SchemaBrowserWindow(viewModel);
     window.Show();
 }
Example #3
0
 void OnShowConnectionManagerWindow(object sender, DatabaseConnectionInfoEventArgs e)
 {
     ShowConnectionManager();
 }
Example #4
0
 private void ShowExportTableDialog(object sender, DatabaseConnectionInfoEventArgs e)
 {
     ITableExportSettingsModel settingsManager = new TableExportSettingsModel();
     var model = GetExportTableModel(e.ConnectionInfo);
     var viewModel = new ExportTableVm(e.ConnectionInfo, model, settingsManager);
     var window = new ExportTableDialog(viewModel);
     window.Show();
 }