Exemple #1
0
        private void deleteProfileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string       currentProfileName = currentProfile.ProfileName;
            DialogResult dResTest;

            dResTest = MessageBox.Show("Are you sure you want to delete this Profile ?", "Confirm Profile Deletion", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (dResTest == DialogResult.No)
            {
                return;
            }
            else
            {
                comboBoxProfiles.Items.Remove(currentProfile.ProfileName);
                comboBoxProfiles.SelectedItem = null;
                man.DeleteProfile(currentProfile);
                currentProfile                        = null;
                textBoxProfileName.Text               = "";
                xmlEditor1.Text                       = "";
                textBoxProfileName.Enabled            = true;
                comboBoxConnectionSource.SelectedItem = null;
                toolStripStatusLabel1.Text            = "Profile " + currentProfileName + " deleted";
            }
        }