Пример #1
0
        //将被选中的项取出并传进folderView中,folderView为ShowDialog
        private void 查看详细信息ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int        i    = Folder_listBox.SelectedIndex;
            folderView form = new folderView((Folder)this.FolderArray[i]);

            form.ShowDialog();
            form.Dispose();
            System.GC.Collect();
        }
Пример #2
0
        //双击指定项后打开对应folder类的folderView窗体
        private void Folder_listBox_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            Point point = new Point(e.X, e.Y);

            if (e.Button == MouseButtons.Left)
            {
                int posindex = Folder_listBox.IndexFromPoint(point);
                if (posindex == -1)
                {
                    return;
                }
                Folder_listBox.SelectedIndex = posindex;
                folderView form = new folderView((Folder)this.FolderArray[posindex]);
                form.ShowDialog();
                form.Dispose();
                System.GC.Collect();
            }
        }