private void label1_Click(object sender, EventArgs e)
        {
            File_information of = new File_information(parentform.root.ChildFile, parentform.fat);

            SetParent((int)of.Handle, (int)this.parentform.Handle);
            of.Show();
        }
        private void label190_DoubleClick(object sender, EventArgs e)
        {
            Label  label = (Label)sender;
            string str   = toolTip1.GetToolTip(label);

            int startIndex = str.IndexOf('r');
            int endIndex   = str.IndexOf('|');

            if (startIndex == -1 || endIndex == -1)
            {
                return;
            }
            else
            {
                BasicFile        file = FileFunction.GetInstance().searchFile(str.Substring(startIndex, endIndex - startIndex), parentform.root);
                List <BasicFile> list = new List <BasicFile>();
                if (file.Attr == 2)
                {
                    MessageBox.Show(parentform.disk_Content[Convert.ToInt32(label.Text)], "磁盘块内容", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    //Dictionary<string, BasicFile> dic = new Dictionary<string, BasicFile>();
                    //dic.Add(file.Name, file);
                    //File_information of = new File_information(dic);
                    //SetParent((int)of.Handle, (int)this.parentform.Handle);
                    //of.Show();
                }
                else
                {
                    File_information of = new File_information(file.ChildFile, parentform.fat);
                    SetParent((int)of.Handle, (int)this.parentform.Handle);
                    of.Show();
                }
            }
            //MessageBox.Show();
        }
Exemple #3
0
        private void 详细信息ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BasicFile clickedFile = getFileByItem(fileView.SelectedItems[0], fileView.View);

            if (clickedFile.Attr == 2)
            {
                Dictionary <string, BasicFile> list = new Dictionary <string, BasicFile>();
                list.Add(clickedFile.Name, clickedFile);
                File_information of = new File_information(list, parent.fat);
                of.Text = "详细信息";
                SetParent((int)of.Handle, (int)this.parent.Handle);
                of.Show();
            }
            else
            {
                File_information of = new File_information(clickedFile.ChildFile, parent.fat);
                SetParent((int)of.Handle, (int)this.parent.Handle);
                of.Text = "详细信息";
                of.Show();
            }
        }