Пример #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();
        }
Пример #2
0
 public DialogResult ShowDialog(IWin32Window owner)
 {
     _form = new DBSelectionForm(this);
     return(_form.ShowDialog(owner));
 }
Пример #3
0
		public DialogResult ShowDialog(IWin32Window owner)
		{
			_form = new DBSelectionForm(this);
			return _form.ShowDialog(owner);
		}
Пример #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();
		}