private void addNewSetButton_Click(object sender, EventArgs e) { bool isNewSet = true; string name = ""; var setName = new SetEditWindow(this, isNewSet, name); setName.Show(); }
/// <summary> /// DICTIONARY CONTROLS /// </summary> private void LaunchCreateOrEditSetWindow(object sender) { bool isNewSet = true; if (sender == editSetButton) { isNewSet = false; if (setsListBox.SelectedItem == null) { MessageBox.Show("Nie wybrano zestawu do edycji!", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } } DictionarySet selectedSet = (DictionarySet)setsListBox.SelectedItem; string name = selectedSet.Name; var setName = new SetEditWindow(this, isNewSet, name); setName.Show(); }