private void OnPositionFound(IEnumerable <Point[]> points) { lock (ImagePointsLock) { ImagePoints = points.ToArray(); } Invalidate?.Invoke(); }
public CroppingManagerPainter(ICroppingManager CroppingManager) { this.CroppingManager = CroppingManager; CroppingManager.ImageCropStarted += OnImageCropStarted; CroppingManager.ImageCropEnded += OnImageCropEnded; Invalidate?.Invoke(); }
private void OnImageNotFoundInAssets(Point point) { m_FindImageWatch.Restart(); m_AssetUnderCursor = null; m_LastCursorPos = point; m_FindImageTimer.Enabled = true; m_LastScreeBmpAtPos = null; StartInvalidateOnTimer?.Invoke(this); Invalidate?.Invoke(); }
public RecordingManagerPainter(IRecordingManager RecordingManager) { this.RecordingManager = RecordingManager; RecordingManager.ImageFoundInAssets += OnImageFoundInAssets; RecordingManager.ImageNotFoundInAssets += OnImageNotFoundInAssets; m_FindImageTimer.Tick += OnFindImageTimerTick; m_FindImageTimer.Interval = 30; Invalidate?.Invoke(); }
private void OnUpdate() { if (m_ObservedScreen != null) { lock (ScreenStateThread.ScreenBmpLock) lock (m_ObservedScreenLock) { BitmapUtility.Clone32BPPBitmap(ScreenStateThread.ScreenBmp, m_ObservedScreen); } } Invalidate?.Invoke(); }
public VisualizationPainter(IMouseRobot MouseRobot, IFeatureDetectionThread FeatureDetectionThread, IScreenStateThread ScreenStateThread) { this.FeatureDetectionThread = FeatureDetectionThread; this.ScreenStateThread = ScreenStateThread; this.MouseRobot = MouseRobot; FeatureDetectionThread.PositionFound += OnPositionFound; ScreenStateThread.Update += OnUpdate; m_ObservedScreen = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb); Invalidate?.Invoke(); }
void OnInvalidate(object _unused_) { Invalidate?.Invoke(this, EventArgs.Empty); }
private void OnImageCropEnded(Point p) { StopInvalidateOnTimer?.Invoke(this); Invalidate?.Invoke(); }
private void OnImageCropStarted(Point p) { StartInvalidateOnTimer?.Invoke(this); Invalidate?.Invoke(); }
void OnInvalidate(object _unused_) { Logger.Provider.Verbose($"XmlIntelliSenseProvider.ROnInvalidate - Invoking Invalidate event"); Invalidate?.Invoke(this, EventArgs.Empty); }
public void OnInvalidate() { IsInvalidated = true; Invalidate?.Invoke(this, EventArgs.Empty); }
protected void FireInvalidate() { Invalidate?.Invoke(this); }
public void AddChild(CommandNode command) { this.invalidate |= Invalidate.Children; this.children.Add(command); }
void OnInvalidate() { Invalidate?.Invoke(this, EventArgs.Empty); }
public void RemoveChild(CommandNode command) { this.invalidate |= Invalidate.Children; this.children.Remove(command); }
// Must be called on the main thread, in a macro context void OnInvalidate(object _unused_) { Debug.Assert(Thread.CurrentThread.ManagedThreadId == 1); Invalidate?.Invoke(this, EventArgs.Empty); }
// Constructor can ask for dependencies, IAssetManager, IMouseRobot etc. public CustomScreenPainter() { Invalidate?.Invoke(); }