using System;
using System.Collections.Generic;
using System.Text;

namespace Test_Syntaxhighlight {
    public class MyRegistry {
        public static String C_REG_ADR = @"SOFTWARE\WPF\SyntaxHighlight";

        private static int fontsize = 14;
        public static int Fontsize {
            get {
                return fontsize;
            }
            set {
                fontsize = value;
                Basis.WriteRegInt(C_REG_ADR, "fontsize", fontsize);
            }
        }



        // FARBEN
        private static long normalTextColor = 0xFF00FF;
        public static long NormalTextColor {
            get {
                return normalTextColor;
            }
            set {
                normalTextColor = value;
                Basis.WriteRegLong(C_REG_ADR, "normalTextColor", normalTextColor);
                Basis.WriteRegBool(C_REG_ADR, "isSetnormalTextColor", true);
            }
        }

        private static long specialCharsColor = 0xFF4444;
        public static long SpecialCharsColor {
            get {
                return specialCharsColor;
            }
            set {
                specialCharsColor = value;
                Basis.WriteRegLong(C_REG_ADR, "specialCharsColor", specialCharsColor);
                Basis.WriteRegBool(C_REG_ADR, "isSetspecialCharsColor", true);
            }
        }

        private static long commentColor = 0x666600;
        public static long CommentColor {
            get {
                return commentColor;
            }
            set {
                commentColor = value;
                Basis.WriteRegLong(C_REG_ADR, "commentColor", commentColor);
                Basis.WriteRegBool(C_REG_ADR, "isSetcommentColor", true);
            }
        }

        private static long highlightColor = 0x2222FF;
        public static long HighlightColor {
            get {
                return highlightColor;
            }
            set {
                highlightColor = value;
                Basis.WriteRegLong(C_REG_ADR, "highlightColor", highlightColor);
                Basis.WriteRegBool(C_REG_ADR, "isSethighlightColor", true);
            }
        }

        private static long linenumberColor = 0x0000FF;
        public static long LinenumberColor {
            get {
                return linenumberColor;
            }
            set {
                linenumberColor = value;
                Basis.WriteRegLong(C_REG_ADR, "linenumberColor", linenumberColor);
                Basis.WriteRegBool(C_REG_ADR, "isSetlinenumberColor", true);
            }
        }

        private static long backgroundColor = 0xEEEEEE;
        public static long BackgroundColor {
            get {
                return backgroundColor;
            }
            set {
                backgroundColor = value;
                Basis.WriteRegLong(C_REG_ADR, "backgroundColor", backgroundColor);
                Basis.WriteRegBool(C_REG_ADR, "isSetbackgroundColor", true);
            }
        }

        private static long backgroundLinenumberColor = 0x999999;
        public static long BackgroundLinenumberColor {
            get {
                return backgroundLinenumberColor;
            }
            set {
                backgroundLinenumberColor = value;
                Basis.WriteRegLong(C_REG_ADR, "backgroundLinenumberColor", backgroundLinenumberColor);
                Basis.WriteRegBool(C_REG_ADR, "isSetbackgroundLinenumberColor", true);
            }
        }

        static MyRegistry() {

            fontsize = Basis.ReadRegInt(C_REG_ADR, "fontsize");
            if (fontsize == 0) {
                fontsize = 14;
                Basis.WriteRegInt(C_REG_ADR, "fontsize", fontsize);
            }


        }


    }
}
