/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addToolStripMenuItem_Click(object sender, EventArgs e) { InstalledVersion iv = new InstalledVersion(); using (FormEditInstalledVersion eiv = new FormEditInstalledVersion(model.Settings.InstalledVersions, iv)) { if (eiv.ShowDialog(this) == DialogResult.OK) { model.Settings.InstalledVersions.Add(iv); PopulateList(); } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void editToolStripMenuItem_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count == 1) { InstalledVersion iv = (InstalledVersion)listView1.SelectedItems[0].Tag; using (FormEditInstalledVersion eiv = new FormEditInstalledVersion(model.Settings.InstalledVersions, iv)) { if (eiv.ShowDialog(this) == DialogResult.OK) { PopulateList(); } } } }