Ejemplo n.º 1
0
 public static void DeRegisterHierarchyControl(HierarchyControl hc)
 {
     selectionInfo.Remove(hc);
     if (!hc.IsFolder)
     {
         gObjToControlLookup.Remove(hc.myGameObject);
     }
 }
Ejemplo n.º 2
0
 public static bool RequestAdditiveSelectDeselect(HierarchyControl hc, GameObject gobj)
 {
     if (EngineManagerViewModel.instance.SelectedGameObjects.Contains(gobj))
     {
         RequestUnSelect(hc, gobj);
         return(false);
     }
     RequestAdditiveSelect(hc, gobj);
     return(true);
 }
Ejemplo n.º 3
0
    public static void RequestRangeSelect(MochaEditorControls.HierarchyControl hierarchyControl, GameObject gameObject)
    {
        HierarchyControl source_parent = hierarchyControl.ParentHierarchyControl;

        if (source_parent == null)
        {
            return;
        }

        GameObjectSelectionManager.RequestRangeSelect(gameObject, source_parent.Children);
    }
Ejemplo n.º 4
0
 public static void Select(HierarchyControl hc, bool deselectOthers = true)
 {
     if (deselectOthers)
     {
         foreach (var hier in currentlySelected)
         {
             hier.IsSelected = false;
         }
         currentlySelected.Clear();
     }
     Set(hc, true);
 }
Ejemplo n.º 5
0
 static void Set(HierarchyControl hc, bool isselected)
 {
     hc.IsSelected = isselected;
     if (isselected)
     {
         currentlySelected.Add(hc);
     }
     else
     {
         currentlySelected.Remove(hc);
     }
 }
Ejemplo n.º 6
0
        private void MainThreadInitialization()
        {
            Dte = GetService(typeof(DTE)) as DTE2;
            var solutionExplorerControl = new HierarchyControl(this, _logger);

            _commandProcessor = new CommandProcessor(solutionExplorerControl, _logger);

            _keyDispatcher = new ConditionalKeyDispatcher(
                new SolutionExplorerDispatchCondition(solutionExplorerControl, _logger),
                new KeyDispatcher(_commandProcessor),
                _logger);
        }
Ejemplo n.º 7
0
        private async System.Threading.Tasks.Task MainThreadInitializationAsync()
        {
            Dte = await GetServiceAsync(typeof(_DTE)) as DTE2;

            var solutionExplorerControl = new HierarchyControl(this, _logger);

            _commandProcessor = new CommandProcessor(solutionExplorerControl, _logger);

            _keyDispatcher = new ConditionalKeyDispatcher(
                new SolutionExplorerDispatchCondition(solutionExplorerControl, _logger),
                new KeyDispatcher(_commandProcessor),
                _logger);
        }
Ejemplo n.º 8
0
 public static void RegisterHierarchyControl(HierarchyControl hc)
 {
     selectionInfo.Add(hc);
     try
     {
         if (!hc.IsFolder)
         {
             gObjToControlLookup.Add(hc.myGameObject, hc);
         }
     }catch (ArgumentException e)
     {
         Logger.Log("Hierarchy Control Error: " + e.Message + " Loaded/Unloaded Faulty - Tell Fuller.");
     }
 }
Ejemplo n.º 9
0
        public static void RequestRemoval(GameObject g)
        {
            if (!gObjToControlLookup.ContainsKey(g))
            {
                return;
            }
            HierarchyControl hc = gObjToControlLookup[g];

            if (hc.ParentHierarchyControl != null)
            {
                hc.ParentHierarchyControl.IntermediateSource.Remove(g);
            }
            DeRegisterHierarchyControl(hc);
        }
Ejemplo n.º 10
0
 public static void RequestUnSelect(HierarchyControl hc, GameObject gobj)
 {
     GameObjectSelectionManager.RequestUnSelect(gobj);
     HierarchyControlStateManager.UnSelect(hc);
 }
Ejemplo n.º 11
0
 public static void RequestAdditiveSelect(HierarchyControl hc, GameObject gobj)
 {
     GameObjectSelectionManager.RequestAdditiveSelect(gobj);
     HierarchyControlStateManager.Select(hc, false);
 }
Ejemplo n.º 12
0
 public static void RequestSelect(HierarchyControl hc, GameObject gobj)
 {
     GameObjectSelectionManager.RequestSelect(gobj);
     HierarchyControlStateManager.Select(hc, true);
     hc.BringIntoView();
 }
Ejemplo n.º 13
0
 public static void UnSelect(HierarchyControl hc)
 {
     Set(hc, false);
 }