Esempio n. 1
0
        private void ProfileDeleteButton_Click(object sender, EventArgs e)
        {
            DatabaseSetting DBSet = FindDBSetting(this.ProfileComboBox.Text);

            if (DBSet == null)
            {
                this.ProfileComboBox.Text         = "";
                this.MSSQLServerNameComboBox.Text = "";
                this.MSSQLLogin.Text         = "";
                this.MSSQLPass.Text          = "";
                this.WinAuthCheckBox.Checked = true;
                this.QueryTextBox.Text       = "";
                this.QueryUpdateTime.Text    = "30";
            }
            else
            {
                this.ProfileComboBox.Text         = "";
                this.MSSQLServerNameComboBox.Text = "";
                this.MSSQLLogin.Text         = "";
                this.MSSQLPass.Text          = "";
                this.WinAuthCheckBox.Checked = true;
                this.QueryTextBox.Text       = "";
                this.QueryUpdateTime.Text    = "30";
                this.ProfileComboBox.Text    = "";
                this.ProfileComboBox.Items.Remove(DBSet.SettingName);
                AllDatabaseSettings.DeleteDatabaseSetting(DBSet);
                SaveIntoReg();
            }
        }