public bool ShowEditConnectionDialog (IDbFactory factory, DatabaseConnectionSettings settings, out DatabaseConnectionSettings newSettings) { DatabaseConnectionSettingsDialog dlg = new DatabaseConnectionSettingsDialog (factory, settings); bool result = RunDialog (dlg); if (result) newSettings = dlg.ConnectionSettings; else newSettings = null; return result;
bool IGuiProvider.ShowEditConnectionDialog(IDbFactory factory, DatabaseConnectionSettings settings, out DatabaseConnectionSettings newSettings) { DatabaseConnectionSettingsDialog dlg = new DatabaseConnectionSettingsDialog(factory, settings); bool result = RunDialog (dlg); if (result) newSettings = dlg.ConnectionSettings; else newSettings = null; Console.WriteLine("start edit connection dialog"); return result; }
protected void OnEditConnection () { DatabaseConnectionContext context = (DatabaseConnectionContext) CurrentNode.DataItem; DatabaseConnectionSettingsDialog dlg = new DatabaseConnectionSettingsDialog (context.ConnectionSettings); if (dlg.Run () == (int)ResponseType.Ok) { ConnectionContextService.EditDatabaseConnectionContext (context); OnRefreshConnection (); } dlg.Destroy (); }
public bool ShowAddConnectionDialog (IDbFactory factory) { DatabaseConnectionSettingsDialog dlg = new DatabaseConnectionSettingsDialog (factory); return RunDialog (dlg);
protected void OnAddConnection () { DatabaseConnectionSettingsDialog dlg = new DatabaseConnectionSettingsDialog (); if (dlg.Run () == (int)ResponseType.Ok) ConnectionContextService.AddDatabaseConnectionContext (dlg.ConnectionSettings); dlg.Destroy (); }
protected virtual void NewClicked (object sender, System.EventArgs e) { DatabaseConnectionSettingsDialog dlg = new DatabaseConnectionSettingsDialog (true); if (dlg.Run () == (int)ResponseType.Ok) { DatabaseConnectionContext context = new DatabaseConnectionContext (dlg.ConnectionSettings, true); context.IsTemporary = true; comboConnections.AddDatabaseConnectionContext (context); comboConnections.DatabaseConnection = context; } }