/// <summary>
        /// Shows or hides the circular preview boxes.
        /// </summary>
        /// <param name="value">if set to <c>true</c> [value].</param>
        private void ShowCircularPreviewBoxes(bool value)
        {
            GlobalBooleanSettingsManager globalBooleanSettingsManager = new GlobalBooleanSettingsManager();

            if (value)
            {
                kgbCircularColourPreviewPane.Visible = true;

                kgbPreviewPane.Visible = false;

                standardPictureboxesToolStripMenuItem.Checked = false;

                circularPictureboxesToolStripMenuItem.Checked = true;
            }
            else
            {
                kgbCircularColourPreviewPane.Visible = false;

                kgbPreviewPane.Visible = true;

                standardPictureboxesToolStripMenuItem.Checked = true;

                circularPictureboxesToolStripMenuItem.Checked = false;
            }

            _globalBooleanSettingsManager.SetUseCircularPictureBoxes(value);

            UseCircularPictureBoxes = _globalBooleanSettingsManager.GetUseCircularPictureBoxes();

            _globalBooleanSettingsManager.SaveBooleanSettings();
        }
        private void RandomPasswordGenerator_Load(object sender, EventArgs e)
        {
            GlobalBooleanSettingsManager gbs = new GlobalBooleanSettingsManager();

            if (gbs.GetIsInDeveloperMode())
            {
                //DevelopmentInformation.SetBuildInformation(this, (DevelopmentState)DevelopmentState.ALPHA);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Are the global boolean settings default.
        /// </summary>
        /// <returns></returns>
        public static bool AreGlobalBooleanSettingsDefault()
        {
            GlobalBooleanSettingsManager manager = new GlobalBooleanSettingsManager();

            if (manager.GetIsInDeveloperMode() == false)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 4
0
        public static void SaveSettings(SettingTypes settingType)
        {
            #region Variables
            AllMergedColourSettingsManager colourSettingsManager = new AllMergedColourSettingsManager();

            //ColourStringSettingsManager colourStringSettingsManager = new ColourStringSettingsManager();

            ColourIntegerSettingsManager colourIntegerSettingsManager = new ColourIntegerSettingsManager();

            GlobalBooleanSettingsManager globalBooleanSettingsManager = new GlobalBooleanSettingsManager();

            GlobalStringSettingsManager globalStringSettingsManager = new GlobalStringSettingsManager();
            #endregion

            try
            {
                switch (settingType)
                {
                case SettingTypes.BOOLEAN:
                    globalBooleanSettingsManager.SaveBooleanSettings();
                    break;

                case SettingTypes.COLOUR:
                    colourSettingsManager.SaveAllMergedColourSettings();
                    break;

                case SettingTypes.COLOURSTRING:
                    //colourStringSettingsManager.SaveColourStringSettings();
                    break;

                case SettingTypes.COLOURINTEGER:
                    colourIntegerSettingsManager.SaveColourIntegerSettings();
                    break;

                case SettingTypes.STRING:
                    globalStringSettingsManager.SaveStringSettings();
                    break;

                case SettingTypes.INTEGER:
                    colourIntegerSettingsManager.SaveColourIntegerSettings();
                    break;

                default:
                    break;
                }
            }
            catch (Exception exc)
            {
                ExceptionHandler.CaptureException(exc, methodSignature: Helpers.GetCurrentMethod());
            }
        }
        public static void SaveSettings(SettingTypes settingType)
        {
            #region Variables
            ColourSettingsManager colourSettingsManager = new ColourSettingsManager();

            ColourStringSettingsManager colourStringSettingsManager = new ColourStringSettingsManager();

            ColourIntegerSettingsManager colourIntegerSettingsManager = new ColourIntegerSettingsManager();

            GlobalBooleanSettingsManager globalBooleanSettingsManager = new GlobalBooleanSettingsManager();

            GlobalStringSettingsManager globalStringSettingsManager = new GlobalStringSettingsManager();
            #endregion

            try
            {
                switch (settingType)
                {
                case SettingTypes.BOOLEAN:
                    globalBooleanSettingsManager.SaveBooleanSettings();
                    break;

                case SettingTypes.COLOUR:
                    colourSettingsManager.SaveColourSettings();
                    break;

                case SettingTypes.COLOURSTRING:
                    colourStringSettingsManager.SaveColourStringSettings();
                    break;

                case SettingTypes.COLOURINTEGER:
                    colourIntegerSettingsManager.SaveColourIntegerSettings();
                    break;

                case SettingTypes.STRING:
                    globalStringSettingsManager.SaveStringSettings();
                    break;

                case SettingTypes.INTEGER:
                    colourIntegerSettingsManager.SaveColourIntegerSettings();
                    break;

                default:
                    break;
                }
            }
            catch (Exception exc)
            {
                ExceptionHandler.CaptureException(exc);
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Shows or hides the circular preview boxes.
        /// </summary>
        /// <param name="value">if set to <c>true</c> [value].</param>
        private void ShowCircularPreviewBoxes(bool value)
        {
            GlobalBooleanSettingsManager globalBooleanSettingsManager = new GlobalBooleanSettingsManager();

            #region Old Code
            //pbxBaseColour.Visible = value;

            //pbxDarkColour.Visible = value;

            //pbxMiddleColour.Visible = value;

            //pbxLightColour.Visible = value;

            //pbxLightestColour.Visible = value;

            //pbxBorderColourPreview.Visible = value;

            //pbxAlternativeNormalTextColour.Visible = value;

            //pbxNormalTextColourPreview.Visible = value;

            //pbxDisabledTextColourPreview.Visible = value;

            //pbxFocusedTextColourPreview.Visible = value;

            //pbxPressedTextColourPreview.Visible = value;

            //pbxDisabledColourPreview.Visible = value;

            //pbxLinkNormalColourPreview.Visible = value;

            //pbxLinkHoverColourPreview.Visible = value;

            //pbxLinkVisitedColourPreview.Visible = value;

            //pbxCustomColourOnePreview.Visible = value;

            //pbxCustomColourTwoPreview.Visible = value;

            //pbxCustomColourThreePreview.Visible = value;

            //pbxCustomColourFourPreview.Visible = value;

            //pbxCustomColourFivePreview.Visible = value;

            //pbxCustomTextColourOnePreview.Visible = value;

            //pbxCustomTextColourTwoPreview.Visible = value;

            //pbxCustomTextColourThreePreview.Visible = value;

            //pbxCustomTextColourFourPreview.Visible = value;

            //pbxCustomTextColourFivePreview.Visible = value;

            //pbxMenuTextColourPreview.Visible = value;

            //pbxStatusTextColourPreview.Visible = value;
            #endregion

            if (value)
            {
                kgbCircularColourPreviewPane.Visible = true;

                kgbPreviewPane.Visible = false;

                standardToolStripMenuItem.Checked = false;

                circularToolStripMenuItem.Checked = true;
            }
            else
            {
                kgbCircularColourPreviewPane.Visible = false;

                kgbPreviewPane.Visible = true;

                standardToolStripMenuItem.Checked = true;

                circularToolStripMenuItem.Checked = false;
            }

            _globalBooleanSettingsManager.SetUseCircularPictureBoxes(value);

            UseCircularPictureBoxes = _globalBooleanSettingsManager.GetUseCircularPictureBoxes();

            _globalBooleanSettingsManager.SaveBooleanSettings();
        }