private void BtAdd_Click(object sender, EventArgs e) { bool flag = !string.IsNullOrEmpty(this.txtMsg.Text) && !string.IsNullOrEmpty(this.txtUser.Text); if (flag) { NNoteInfo nNoteInfo = new NNoteInfo(); nNoteInfo.NoteName = this.txtUser.Text; nNoteInfo.NoteMsg = this.txtMsg.Text; nNoteInfo.SetRegion(this.SelectRegion); nNoteInfo.SetDateTime(DateTime.Now); nNoteInfo.FileLink = this._info.FileName; nNoteInfo.FileMD5Link = MD5Helper.GetFileMD5(this._info.LocalPath); this.AddItem(nNoteInfo); bool flag2 = this._info.Operation == EOperType.eFROM_SERVER_NOTCHANGE || this._info.Operation == EOperType.eUPD; if (flag2) { this._info.Operation = EOperType.eUPD; this._info.NotesList.Add(nNoteInfo); } else { this._info.NotesList.Add(nNoteInfo); } } }
private void AddItem(NNoteInfo note) { ListViewItem listViewItem = new ListViewItem(); listViewItem.Text = note.NoteName; listViewItem.SubItems.Add(note.GetCreateTime().ToShortTimeString()); listViewItem.SubItems.Add(note.GetRegion().RectToStr()); listViewItem.SubItems.Add(note.NoteMsg); listViewItem.SubItems.Add(note.FileLink); this._listnote.Items.Add(listViewItem); }
public void ShowNoteRegion(NNoteInfo note) { this._curHilightNote = note; this.pictureBox1.Refresh(); }