//공지사항 목록 아이템 선택 private void listView_SelectedIndexChanged(object sender, EventArgs e) { try { if (listView.SelectedItems.Count != 0) { ListViewItem mitem = listView.SelectedItems[0]; NoticeObj notice = (NoticeObj)mitem.Tag; //실시간 공지사항 수신시 확인결과 전송 처리 Notice nform = new Notice(connection, notice); nform.Show(); nform.Activate(); this.TopMost = false; mitem.Selected = false; } } catch (Exception exception) { Logger.error(exception.ToString()); } }
private void delNRnotice(int rowIndex) { try { NumberedNoticeObj obj = (NumberedNoticeObj)dgv_notice.Rows[rowIndex].Tag;//n|메시지|발신자id|mode|seqnum|title //실시간 공지사항 수신시 확인결과 전송 처리 Notice nform = new Notice(connection, obj.ToNoticeObj()); nform.Show(); nform.Activate(); connection.SendMsgDeleteUnReadOnChecked(obj.SeqNum); dgv_notice.Rows.RemoveAt(rowIndex); noticeCnt = noticeCnt - 1; if (noticeCnt >= 0) { if (noticeCnt == 0) panel_notice.Enabled = false; label_notice.Text = "부재중 공지(" + noticeCnt + ")"; connection.UpdateUnCheckedData(-1, noticeCnt, -1, -1); } } catch (Exception exception) { Logger.error(exception.ToString()); } }
private void ShowNoticeDirect(string[] tempMsg) { //n|메시지 | 발신자id | mode | noticetime |제목 try { if (tempMsg.Length > 5) { string nname = GetUserName(tempMsg[2]); Notice nform = new Notice(); if (tempMsg[0].Equals("n")) { //실시간 공지사항 수신시 확인결과 전송 처리 nform.NoticeAlreadyRead += sendReadNotice; } nform.SetNoticeInfo(/*title*/tempMsg[5], /*content*/tempMsg[1], /*writerId*/ tempMsg[2], /*writerName*/ nname, /*tagKey*/ tempMsg[4]); nform.Show(); nform.Activate(); if (!tempMsg[0].Equals("r")) { nform.DoFlashWindow(); } } else { logWrite("메시지 배열 크기 작음 : " + tempMsg.Length.ToString()); } } catch (Exception exception) { logWrite(exception.ToString()); } }
/// <summary> /// 공지사항 리스트 폼 생성 /// </summary> /// <param name="tempMsg"></param> private void ShowNotice(string[] tempMsg) { //n|메시지 | 발신자id | mode | noticetime |seqnum| 제목 try { if (tempMsg.Length > 6) { string nname = GetUserName(tempMsg[2]); Notice nform = new Notice(); if (tempMsg[0].Equals("r")) { //부재중 공지사항 리스트에서 수신 //nform.btn_confirm.MouseClick += new MouseEventHandler(btn_confirm_Click); } else {//실시간 공지사항 수신시 확인결과 전송 처리 nform.btn_confirm.MouseClick += new MouseEventHandler(sendReadNotice); } nform.SetNoticeInfo(/*title*/tempMsg[6], /*content*/tempMsg[1], /*writerId*/ tempMsg[2], /*writerName*/ nname, /*tagKey*/ tempMsg[4]); nform.Show(); nform.Activate(); if (!tempMsg[0].Equals("r")) { nform.DoFlashWindow(); } } else { logWrite("메시지 배열 크기 작음 : " + tempMsg.Length.ToString()); } } catch (Exception exception) { logWrite(exception.ToString()); } }
//n|���� | �߽���id | mode | noticetime |���� private void ShowNoticeDirect(string[] tempMsg) { try { if (tempMsg.Length > 5) { string nname = getName(tempMsg[2]); Notice nform = new Notice(); if (tempMsg[0].Equals("n"))//�ǽð� �������� ���Ž� Ȯ�ΰ�� ���� ó�� { nform.btn_confirm.MouseClick += new MouseEventHandler(sendReadNotice); } nform.FormClosing += new FormClosingEventHandler(nform_FormClosing); string content = tempMsg[1]; nform.textBox.Text = content; nform.label_noticetitle.Tag = tempMsg[2]; nform.label_notice_sender.Text = nname; nform.label_noticetitle.Text = tempMsg[5]; if (tempMsg[3].Equals("e") || tempMsg[3].Equals("���")) { nform.pbx_notice_e.Visible = true; } else { nform.pbx_notice_n.Visible = true; } nform.Tag = tempMsg[4]; nform.Show(); nform.Activate(); if (!tempMsg[0].Equals("r")) { nform.flash(); } } else { logWrite("���� �迭 ũ�� ���� : " + tempMsg.Length.ToString()); } } catch (Exception exception) { logWrite(exception.ToString()); } }
/// <summary> /// 실시간 공지사항 수신 /// </summary> private void PopUpNoticeOnInstantNoticeReceived(object sender, CustomEventArgs e) //n|메시지 | 발신자id | mode | noticetime |제목 { try { NoticeObj obj = (NoticeObj)e.GetItem; Notice nform = new Notice(connection, obj); nform.Show(); nform.Activate(); } catch (Exception exception) { Logger.error(exception.ToString()); } }