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

            _host = host;

            _controlVisitor = new ControlVisitor(HandleControlVisit);
            _theme          = new KeeTheme();

            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);
        }
예제 #2
0
 private void HandleTabControlAdded(object sender, ControlEventArgs e)
 {
     if (e.Control is TabPage)
     {
         var visitor = new ControlVisitor(Apply);
         visitor.Visit(e.Control);
     }
 }
예제 #3
0
        public override bool Initialize(IPluginHost host)
        {
            if (host == null)
            {
                return(false);
            }

            _host = host;

            _controlVisitor = new ControlVisitor(HandleControlVisit);
            _theme          = new KeeTheme();

            Program.TriggerSystem.RaisingEvent += HandleTriggerSystemRaisingEvent;
            GlobalWindowManager.WindowAdded    += HandleGlobalWindowManagerWindowAdded;

            return(true);
        }
예제 #4
0
        public override bool Initialize(IPluginHost host)
        {
            if (host == null)
            {
                return(false);
            }

            _host = host;

            _controlVisitor = new ControlVisitor(HandleControlVisit);
            var themeEnabled = host.CustomConfig.GetBool(KeeThemeOnConfigItem, false);

            _theme = new KeeTheme(themeEnabled);
            if (_theme.Enabled)
            {
                ApplyThemeInOpenForms();
            }

            GlobalWindowManager.WindowAdded += HandleGlobalWindowManagerWindowAdded;

            return(true);
        }