示例#1
0
        // -------------------

        private void OfferToAutomaticallyUpdateIfAppropriate()
        {
            bool shouldPrompt = false;

            if (host.ObjectForUserDefaultsKey(SUConstants.SUEnableAutomaticChecksKey) == null)
            {
                object val = host.ObjectForUserDefaultsKey(SUConstants.SUHasLaunchedBeforeKey);
                if (val == null || (bool)val == false)
                {
                    host.SetObjectForUserDefaultsKey(true, SUConstants.SUHasLaunchedBeforeKey);
                }
                else
                {
                    shouldPrompt = true;
                }
            }

            if (shouldPrompt)
            {
                SUUpdatePermissionPromptWindowController controller = new SUUpdatePermissionPromptWindowController(host);
                controller.Delegate = this;
                controller.ShowWindow();
            }
        }
示例#2
0
        // -------------------
        private void OfferToAutomaticallyUpdateIfAppropriate()
        {
            bool shouldPrompt = false;

            if (host.ObjectForUserDefaultsKey(SUConstants.SUEnableAutomaticChecksKey) == null) {

                object val = host.ObjectForUserDefaultsKey(SUConstants.SUHasLaunchedBeforeKey);
                if (val == null || (bool)val == false) {
                    host.SetObjectForUserDefaultsKey(true, SUConstants.SUHasLaunchedBeforeKey);
                } else {
                    shouldPrompt = true;
                }
            }

            if (shouldPrompt) {

                SUUpdatePermissionPromptWindowController controller = new SUUpdatePermissionPromptWindowController(host);
                controller.Delegate = this;
                controller.ShowWindow();

            }
        }
示例#3
0
        // -------------------

        private void OfferToAutomaticallyUpdateIfAppropriate() {

            bool shouldPrompt = false;

            if (host.ObjectForUserDefaultsKey(SUConstants.SUEnableAutomaticChecksKey) == null) {
                
                object val = host.ObjectForUserDefaultsKey(SUConstants.SUHasLaunchedBeforeKey);
                if (val == null || (bool)val == false) {
                    host.SetObjectForUserDefaultsKey(true, SUConstants.SUHasLaunchedBeforeKey);
                    //on 1st launch, assume no need to update; shouldPrompt will be true on relaunch
                    KNNotificationCentre.SharedCentre().PostNotificationWithName(SUConstants.SU1stLaunchNotification, this);
                } else {
                    shouldPrompt = true;
                }
            }

            if (shouldPrompt) {

                SUUpdatePermissionPromptWindowController controller = new SUUpdatePermissionPromptWindowController(host);
                controller.Delegate = this;
                controller.ShowWindow();

            }
        }