Example #1
0
        public void GoAway()
        {
            if (isOpen)
            {
                Close();
            }
            clickedOn = false;

            try
            {
                if (launcherButton != null && ApplicationLauncher.Instance != null)
                {
                    ApplicationLauncher launcher = ApplicationLauncher.Instance;

                    launcher.DisableMutuallyExclusive(launcherButton);
                    launcher.RemoveOnRepositionCallback(CallbackOnShow);
                    launcher.RemoveOnHideCallback(CallbackOnHide);
                    launcher.RemoveOnShowCallback(CallbackOnShow);
                    launcher.RemoveModApplication(launcherButton);
                    launcherButton = null;
                }
            }
            catch (Exception e)
            {
                SafeHouse.Logger.SuperVerbose("[kOSToolBarWindow] Failed unregistering AppLauncher handlers," + e.Message);
            }

            if (blizzyButton != null)
            {
                blizzyButton.Destroy();
            }
        }
Example #2
0
        public void OnDestroy()
        {
            try {
                ApplicationLauncher launcher = ApplicationLauncher.Instance;
                if (launcherButton != null && launcher != null)
                {
                    launcher.DisableMutuallyExclusive(launcherButton);
                    launcher.RemoveOnRepositionCallback(CallbackOnShow);
                    launcher.RemoveOnHideCallback(CallbackOnHide);
                    launcher.RemoveOnShowCallback(CallbackOnShow);
                    launcher.RemoveModApplication(launcherButton);
                    launcherButton = null;
                }
            } catch (Exception e) {
                PluginLogger.Instance.Error("Failed unregistering AppLauncher handlers," + e.Message);
            }

            PluginLogger.Instance.Info("Destroy");
            _instance = null;
        }
Example #3
0
        public void GoAway()
        {
            SafeHouse.Logger.SuperVerbose("KOSToolBarWindow: PROOF: Instance " + myInstanceNum + " is in GoAway().");
            if (thisInstanceHasHooks)
            {
                SafeHouse.Logger.SuperVerbose("KOSToolBarWindow: PROOF: Instance " + myInstanceNum + " has hooks and is entering the guts of GoAway().");
                if (isOpen)
                {
                    Close();
                }
                clickedOn            = false;
                thisInstanceHasHooks = false;
                someInstanceHasHooks = false; // if this is the instance that had hooks and it's going away, let another instance have a go.

                ApplicationLauncher launcher = ApplicationLauncher.Instance;

                launcher.DisableMutuallyExclusive(launcherButton);
                launcher.RemoveOnRepositionCallback(CallbackOnShow);
                launcher.RemoveOnHideCallback(CallbackOnHide);
                launcher.RemoveOnShowCallback(CallbackOnShow);

                launcher.RemoveModApplication(launcherButton);
            }
        }