private void OpenValidator(List <IValidationProfile> profilesToRun, IValidationProfile actuallyFailingProfile)
        {
            IValidationProfile profile;

            if (profilesToRun.Count == 0)
            {
                return;
            }
            else if (profilesToRun.Count == 1)
            {
                profile = profilesToRun[0];
            }
            else if (profilesToRun.All(n => n is ValidationProfileAsset))
            {
                profile = new ValidationCollectionProfile()
                {
                    Name        = "Failed '" + this.Name + "' hook profiles",
                    Description = "These are the profiles that failed when the hook was executed",
                    Profiles    = profilesToRun.Cast <ValidationProfileAsset>().ToArray()
                };
            }
            else
            {
                profile = actuallyFailingProfile;
            }

            if (profile != null)
            {
                ValidationProfileManagerWindow.OpenProjectValidatorWithProfile(profile, true);
            }
        }
Ejemplo n.º 2
0
        public static void OpenProjectValidator()
        {
            ValidationProfileManagerWindow window = GetWindow <ValidationProfileManagerWindow>();

            window.Show();
            window.position = GUIHelper.GetEditorWindowRect().AlignCenter(870, 700);
            window.pager    = new SlidePageNavigationHelper <object>();
            window.pager.PushPage(new ValidationProfileManagerOverview(window.pager), "Overview");
        }
Ejemplo n.º 3
0
        public static void OpenProjectValidatorWithProfile(IValidationProfile profile, bool scanProfileImmediately = false)
        {
            ValidationProfileManagerWindow window = GetWindow <ValidationProfileManagerWindow>();

            window.Show();
            window.position = GUIHelper.GetEditorWindowRect().AlignCenter(670, 700);
            window.pager    = new SlidePageNavigationHelper <object>();
            window.pager.PushPage(new ValidationProfileManagerOverview(window.pager), "Overview");

            ValidationProfileEditor editor = new ValidationProfileEditor(profile);

            editor.ScanProfileImmediatelyWhenOpening = scanProfileImmediately;
            window.pager.PushPage(new ValidationProfileEditorWrapper(editor), profile.Name);
        }