Example #1
0
        public override bool Initialize(IPluginHost host)
        {
            if (host == null)
            {
                return(false);
            }

            _host = host;

            _options        = new KeeThemeOptions(host);
            _controlVisitor = new ControlVisitor(HandleControlVisit);
            _theme          = new KeeTheme();

            _win10ThemeMonitor = new Win10ThemeMonitor(_options);
            _win10ThemeMonitor.Initialize();

            if (Program.TriggerSystem.Enabled)
            {
                // It's better to enable theme as late as possible, but not too late
                Program.TriggerSystem.RaisingEvent += HandleTriggerSystemRaisingEvent;
            }
            else
            {
                InitializeTheme();
            }

            GlobalWindowManager.WindowAdded += HandleGlobalWindowManagerWindowAdded;

            return(true);
        }
Example #2
0
 public Win10ThemeMonitor(KeeThemeOptions options)
 {
     _options = options;
 }