コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
        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;
            }
        }