Beispiel #1
0
        private void Paste_Click(object sender, RoutedEventArgs e)
        {
            CatalogItem cata         = copyCache.copy();
            File        originalFile = catalog_table.map(copyCache);
            File        copyFile     = originalFile.copy(copyCache);

            // duplocate a new file
            // get the content string
            List <int> seq    = originalFile.fetchContent();
            string     result = "";

            foreach (int i in seq)
            {
                result += disk.getDataBlock(i);
            }
            // write the content
            IndexTable table = disk.writeDisk(result);

            copyFile.indexTablePointer = table;

            // map the new file
            catalog_table.map(cata, copyFile);
            current_item.addSon(cata);
            UpdateListView(current_item);
        }