Ejemplo n.º 1
0
        public void SelectDB(Form owner)
        {
            DBSelectionForm selectionDialog = new DBSelectionForm();

            if (Settings.Default.Bases == null)
            {
                Settings.Default.Bases = new StringCollection();
            }
            selectionDialog.Databases = Settings.Default.Bases;
            if (selectionDialog.ShowDialog(owner) != DialogResult.OK)
            {
                return;
            }

            /*if(MessageBox.Show("Сделать выбранную базу базой по умолчанию?", "", MessageBoxButtons.YesNo)== DialogResult.Yes)
             * {
             * }*/
            Settings.Default["DefaultCutOptimaConnectionString"] =
                Settings.Default.CutOptimaConnectionString       = Settings.Default.Bases[selectionDialog.CurrentDB];
            Settings.Default.Save();
        }
Ejemplo n.º 2
0
 public DialogResult ShowDialog(IWin32Window owner)
 {
     _form = new DBSelectionForm(this);
     return(_form.ShowDialog(owner));
 }
Ejemplo n.º 3
0
		public DialogResult ShowDialog(IWin32Window owner)
		{
			_form = new DBSelectionForm(this);
			return _form.ShowDialog(owner);
		}
Ejemplo n.º 4
0
		public void SelectDB(Form owner)
		{
            DBSelectionForm selectionDialog = new DBSelectionForm();
			if (Settings.Default.Bases == null)
			{
				Settings.Default.Bases = new StringCollection();
			}
			selectionDialog.Databases = Settings.Default.Bases;
			if (selectionDialog.ShowDialog(owner) != DialogResult.OK)
				return;
			/*if(MessageBox.Show("—делать выбранную базу базой по умолчанию?", "", MessageBoxButtons.YesNo)== DialogResult.Yes)
			{
			}*/
			Settings.Default["DefaultConnectionString"] =
				Settings.Default.ConnectionString = Settings.Default.Bases[selectionDialog.CurrentDB];
			Settings.Default.Save();
		}