/// <summary> /// 리스트 추가 버튼 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddListButton_Click(object sender, EventArgs e) { AddListForm addListForm = new AddListForm(PathList.logPath); #region ### 폼 중복 열기 방지 foreach (Form openForm in Application.OpenForms) { if (openForm.Name == "AddListForm") { openForm.Activate(); return; } } #endregion addListForm.AddListFormCloseEvent += new AddListForm.AddListFormCloseHandler(ListEvent); addListForm.ShowDialog(); }
/// <summary> /// 리스트 수정 버튼 클릭 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ModifyListButton_Click(object sender, EventArgs e) { try { if (VideoCartListView.SelectedItems.Count > 0) { int index = VideoCartListView.FocusedItem.Index; string cartName = VideoCartListView.Items[index].Text; AddListForm addListForm = new AddListForm(cartName, listDictionary[cartName]); addListForm.ModifyListFormCloseEvent += new AddListForm.ModifyListFormCloseHandler(ModifyEvent); addListForm.ShowDialog(); } else { MessageBox.Show("선택된 항목이 없습니다."); } } catch (Exception ex) { MessageBox.Show("[에러발생] 리스트 수정 중 에러가 발생하였습니다. 관리자에게 문의해주세요."); log.WriteLog("[Error] : In the Video Cart List (Modify) \n" + ex); } }