public CurrentTaskIndicatorControl() { if (!DesignMode) { throw new NotSupportedException("Only allowed in Design Mode"); } _content = new TaskIndicator(); InitializeComponent(); }
public CurrentTaskIndicatorControl(TaskIndicator content) { _content = content; InitializeComponent(); UpdateColors(); content.Location = new Point(70, 35); content.AutoSize = false; content.Width = Width - 80; content.Height = 100; content.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; Controls.Add(content); Controls.SetChildIndex(content, 0); }
private TaskIndicator TaskIndicatorFromTask(ITask task) { TaskIndicator taskIndicator = new TaskIndicator(task); taskIndicator.Selected += OnTaskIndicatorSelected; _taskIndicators.Add(taskIndicator); return taskIndicator; }