public bool AddMonitor(string tcName, TraceMonitorPoint hint) { TracePanel target = _tracePanelColl.First(o => o.Name == tcName); if (null == target) { return(false); } target.AddMonitor(hint); return(true); }
public void MouseHoverHandle(EventArgs e) { if (!_monitorPoints.IsNullOrEmpty()) { Point center = Bounds.CenterPoint(); center.Offset(-Location.X, -Location.Y); Rectangle hintRegion = new Rectangle(center.X - MonitorPointRadius - 2 * DrawMonitorWidth, center.Y - MonitorPointRadius - 2 * DrawMonitorWidth, (2 * DrawMonitorWidth + MonitorPointRadius) * 2, (2 * DrawMonitorWidth + MonitorPointRadius) * 2); if (hintRegion.Contains(PointToClient(MousePosition))) { TraceMonitorPoint tmp = _monitorPoints[0]; String hint = String.Format("名 称:{0}\r\n进入时间:{1}", tmp.Name, tmp.Arrive); ShowToolTip(hint); } } }
public void AddMonitor(TraceMonitorPoint hint) { _monitorPoints.Add(hint); Refresh(); }
public bool AddMonitor(string tcName, TraceMonitorPoint hint) { TracePanel target = _tracePanelColl.First(o => o.Name == tcName); if (null == target) return false; target.AddMonitor(hint); return true; }