コード例 #1
0
        private void listViewApplications_DoubleClick(object sender, EventArgs e)
        {
            Point mousePosition     = listViewApplications.PointToClient(Control.MousePosition);
            ListViewHitTestInfo hit = listViewApplications.HitTest(mousePosition);
            int columnindex         = hit.Item.SubItems.IndexOf(hit.SubItem);

            switch (columnindex)
            {
            case 4:     // URL
                DisplayURLForm DisplayURLForm = new DisplayURLForm();
                DisplayURLForm.URL = listViewApplications.SelectedItems[0].SubItems[columnindex].Text;
                DisplayURLForm.ShowDialog(this);
                break;

            case 5:     // Body of Advertisement
                DisplayBodyForm DisplayBodyForm = new DisplayBodyForm();
                DisplayBodyForm.Body = listViewApplications.SelectedItems[0].SubItems[columnindex].Text;
                DisplayBodyForm.ShowDialog(this);
                break;

            case 6:     //CV
                DisplayCV displayCV = new DisplayCV();
                displayCV.CVbody = Convert.FromBase64String(listViewApplications.SelectedItems[0].SubItems[columnindex].Text);
                displayCV.ShowDialog(this);
                break;
            }
        }
コード例 #2
0
        private void ListViewActivities_DoubleClick(object sender, EventArgs e)
        {
            Point mousePosition     = listViewActivities.PointToClient(Control.MousePosition);
            ListViewHitTestInfo hit = listViewActivities.HitTest(mousePosition);
            int columnindex         = hit.Item.SubItems.IndexOf(hit.SubItem);

            switch (columnindex)
            {
            case 2:     //Regarding
                DisplayApplicationForm appForm = new DisplayApplicationForm();
                appForm.DataFile  = DataStoreLayer.GetFileNameFromTitle(listViewActivities.SelectedItems[0].SubItems[columnindex].Text);
                appForm.MdiParent = this.MdiParent;

                if (this.MdiParent.MdiChildren.Length > 2)
                {
                    this.MdiParent.MdiChildren[2].Close();
                }
                appForm.Show();
                appForm.MdiParent.MdiChildren[2].Activate();
                break;

            case 5:     //Body
                DisplayBodyForm DisplayBodyForm = new DisplayBodyForm();
                DisplayBodyForm.Body = listViewActivities.SelectedItems[0].SubItems[columnindex].Text;
                DisplayBodyForm.ShowDialog(this);
                break;
            }
        }