public WeekView() { InitializeComponent(); this.GridColor = Color.Black; this.HourLabelFont = this.Font; _triggerPoints = new TriggerPoints(); _toolTip.Popup += toolTip_Popup; _toolTipTimer.Interval = TOOLTIP_DELAY; _toolTipTimer.Tick += toolTipTimer_Tick; }
public TriggerPoints FindByTag(object tag) { TriggerPoints triggerPoints = null; foreach (TriggerPoint triggerPoint in _triggerPoints.Values) { if (object.Equals(triggerPoint.Tag, tag)) { if (triggerPoints == null) { triggerPoints = new TriggerPoints(); } triggerPoints.Add(triggerPoint); } } return(triggerPoints); }
private void HighlightTrigger() { weekView1.TriggerPoints.ClearSelected(); if (lvTaskList.SelectedItems.Count > 0) { int selectedTaskId = ((WlbScheduledTask)lvTaskList.SelectedItems[0].Tag).TaskId; TriggerPoints triggerPoints = weekView1.TriggerPoints.FindByTag(selectedTaskId); if (null != triggerPoints) { foreach (TriggerPoint triggerPoint in triggerPoints.List.Values) { triggerPoint.IsSelected = true; } } weekView1.Refresh(); } }
public TriggerPoints FindByTag(object tag) { TriggerPoints triggerPoints = null; foreach (TriggerPoint triggerPoint in _triggerPoints.Values) { if (object.Equals(triggerPoint.Tag, tag)) { if (triggerPoints == null) { triggerPoints = new TriggerPoints(); } triggerPoints.Add(triggerPoint); } } return triggerPoints; }