コード例 #1
0
		
		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;
コード例 #2
0
        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;
        }
コード例 #3
0
		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 ();
		}
コード例 #4
0
		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 ();
		}
コード例 #6
0
		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;
			}
		}