protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (!_tooltipPopup.IsOpen) { _tooltipJob = this.JobHitTest(); if (_tooltipJob != null) { _tooltipTimer.Stop(); _tooltipTimer.Start(); } return; } if (_tooltipJob != null) { var mousePosition = e.GetPosition(this); if (_jobBounds[_tooltipJob].Contains(mousePosition)) { return; } } this.CloseTooltip(); }
private void JobManager_OnJobStarted(object sender, BuildJobViewModel job) { this.Dispatcher.BeginInvoke(new System.Action(() => { if (job.StartTimeOffset <= _endTimeOffset && job.EndTimeOffset >= _startTimeOffset) { this.AddJob(job); } this.UpdateAllViewPositions(); })); }
private void JobManager_OnJobStarted(object sender, BuildJobViewModel job) { this.Dispatcher.BeginInvoke(new System.Action(() => { this.InvalidateCores(); if (job.StartTimeOffset <= _endTimeOffset && job.EndTimeOffset >= _startTimeOffset) { this.TryAddJob(job); } this.InvalidateVisual(); })); }
private void AddJob(BuildJobViewModel job) { BuildJobView view; if (_jobViewPool.Count == 0) { view = new BuildJobView(); this.Canvas.Children.Add(view); } else { view = _jobViewPool.Dequeue(); view.Visibility = Visibility.Visible; } view.DataContext = job; _activeJobViewMap[job] = view; }
private void JobManager_OnJobFinished(object sender, BuildJobViewModel e) => this.Dispatcher.BeginInvoke(new Action(this.InvalidateVisual));
private void TryAddJob(BuildJobViewModel job) { _activeJobs.Add(job); }
private void CloseTooltip() { _tooltipJob = null; _tooltip.DataContext = null; _tooltipPopup.IsOpen = false; }