示例#1
0
        /// <summary>
        /// Function to commit any settings.
        /// </summary>
        public override void CommitSettings()
        {
            GorgonFontPlugInSettings settings = GorgonFontEditorPlugIn.Settings;
            float shadowOpacity = _shadowOpacity / 255.0f;

            settings.ShowAnimations = checkShowAnimations.Checked;

            settings.ZoomWindowSnap        = checkZoomSnap.Checked;
            settings.ZoomWindowSize        = (int)numericZoomWindowSize.Value;
            settings.ZoomWindowScaleFactor = (float)numericZoomAmount.Value;

            settings.ShadowEnabled = checkShadowEnabled.Checked;
            if (settings.ShadowEnabled)
            {
                settings.ShadowOffset  = new Point((int)numericShadowOffsetX.Value, (int)numericShadowOffsetY.Value);
                settings.ShadowOpacity = shadowOpacity;
            }

            settings.TextColor       = _textColor.ToArgb();
            settings.BackgroundColor = _backColor.ToArgb();

            settings.SampleText = textPreviewText.Text;

            settings.BlendMode = comboBlendMode.Text;

            // Persist to the plug-in settings file.
            settings.Save();
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GorgonFontEditorPlugIn"/> class.
        /// </summary>
        public GorgonFontEditorPlugIn()
            : base(Resources.GORFNT_DESC)
        {
            FileExtensions.Add(new GorgonFileExtension("gorFont", string.Format("{0} (*.gorFont)",
                                                                                Resources.GORFNT_CONTENT_EXTENSION_DESC)));
            UpdateCachedFonts();

            Settings = new GorgonFontPlugInSettings();
            Settings.Load();
        }