protected ResourceWrapper(string text, TResource resource) : base(text) { Resource = resource; FileType = SupportedFileManager.GetSupportedFileType(typeof(TResource)); Initialize(); PopulateViewFully(); mInitialized = true; }
protected ResourceWrapper(string text, TResource resource) : base(text) { Console.WriteLine($"{this}: Creating wrapper for {resource}"); Resource = resource; FileType = SupportedFileManager.GetSupportedFileType(typeof(TResource)); Initialize(); PopulateViewFully(); mInitialized = true; }
protected override void Initialize() { CommonContextMenuOptions = CommonContextMenuOptions.Add | CommonContextMenuOptions.Move | CommonContextMenuOptions.Rename | CommonContextMenuOptions.Delete; RegisterFileAddAction(SupportedFileManager.GetSupportedFileType(typeof(TResource)), DefaultFileAddAction); RegisterRebuildAction(wrap => { List <TResource> list = new List <TResource>(); foreach (IResourceWrapper node in Nodes) { list.Add((TResource)node.Resource); } return(list); }); PostInitialize(); }