Esempio n. 1
0
        public FocusIndicatorForm(FocusIndicatorPluginConfig config)
        {
            _config              = config;
            _showTimer           = new System.Timers.Timer();
            _showTimer.Elapsed  += TimerHide;
            _showTimer.Interval  = config.TimeToShow;
            _showTimer.AutoReset = false;

            InitializeComponent();

            this.FormBorderStyle = FormBorderStyle.None;
            this.TopMost         = true;
            this.ControlBox      = false;

            this.TransparencyKey = this.BackColor = System.Drawing.Color.BlanchedAlmond;

            // force handle get so that the window handle is created
            var handle = this.Handle;

            Logger.Debug("FocusIndicator[{0}] - handle created", handle);
        }
Esempio n. 2
0
 public static void AddFocusIndicator(this IConfigContext context, FocusIndicatorPluginConfig config = null)
 {
     context.Plugins.RegisterPlugin(new FocusIndicatorPlugin(config ?? new FocusIndicatorPluginConfig()));
 }
Esempio n. 3
0
 public FocusIndicatorPlugin(FocusIndicatorPluginConfig config)
 {
     _config = config;
     _form   = new FocusIndicatorForm(config);
 }