private void dataGrid_CellClick(object sender, DataGridViewCellEventArgs e) { try { //要处理的的notes所在行 int selectIndex = e.RowIndex; //要处理的notes的id //int notesID = int.Parse(this.LstView.Items[selectIndex].Tag.ToString()); string notesTitle = mResult[selectIndex, 3].oContent.ToString(); string notesContent = mResult[selectIndex, 4].oContent.ToString(); string notesProcesser = mResult[selectIndex, 8].oContent.ToString(); string notesProcessDate = mResult[selectIndex, 6].oContent.ToString(); string notesProcessContent = mResult[selectIndex, 9].oContent.ToString(); int xPos = MousePosition.X; int yPos = MousePosition.Y; //if (isOpenPInfoWindow) //{ //notesProcessInfoClone.Close(); //} NoteProcessInfo notesProcessInfo = new NoteProcessInfo(notesTitle, notesContent, notesProcesser, notesProcessDate, notesProcessContent, xPos, yPos, config); //notesProcessInfoClone = notesProcessInfo; notesProcessInfo.NotesTitle = notesTitle; notesProcessInfo.NotesContent = notesContent; notesProcessInfo.NotesProcesser = notesProcesser; notesProcessInfo.NotesProcessDate = notesProcessDate; notesProcessInfo.NotesProcessContent = notesProcessContent; notesProcessInfo.XPos = xPos; notesProcessInfo.YPos = yPos; notesProcessInfo.ShowDialog(); } catch (Exception ex) { //MessageBox.Show(ex.Message); } }
private void dataGrid_CellClick(object sender, DataGridViewCellEventArgs e) { selectIndex = e.RowIndex; try { string notesTitle = mResult[selectIndex, 3].oContent.ToString(); string notesContent = mResult[selectIndex, 4].oContent.ToString(); string notesProcesser = ""; string notesProcessDate = ""; string notesProcessContent = ""; int xPos = MousePosition.X; int yPos = MousePosition.Y; //if (isOpenPInfoWindow) //{ //notesProcessInfoClone.Close(); //} NoteProcessInfo notesProcessInfo = new NoteProcessInfo(notesTitle, notesContent, notesProcesser, notesProcessDate, notesProcessContent, xPos, yPos, config); //notesProcessInfoClone = notesProcessInfo; notesProcessInfo.NotesTitle = notesTitle; notesProcessInfo.NotesContent = notesContent; notesProcessInfo.NotesProcesser = ""; notesProcessInfo.NotesProcessDate = ""; notesProcessInfo.NotesProcessContent = ""; notesProcessInfo.XPos = xPos; notesProcessInfo.YPos = yPos; notesProcessInfo.ShowDialog(); } catch (Exception ex) { //MessageBox.Show(ex.Message); } }