Пример #1
0
        private void 格式化ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            root_fcb        = new FCB();
            catalog         = new Catalog();
            folderStack     = new Stack <FCB>();
            bitMap          = new BitMap();
            current_catalog = root_fcb;

            UpdateView();
        }
Пример #2
0
        //格式化之后文件还在,记录删除,如果不被别的文件覆盖,文件内容可恢复
        private void 格式化ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            root_fcb            = new FCB();
            catalog             = new Catalog();
            bitMap              = new BitMap();
            current_catalog_fcb = root_fcb;

            UpdateListView();
            UpdateTreeView();
        }
Пример #3
0
        public void deserialize()
        {
            FileStream      fileStream1, fileStream2, fileStream3;
            BinaryFormatter b = new BinaryFormatter();

            fileStream1 = new FileStream(System.IO.Path.Combine(dir, "catalogTree.dat"), FileMode.Open, FileAccess.Read, FileShare.Read);
            root_fcb    = b.Deserialize(fileStream1) as FCB;
            fileStream1.Close();

            fileStream2 = new FileStream(System.IO.Path.Combine(dir, "catalogTable.dat"), FileMode.Open, FileAccess.Read, FileShare.Read);
            catalog     = b.Deserialize(fileStream2) as Catalog;
            fileStream2.Close();

            fileStream3 = new FileStream(System.IO.Path.Combine(dir, "bitMap.dat"), FileMode.Open, FileAccess.Read, FileShare.Read);
            bitMap      = b.Deserialize(fileStream3) as BitMap;
            fileStream3.Close();
        }