示例#1
0
        public void SetActiveManager(ManagerBase sentManager)
        {
            bool isSettable = true;

            if (activeManager != null)
            {
                if (activeManager.ManagerLinkHandler.SynchronousManagers.Contains(sentManager))
                {
                    isSettable = false;
                }
                if (activeManager.ManagerLinkHandler.ParallelManagers.Contains(sentManager))
                {
                    isSettable = false;
                }
                if (!(sentManager == activeManager))
                {
                    isSettable = false;
                }
            }
            if (isSettable == true)
            {
                activeManager = sentManager;
            }
        }
示例#2
0
 public void SetManagerLinks(ManagerBase sentManager)
 {
     for (int i = 0; i < synchronousManagers.Length; i++)
     {
         if (!sentManager.GetIsExtensionLoaded())
         {
             break;
         }
         if (!synchronousManagers[i].GetIsExtensionLoaded())
         {
             continue;
         }
         sentManager.OnStartProcess += synchronousManagers[i].QueueProecess;
         sentManager.OnEndProcess   += synchronousManagers[i].EndProcess;
     }
     for (int i = 0; i < parallelManagers.Length; i++)
     {
         if (!sentManager.GetIsExtensionLoaded())
         {
             break;
         }
         if (!parallelManagers[i].GetIsExtensionLoaded())
         {
             continue;
         }
         sentManager.OnEndProcess += parallelManagers[i].EndProcess;
     }
     for (int i = 0; i < startEndLinkedManagers.Length; i++)
     {
         if (!sentManager.GetIsExtensionLoaded())
         {
             break;
         }
         if (!startEndLinkedManagers[i].GetIsExtensionLoaded())
         {
             continue;
         }
         sentManager.OnStartProcess += startEndLinkedManagers[i].EndProcess;
     }
     for (int i = 0; i < endStartLinkedManagers.Length; i++)
     {
         if (!sentManager.GetIsExtensionLoaded())
         {
             break;
         }
         if (!endStartLinkedManagers[i].GetIsExtensionLoaded())
         {
             continue;
         }
         sentManager.OnEndProcess += endStartLinkedManagers[i].QueueProecess;
     }
     for (int i = 0; i < loadLinkedManagers.Length; i++)
     {
         if (!sentManager.GetIsExtensionLoaded())
         {
             break;
         }
         if (!loadLinkedManagers[i].GetIsExtensionLoaded())
         {
             continue;
         }
         sentManager.OnLoad     += loadLinkedManagers[i].Load;
         sentManager.OnLateLoad += loadLinkedManagers[i].LateLoad;
     }
 }