Exemple #1
0
        public static bool InitializeSoftlocksViewController()
        {
            if (!CollabSettingsManager.IsAvailable(CollabSettingType.InProgressEnabled))
            {
                return(false);
            }

            if (CollabSettingsManager.inProgressEnabled)
            {
                SoftlockViewController.Instance.TurnOn();
            }
            else
            {
                SoftlockViewController.Instance.TurnOff();
            }
            return(true);
        }
Exemple #2
0
        static void OnCollabEnabledForCurrentProject(bool enabled)
        {
            if (enabled)
            {
                instance.StateChanged += instance.collabFilters.OnCollabStateChanged;
                instance.collabFilters.ShowInFavoriteSearchFilters();
                if (CollabSettingsManager.IsAvailable(CollabSettingType.InProgressEnabled))
                {
                    if (CollabSettingsManager.inProgressEnabled)
                    {
                        SoftlockViewController.Instance.softLockFilters.ShowInFavoriteSearchFilters();
                    }
                }
                else
                {
                    CollabSettingsManager.statusNotifier[CollabSettingType.InProgressEnabled] -= OnProgressEnabledSettingStatusChanged;
                    CollabSettingsManager.statusNotifier[CollabSettingType.InProgressEnabled] += OnProgressEnabledSettingStatusChanged;
                }
            }
            else
            {
                instance.StateChanged -= instance.collabFilters.OnCollabStateChanged;
                instance.collabFilters.HideFromFavoriteSearchFilters();
                SoftlockViewController.Instance.softLockFilters.HideFromFavoriteSearchFilters();
                CollabSettingsManager.statusNotifier[CollabSettingType.InProgressEnabled] -= OnProgressEnabledSettingStatusChanged;

                if (ProjectBrowser.s_LastInteractedProjectBrowser != null)
                {
                    if (ProjectBrowser.s_LastInteractedProjectBrowser.Initialized() && ProjectBrowser.s_LastInteractedProjectBrowser.IsTwoColumns())
                    {
                        int instanceID = AssetDatabase.GetMainAssetInstanceID("assets");
                        ProjectBrowser.s_LastInteractedProjectBrowser.SetFolderSelection(new int[] { instanceID }, true);
                    }
                    ProjectBrowser.s_LastInteractedProjectBrowser.SetSearch("");
                    ProjectBrowser.s_LastInteractedProjectBrowser.Repaint();
                }
            }
        }
Exemple #3
0
 private static void OnCollabEnabledForCurrentProject(bool enabled)
 {
     if (enabled)
     {
         Collab.instance.StateChanged += new StateChangedDelegate(Collab.instance.collabFilters.OnCollabStateChanged);
         Collab.instance.collabFilters.ShowInFavoriteSearchFilters();
         if (CollabSettingsManager.IsAvailable(CollabSettingType.InProgressEnabled))
         {
             if (CollabSettingsManager.inProgressEnabled)
             {
                 SoftlockViewController.Instance.softLockFilters.ShowInFavoriteSearchFilters();
             }
         }
         else
         {
             Dictionary <CollabSettingType, CollabSettingsManager.SettingStatusChanged> statusNotifier;
             Dictionary <CollabSettingType, CollabSettingsManager.SettingStatusChanged> expr_69 = statusNotifier = CollabSettingsManager.statusNotifier;
             CollabSettingType arg_9A_1 = CollabSettingType.InProgressEnabled;
             Delegate          arg_90_0 = statusNotifier[CollabSettingType.InProgressEnabled];
             if (Collab.< > f__mg$cache6 == null)
             {
                 Collab.< > f__mg$cache6 = new CollabSettingsManager.SettingStatusChanged(Collab.OnProgressEnabledSettingStatusChanged);
             }
             expr_69[arg_9A_1] = (CollabSettingsManager.SettingStatusChanged)Delegate.Remove(arg_90_0, Collab.< > f__mg$cache6);
             Dictionary <CollabSettingType, CollabSettingsManager.SettingStatusChanged> expr_A4 = statusNotifier = CollabSettingsManager.statusNotifier;
             CollabSettingType arg_D5_1 = CollabSettingType.InProgressEnabled;
             Delegate          arg_CB_0 = statusNotifier[CollabSettingType.InProgressEnabled];
             if (Collab.< > f__mg$cache7 == null)
             {
                 Collab.< > f__mg$cache7 = new CollabSettingsManager.SettingStatusChanged(Collab.OnProgressEnabledSettingStatusChanged);
             }
             expr_A4[arg_D5_1] = (CollabSettingsManager.SettingStatusChanged)Delegate.Combine(arg_CB_0, Collab.< > f__mg$cache7);
         }
     }
     else
     {
         Collab.instance.StateChanged -= new StateChangedDelegate(Collab.instance.collabFilters.OnCollabStateChanged);
         Collab.instance.collabFilters.HideFromFavoriteSearchFilters();
         SoftlockViewController.Instance.softLockFilters.HideFromFavoriteSearchFilters();
         Dictionary <CollabSettingType, CollabSettingsManager.SettingStatusChanged> statusNotifier;
         Dictionary <CollabSettingType, CollabSettingsManager.SettingStatusChanged> expr_124 = statusNotifier = CollabSettingsManager.statusNotifier;
         CollabSettingType arg_155_1 = CollabSettingType.InProgressEnabled;
         Delegate          arg_14B_0 = statusNotifier[CollabSettingType.InProgressEnabled];
         if (Collab.< > f__mg$cache8 == null)
         {
             Collab.< > f__mg$cache8 = new CollabSettingsManager.SettingStatusChanged(Collab.OnProgressEnabledSettingStatusChanged);
         }
         expr_124[arg_155_1] = (CollabSettingsManager.SettingStatusChanged)Delegate.Remove(arg_14B_0, Collab.< > f__mg$cache8);
         if (ProjectBrowser.s_LastInteractedProjectBrowser != null)
         {
             if (ProjectBrowser.s_LastInteractedProjectBrowser.Initialized() && ProjectBrowser.s_LastInteractedProjectBrowser.IsTwoColumns())
             {
                 int mainAssetInstanceID = AssetDatabase.GetMainAssetInstanceID("assets");
                 ProjectBrowser.s_LastInteractedProjectBrowser.SetFolderSelection(new int[]
                 {
                     mainAssetInstanceID
                 }, true);
             }
             ProjectBrowser.s_LastInteractedProjectBrowser.SetSearch("");
             ProjectBrowser.s_LastInteractedProjectBrowser.Repaint();
         }
     }
 }