private void editClick(object sender, RoutedEventArgs e) { EditEventArgs argevent = new EditEventArgs(); argevent.rootgroup = Group; argevent.newname = editname.Text; EditGroupName?.Invoke(this, argevent); //참고 EditGroupName?.Invoke(this, argevent); (?.은 앞의 변수가 null이면 무시) groupname.Text = argevent.newname; groupname.Visibility = Visibility.Visible; penb.Visibility = Visibility.Visible; editbutton.Visibility = Visibility.Hidden; editname.Visibility = Visibility.Hidden; }
//이벤트 시 실행 함수 부분 private void Gbox_EditGroupName(Object sender, EditEventArgs argevent) { MessageBox.Show(argevent.newname); }
//그룸의 이름을 수정할 시 private void Gbox_EditGroupName(Object sender, EditEventArgs argevent) { //root }
private void EditGroupNameSender(Object sender, EditEventArgs argevent) { EditGroupName?.Invoke(this, argevent); }