Ejemplo n.º 1
0
        private void HandleSetContent(String filename)
        {
            _inUse = true;
            DiskFactory.DiskType diskType = DiskFactory.DiskType.UNSPECIFIED;

            if (File.Exists(filename))
            {
                if (new FileInfo(filename).Length > 3000000)
                {
                    diskType = DiskFactory.DiskType.HD;
                }
            }
            _disk = DiskFactory.CreateDisk(filename, diskType);
            List <LogicalEntity> names = _disk.GetItems();

            DisplayItems(names);
            _titleBar.Text = Path.GetFileName(filename);
        }
Ejemplo n.º 2
0
        private void lstFiles_ItemActivate(object sender, EventArgs e)
        {
            ListView      view   = (ListView)sender;
            Object        tag    = view.FocusedItem.Tag;
            LogicalEntity entity = tag as LogicalEntity;

            if (entity != null)
            {
                List <LogicalEntity> items = entity.GetItems();
                DisplayItems(items);
            }


            //BasicReader br = new BasicReader();
//            DiskReader.FileContents contents = _reader.ReadFile(view.FocusedItem.Text);
            //string[] test = br.Translate(data);
            //new FileReader(test).ShowDialog();
        }