Example #1
0
        protected override void DidActivate(bool firstActivation, ActivationType type)
        {
            if (!string.IsNullOrEmpty(ContentFilePath))
            {
                if (ContentChanged && !firstActivation)
                {
                    ContentChanged = false;
                    ParseWithFallback();
                }
                else if (firstActivation)
                {
                    ParseWithFallback();
                }
                bool registered = WatcherGroup.RegisterViewController(this);
#if HRVC_DEBUG
                if (registered)
                {
                    Logger.log.Info($"Registered {this.name}");
                }
                else
                {
                    Logger.log.Error($"Failed to register {this.name}");
                }
#endif
            }
            else
            {
                ParseWithFallback();
            }

            didActivate?.Invoke(firstActivation, type);
        }
Example #2
0
        protected override void DidActivate(bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling)
        {
            if (ContentChanged && !firstActivation)
            {
                ContentChanged = false;
                ParseWithFallback();
            }
            else if (firstActivation)
            {
                ParseWithFallback();
            }
            bool registered = WatcherGroup.RegisterViewController(this);

#if HRVC_DEBUG
            if (registered)
            {
                Logger.log.Info($"Registered {this.name}");
            }
            else
            {
                Logger.log.Error($"Failed to register {this.name}");
            }
#endif

            didActivate?.Invoke(firstActivation, addedToHierarchy, screenSystemEnabling);
        }