// Create an extension private void butAdd_Click(object sender, EventArgs e) { string item = lbMaster.SelectedItem.ToString(); if (ProfileEditor.CreateExtension(profile, item)) { lbProfile.Items.Add(lbMaster.SelectedItem); lbMaster.Items.RemoveAt(lbMaster.SelectedIndex); } }
// Remove an extension private void butDelete_Click(object sender, EventArgs e) { if (lbProfile.SelectedItem == null) { return; } string item = lbProfile.SelectedItem.ToString(); lbMaster.Items.Add(lbProfile.SelectedItem); lbProfile.Items.RemoveAt(lbProfile.SelectedIndex); ProfileEditor.RemoveExtension(profile, item); }
// Edit an extension private void extension_DoubleClick(object sender, EventArgs e) { string item = lbProfile.SelectedItem.ToString(); ProfileEditor.EditExtension(profile, item); }