private void BtnAddTime_Click(object sender, EventArgs e) { if (Action != null) { using (var form = new BoostTimeForm()) { form.ActionForm = this; form.ShowDialog(); } } }
private void BtnEditTime_Click(object sender, EventArgs e) { if (lsvBoostTime.SelectedItems.Count > 0) { var no = int.Parse(lsvBoostTime.SelectedItems[0].SubItems[0].Text); if (no > 0) { var boostTime = Action?.BoostTime.FirstOrDefault(s => s.No == no); if (boostTime != null) { using (var form = new BoostTimeForm()) { form.ActionForm = this; form.BoostTime = boostTime; form.ShowDialog(); } } } } }