示例#1
0
        void ApplySetting()
        {
            var settings = SingletonSettings.GetInstance();

            this.BackColor  = settings.BackColor;
            this.ForeColor  = settings.FontColor;
            this.Font       = new(settings.FontFamily, settings.FontSize);
            this.ClientSize = new Size(settings.FormWidth, settings.FormHeight);
        }
示例#2
0
        public static SingletonSettings GetInstance()
        {
            if (_instance == null)
            {
                lock (locker)
                {
                    if (_instance == null)
                    {
                        _instance = new SingletonSettings();
                    }
                }
            }

            return(_instance);
        }