Esempio n. 1
0
        protected bool SetResourceMaps(ResourceMaps maps, bool selectevent, bool dontselect, bool nosave)
        {
            last = maps;
            if (FileTable.WrapperRegistry != null)
            {
                tv.ImageList      = FileTable.WrapperRegistry.WrapperImageList;
                tv.StateImageList = tv.ImageList;
            }
            if (!nosave)
            {
                SaveLastSelection();
            }

            this.Clear();
            firstnode = builder.BuildNodes(maps);
            tv.Nodes.Add(firstnode);
            firstnode.Expand();

            allowselectevent = selectevent;
            if (!dontselect && ((maps.Everything.Count <= Helper.WindowsRegistry.BigPackageResourceCount || Helper.WindowsRegistry.ResoruceTreeAllwaysAutoselect)))
            {
                if (!SelectID(firstnode, builder.LastSelectedId))
                {
                    SelectAll();
                    allowselectevent = true;
                    return(false);
                }
            }

            allowselectevent = true;
            return(true);
        }
Esempio n. 2
0
        public override ResourceTreeNodeExt BuildNodes(ResourceMaps maps)
        {
            ResourceTreeNodeExt tn = new ResourceTreeNodeExt(0, maps.Everything, SimPe.Localization.GetString("AllRes"));

            AddInstances(maps.ByInstance, tn, true, true);

            tn.ImageIndex = 0;
            return(tn);
        }
Esempio n. 3
0
        public ResourceViewManager()
        {
            InitializeComponent();

            maps = new ResourceMaps();
        }
Esempio n. 4
0
 public bool SetResourceMaps(ResourceMaps maps, bool selectevent, bool dontselect)
 {
     return(SetResourceMaps(maps, selectevent, dontselect, false));
 }
Esempio n. 5
0
 public abstract ResourceTreeNodeExt BuildNodes(ResourceMaps maps);