private void ListView_DoubleClick(object sender, EventArgs e) { Point cursorPoint = this.ListView.PointToClient(Cursor.Position); ListViewItem listViewItem = this.ListView.GetItemAt(cursorPoint.X, cursorPoint.Y); if (listViewItem == null) { return; } DocumentFormSub1Form outDocumentFormSub1Form = null; if (m_AllDocumenFormInfo.TryGetValue(listViewItem, out outDocumentFormSub1Form) == false) { outDocumentFormSub1Form = new DocumentFormSub1Form(); m_AllDocumenFormInfo.Add(listViewItem, outDocumentFormSub1Form); outDocumentFormSub1Form.Show(); } else { if (outDocumentFormSub1Form.Visible == true) { outDocumentFormSub1Form.Activate(); } else { outDocumentFormSub1Form.Visible = true; } } }
private void ListView_DoubleClick( object sender, EventArgs e ) { Point cursorPoint = this.ListView.PointToClient( Cursor.Position ); ListViewItem listViewItem = this.ListView.GetItemAt( cursorPoint.X, cursorPoint.Y ); if ( listViewItem == null ) return; DocumentFormSub1Form outDocumentFormSub1Form = null; if ( m_AllDocumenFormInfo.TryGetValue( listViewItem, out outDocumentFormSub1Form ) == false ) { outDocumentFormSub1Form = new DocumentFormSub1Form(); m_AllDocumenFormInfo.Add( listViewItem, outDocumentFormSub1Form ); outDocumentFormSub1Form.Show(); } else { if ( outDocumentFormSub1Form.Visible == true ) outDocumentFormSub1Form.Activate(); else outDocumentFormSub1Form.Visible = true; } }