public TagArchiveNodeSource(string name, GameDefinition game, IDocumentManager documentManager, DisplayItems items, DefaultState defaultState) : base(name) { this.game = game; Library.FileAdded += new EventHandler <LibraryFileActionArgs>(Library_FileAdded); this.items = items; // Add NodeTypes if ((items & DisplayItems.AllExtractedItems) > 0) { AddNodeType(CreateNodeType <RootNodeType>(defaultState)); FolderNodeType folder = CreateNodeType <FolderNodeType>(Resources.folder16, Resources.folder_closed16); AddNodeType(folder); FileNodeType file = CreateNodeType <FileNodeType>(Resources.document16); file.AddNodeState(new DocumentOpenState(documentManager, game.GameID, TagLocation.Archive, Resources.document_view16, Resources.document_view16, Color.Blue, Color.White)); AddNodeType(file); ObjectFileNodeType objectFile = CreateNodeType <ObjectFileNodeType>(Resources.data16); objectFile.AddNodeState(new DocumentOpenState(documentManager, game.GameID, TagLocation.Archive, Resources.data_view16, Resources.data_view16, Color.Blue, Color.White)); AddNodeType(objectFile); ModelFileNodeType modelFile = CreateNodeType <ModelFileNodeType>(Resources.cube_molecule16); modelFile.AddNodeState(new DocumentOpenState(documentManager, game.GameID, TagLocation.Archive, Resources.cube_molecule_view16, Resources.cube_molecule_view16, Color.Blue, Color.White)); AddNodeType(modelFile); SbspFileNodeType sbspFile = CreateNodeType <SbspFileNodeType>(Resources.environment16); sbspFile.AddNodeState(new DocumentOpenState(documentManager, game.GameID, TagLocation.Archive, Resources.environment_view16, Resources.environment_view16, Color.Blue, Color.White)); AddNodeType(sbspFile); ScenarioFileNodeType scenarioFile = CreateNodeType <ScenarioFileNodeType>(Resources.earth16); scenarioFile.AddNodeState(new DocumentOpenState(documentManager, game.GameID, TagLocation.Archive, Resources.earth_view16, Resources.earth_view16, Color.Blue, Color.White)); AddNodeType(scenarioFile); AttachedScriptNodeType attachedScript = CreateNodeType <AttachedScriptNodeType>(Resources.text_code_colored16); attachedScript.AddNodeState(new DocumentOpenState(documentManager, game.GameID, TagLocation.Archive, Resources.text_view16, Resources.text_view16, Color.Blue, Color.White)); AddNodeType(attachedScript); } if ((items & DisplayItems.AllUnextractedItems) > 0) { AddNodeType(CreateNodeType <UnextractedRootNodeType>(defaultState)); UnextractedFolderNodeType unextractedfolder = CreateNodeType <UnextractedFolderNodeType>( new DefaultState(Resources.folder16, Resources.folder_closed16, Color.Gray, Color.White)); AddNodeType(unextractedfolder); UnextractedFileNodeType unextractedfile = CreateNodeType <UnextractedFileNodeType>( new DefaultState(Resources.document_text16, Resources.document_text16, Color.Gray, Color.White)); AddNodeType(unextractedfile); } }
private TreemapItem(TreemapItem file, TreemapItem parent) { this.parent = parent; int count = file.ChildCount; children = new List <TreemapItem>(count); for (int i = 0; i < count; i++) { children.Add(new TreemapItem(file[i], this)); } children.Sort(CompareReverse); children.Sort(Compare); size = file.Size; extension = file.Extension + ""; name = file.name + ""; type = file.type; color = file.Color; }
protected FolderNode(Win32.Win32FindData find, FileNodeType type, FileNodeFlags rootType) : base(find, type, rootType) { }
protected FolderNode(FileSystemInfo info, FileNodeType type, FileNodeFlags rootType) : base(info, type, rootType) { }
protected FolderNode(INtfsNode node, FileNodeType type, FileNodeFlags rootType) : base(node, type, rootType) { }
protected FolderNode(string name, FileNodeType type, FileNodeFlags rootType) : base(name, type, rootType) { }
public FileNode(string name, FileNodeType type) { Name = name; Type = type; Childs = new List <FileNode>(); }