private TaskTextBox CreateTaskBox( DoitTask task, int LineNumber ) { TaskTextBox result = new TaskTextBox( task ); result.Location = new Point( 0, LineNumber * result.Height ); result.TaskCompleteChanged += ContainerTaskCompleted; result.Dock = DockStyle.Top; result.TaskBoxKeyPressed += TaskContainerPanel_PreviewKeyDown; return result; }
public void SetupTaskGUI( List<DoitTask> TaskList ) { _TaskList = TaskList; for( int i = 0; i < _TaskList.Count; ++i ) { DoitTask t = _TaskList[i]; TaskTextBox Box = new TaskTextBox( t ); Box.Location = new Point( 0, i * Box.Height ); pnl_Test.Controls.Add( Box ); } }