private void InterceptMouse_OnMouseLeftButtonDown(object sender, MouseEventArgs e) { Logger.Info($"Mouse Button Pressed : {e.Button}"); if (e.Button == MouseButtons.Left) { Logger.Info($" Location : {e.X} , {e.Y} clicked after {IdleTimeFinder.GetIdleTime()} minutes"); if (this.FollowMouse) { this.CurrentScreen = Screen.FromPoint(new Point(e.X, e.Y)); var splashScreen = new TimedSpalshScreen(this.CurrentScreen.WorkingArea, 0.7, Dispatcher.CurrentDispatcher); splashScreen.ShowSplashScreen("Counting down", 10000); this.FollowMouse = false; } if (this.addingImageClixSenseFind) { this.screenShotsManager.AddToFindImages(e, Settings.Default.ClickSenseFindDir); this.addingImageClixSenseFind = false; } if (this.addingImageClixSenseClose) { this.screenShotsManager.AddToFindImages(e, Settings.Default.ClickSenseCloseDir); this.addingImageClixSenseClose = false; } if (this.addingImageNemoFind) { this.screenShotsManager.AddToFindImages(e, Settings.Default.NemoFindDir); this.addingImageNemoFind = false; } if (this.addingImageNemoDot) { this.screenShotsManager.AddToFindImages(e, Settings.Default.NemoDotDir); this.addingImageNemoDot = false; } if (this.addingImageNemoClose) { this.screenShotsManager.AddToFindImages(e, Settings.Default.NemoCloseDir); this.addingImageNemoClose = false; } var senseAdProcessor = this.clixSenseAdProcessor; if (senseAdProcessor != null) { senseAdProcessor?.SaveSenseCatImageToDb(e); senseAdProcessor.CaptureCatImage = false; Logger.Info($" {nameof(senseAdProcessor.CaptureCatImage)} : {senseAdProcessor.CaptureCatImage}"); } } }
public void ShowSplashMessage(Point point, string message, int showForMilliseconds) { this.SplashScreen?.Close(); point.Offset(100, 100); var screen = Screen.FromPoint(point); this.currentDispatcher?.BeginInvoke( new Action( () => { this.SplashScreen = new TimedSpalshScreen(screen.Bounds, 0.9, this.currentDispatcher); this.SplashScreen.ShowSplashScreen(message, showForMilliseconds); })); }