private void ButtonAddNew_Click(object sender, EventArgs e) { settingsIdsKey++; FormEditPing formEditPing = new FormEditPing(this, settingsIdsKey, true, null); formEditPing.Show(); formEditPing.Dispose(); }
private void ToolStripMenuItemAdd_Click(object sender, EventArgs e) { settingsIdsKey++; FormEditPing formEditPing = new FormEditPing(this, settingsIdsKey, true, null); formEditPing.Show(); formEditPing.Dispose(); }
private void ToolStripMenuItemEdit_Click(object sender, EventArgs e) { if (listViewPings.SelectedItems.Count > 0) { ListViewItem selected = listViewPings.SelectedItems[0]; int.TryParse(selected.Name, out int reservedId); FormEditPing formEditPing = new FormEditPing(this, reservedId, false, AllPings[reservedId]); formEditPing.Show(); formEditPing.Dispose(); } }