public MonitorTool() { InitializeComponent(); Icon = View.IconFromFile("/img/menu/tools-monitor-16.png"); SysIcons.GetSysIcons(treeview); int iso_normal = SysIcons.GetDiskIconIndex(); int dir_normal = SysIcons.GetDirIconIndex(false); int dir_select = SysIcons.GetDirIconIndex(true); int bin_normal = SysIcons.GetFileIconIndex("blank"); TreeNode root = treeview.Nodes.Add("GodHands", "GodHands", iso_normal, iso_normal); TreeNode view = root.Nodes.Add("GodHands/View", "View", dir_normal, dir_select); view.Nodes.Add("GodHands/View/DiskTool", "DiskTool", bin_normal, bin_normal); view.Nodes.Add("GodHands/View/Database", "Database", bin_normal, bin_normal); view.Nodes.Add("GodHands/View/Monitor", "Monitor", bin_normal, bin_normal); view.Nodes.Add("GodHands/View/Options", "Options", bin_normal, bin_normal); view.Nodes.Add("GodHands/View/LogFile", "LogFile", bin_normal, bin_normal); TreeNode model = root.Nodes.Add("GodHands/Model", "Model", dir_normal, dir_select); TreeNode model_disk = model.Nodes.Add("GodHands/Model/OnDisk", "OnDisk", dir_normal, dir_select); model_disk.Nodes.Add("GodHands/Model/OnDisk/PRG", "PRG", bin_normal, bin_normal); model_disk.Nodes.Add("GodHands/Model/OnDisk/DAT", "DAT", bin_normal, bin_normal); model_disk.Nodes.Add("GodHands/Model/OnDisk/SYD", "SYD", bin_normal, bin_normal); model_disk.Nodes.Add("GodHands/Model/OnDisk/ARM", "ARM", bin_normal, bin_normal); model_disk.Nodes.Add("GodHands/Model/OnDisk/ZND", "ZND", bin_normal, bin_normal); model_disk.Nodes.Add("GodHands/Model/OnDisk/MPD", "MPD", bin_normal, bin_normal); model_disk.Nodes.Add("GodHands/Model/OnDisk/ZUD", "ZUD", bin_normal, bin_normal); model_disk.Nodes.Add("GodHands/Model/OnDisk/SHP", "SHP", bin_normal, bin_normal); model_disk.Nodes.Add("GodHands/Model/OnDisk/WEP", "WEP", bin_normal, bin_normal); model_disk.Nodes.Add("GodHands/Model/OnDisk/SEQ", "SEQ", bin_normal, bin_normal); TreeNode model_mem = model.Nodes.Add("GodHands/Model/InMemory", "InMemory", dir_normal, dir_select); model_mem.Nodes.Add("GodHands/Model/InMemory/Zones", "Zones", bin_normal, bin_normal); model_mem.Nodes.Add("GodHands/Model/InMemory/Rooms", "Rooms", bin_normal, bin_normal); model_mem.Nodes.Add("GodHands/Model/InMemory/Actors", "Actors", bin_normal, bin_normal); model_mem.Nodes.Add("GodHands/Model/InMemory/MiniMaps", "MiniMaps", bin_normal, bin_normal); TreeNode system = root.Nodes.Add("GodHands/System", "System", dir_normal, dir_select); system.Nodes.Add("GodHands/System/Logger", "Logger", bin_normal, bin_normal); system.Nodes.Add("GodHands/System/Config", "Config", bin_normal, bin_normal); system.Nodes.Add("GodHands/System/Publisher", "Publisher", bin_normal, bin_normal); TreeNode undoredo = system.Nodes.Add("GodHands/System/UndoRedo", "UndoRedo", dir_normal, dir_select); undoredo.Nodes.Add("GodHands/System/UndoRedo/Undo", "Undo", bin_normal, bin_normal); undoredo.Nodes.Add("GodHands/System/UndoRedo/Redo", "Redo", bin_normal, bin_normal); }
public DiskTool() { InitializeComponent(); Icon = View.IconFromFile("/img/menu/tools-disk-16.png"); SysIcons.GetSysIcons(treeview); treeview.AllowDrop = true; treeview.ItemDrag += new ItemDragEventHandler(OnTreeDrag); treeview.DragEnter += new DragEventHandler(OnDrag); treeview.DragDrop += new DragEventHandler(OnDrop); sub_property = new Subscriber_PropertyGrid(property); sub_treeview = new Subscriber_DiskView("CD:ROOT", treeview); Logger.AddStatusBar(statusbar); Logger.AddProgressBar(progressbar); OpenDisk(); }
public bool Notify(object obj) { win.Nodes.Clear(); this.obj = obj; if (obj != null) { string volume = Iso9660.pvd.VolumeIdentifier.Trim(); TreeNode root = win.Nodes.Add("CD:PVD", "CDROM"); root.ImageIndex = SysIcons.GetDiskIconIndex(); root.SelectedImageIndex = root.ImageIndex; TreeNode node = root.Nodes.Add("CD:ROOT", volume); node.ImageIndex = SysIcons.GetDiskIconIndex(); node.SelectedImageIndex = node.ImageIndex; return(Iso9660.EnumFileSys(new EnumDiskView(node))); } return(true); }
public bool Visit(string url, DirRec dir) { string name = dir.GetFileName(); TreeNode leaf = node.Nodes.Add(url, name); if (dir.FileFlags_Directory) { leaf.ImageIndex = SysIcons.GetDirIconIndex(false); leaf.SelectedImageIndex = SysIcons.GetDirIconIndex(true); Iso9660.EnumDir(url, dir, new EnumDiskView(leaf)); } else { int icon = SysIcons.GetFileIconIndex(name); leaf.ImageIndex = leaf.SelectedImageIndex = icon; } return(true); }