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); }
public static void AddFocusIndicator(this IConfigContext context, FocusIndicatorPluginConfig config = null) { context.Plugins.RegisterPlugin(new FocusIndicatorPlugin(config ?? new FocusIndicatorPluginConfig())); }
public FocusIndicatorPlugin(FocusIndicatorPluginConfig config) { _config = config; _form = new FocusIndicatorForm(config); }