Beispiel #1
0
        public const int BLOCK_CONTENT_LENGTH = 12;             //块的数据容量度量

        public FileShow(FAT _disk, FCB _currentFile)
        {
            InitializeComponent();

            disk        = _disk;
            currentFile = _currentFile;

            FileName_Text.Text = currentFile.name;
            FileSize_Text.Text = Convert.ToString(currentFile.size);

            FileContent_Text.Text = disk.ExtractFileContent(currentFile);
        }
Beispiel #2
0
        private void Format_Button_Click(object sender, RoutedEventArgs e)
        {
            Recursion_Delete(rootFolder);
            disk = null;
            GC.Collect();

            FCBID = 0;
            disk  = new FAT(blockNum);

            rootFolder = new FCB(Type.Folder, "root", 1, ++FCBID);
            disk.AddNewFCB(rootFolder);

            Init();
        }
Beispiel #3
0
        private FCB currentDirectory = null;                    //当前所在目录地址

        //private ContextMenu rightClickMenu;                   //右键菜单

        //private FCB operatingFolder = null;                   //当前正在操作的文件夹

        //private FCB currentFile = null;                       //当前正在操作的文件

        public FolderShow(int _blockNum)
        {
            InitializeComponent();

            blockNum = _blockNum;

            FCBID = 0;
            disk  = new FAT(blockNum);

            rootFolder = new FCB(Type.Folder, "root", 1, ++FCBID);
            disk.AddNewFCB(rootFolder);

            Init();
        }
Beispiel #4
0
        //利用重载实现Load
        public FolderShow(string systemPath)
        {
            InitializeComponent();

            StreamReader reader = new StreamReader(systemPath + "\\BlockNum.dat");

            blockNum = Convert.ToInt16(reader.ReadLine());

            FCBID = 0;
            disk  = new FAT(blockNum);

            SystemRecover(systemPath);

            Init();
        }