using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test
{
    public class AppSettings
    {
        public static AppSettings _thisInstance = new AppSettings();
        public static AppSettings Current
        {
            get
            {
                return _thisInstance;
            }
        }

        bool _IsRTL, _ShowRuler, _ShowLineNumber, _ShowLineMarker, _HilightXML;

        public bool IsRTL
        {
            get
            {
                return _IsRTL;
            }
            set
            {
                _IsRTL = value;
                if (ChangedSetting != null)
                    ChangedSetting(this, null);
            }
        }
        public bool ShowRuler
        {
            get
            {
                return _ShowRuler;
            }
            set
            {
                _ShowRuler = value;
                if(ChangedSetting != null)
                    ChangedSetting(this, null);
            }
        }

        public bool ShowLineNumber
        {
            get
            {
                return _ShowLineNumber;
            }
            set
            {
                _ShowLineNumber = value;
                if (ChangedSetting != null)
                    ChangedSetting(this, null);
            }
        }

        public bool ShowLineMarker
        {
            get
            {
                return _ShowLineMarker;
            }
            set
            {
                _ShowLineMarker = value;
                if (ChangedSetting != null)
                    ChangedSetting(this, null);
            }
        }

        public bool HilightXML
        {
            get
            {
                return _HilightXML;
            }
            set
            {
                _HilightXML = value;
                if (ChangedSetting != null)
                    ChangedSetting(this, null);
            }
        }

        public event EventHandler ChangedSetting;
    }
}
