private void SetTaskContainer( DoitTaskContainer Container ) { _Container = Container; tb_Title.Text = _Container.GetName(); PopulateContainer(); }
private void taskContainersTestToolStripMenuItem_Click( object sender, EventArgs e ) { List<DoitTaskContainer> Containers = new List<DoitTaskContainer>(); DoitTaskContainer c1 = new DoitTaskContainer( "Top Priority" ); DoitTaskContainer c2 = new DoitTaskContainer( "Low Priority" ); DoitTaskContainer c3 = new DoitTaskContainer( "Fun Stuff if you got time" ); c1.AddTask( new DoitTask( "Hungry man time" ) ); c1.AddTask( new DoitTask( "Surescripts" ) ); c1.AddTask( new DoitTask( "Check if delivery Module works" ) ); c1.AddTask( new DoitTask( "Fix Add Property Forms" ) ); c1.AddTask( new DoitTask( "Update Sig Code List" ) ); c2.AddTask( new DoitTask( "SQL MultiScript Runner" ) ); c2.AddTask( new DoitTask( "Bulk Loading Permission for initial Install" ) ); c3.AddTask( new DoitTask( "Patient plan glitch" ) ); c3.AddTask( new DoitTask( "Make food for tomorrow" ) ); c3.AddTask( new DoitTask( "Need More Popcorn" ) ); c3.AddTask( new DoitTask( "Chorle Tonight" ) ); c3.AddTask( new DoitTask( "Naurto" ) ); c3.AddTask( new DoitTask( "Work on portfolio" ) ); Containers.AddRange( new DoitTaskContainer[] { c1, c2, c3 }.ToList() ); TaskContainerTestForm form = new TaskContainerTestForm( Containers ); form.ShowDialog(); }
public TaskContainerPanel( DoitTaskContainer Container ) { if( Container == null ) throw new Exception( "Container can't be null" ); InitializeComponent(); SetTaskContainer( Container ); }
private TaskContainerPanel CreateContainer( DoitTaskContainer container, int LineNumber ) { TaskContainerPanel result = new TaskContainerPanel( container ); result.Location = new Point( 0, LineNumber * result.Height ); result.TaskCompleteChanged += TaskCompletedEvent; result.Dock = DockStyle.Top; return result; }
public void ResetTask( DoitTask Task, DoitTaskContainer Container ) { Container.RemoveTask( Task ); Task.ResetTask(); _Current.AddTask( Task ); DeleteCompletionContainerIfEmpty( Container ); }
public void CompleteTask( DoitTask Task, DoitTaskContainer Container ) { Task.CompleteTask(); Container.RemoveTask( Task ); var CompletionContainer = GetCompletionContainer( Task.DateCompleted().Value ); CompletionContainer.AddTask( Task ); }
public TaskTextBox_old( DoitTaskContainer Container ) { InitializeComponent(); if( Container == null ) throw new Exception( "Container is null" ); _Container = Container; Populate(); }
private void TaskCompletedEvent( DoitTaskContainer Container, DoitTask Task ) { string message = Container.GetName() + Environment.NewLine; if( Task.IsComplete() ) message += Task.GetDescription() + " Completed on: " + Task.DateCompleted().Value.ToShortDateString(); else message += Task.GetDescription() + " Reset"; MessageBox.Show( message ); }
public void ContainerDefaultCtorTest() { DoitTaskContainer container = new DoitTaskContainer(); Assert.AreEqual( container.GetName(), "Container" ); }
public DoitTaskContainerTests() { _Container = new DoitTaskContainer( "Default" ); }
private DoitTaskContainer GetCompletionContainer( DateTime CompletionDate ) { DoitTaskContainer result = _Completed.FirstOrDefault( x => x.GetName() == CompletionDate.ToShortDateString() ); if( result == null ) { result = new DoitTaskContainer( CompletionDate.ToShortDateString() ); _Completed.Add( result ); } return result; }
private void DeleteCompletionContainerIfEmpty( DoitTaskContainer Container ) { if( Container.TasksCount() == 0 ) _Completed.Remove( Container ); }
public void RemoveTask( DoitTask Task, DoitTaskContainer Container ) { Container.RemoveTask( Task ); }
public void AddTask( string Description, DoitTaskContainer Container) { DoitTask Task = new DoitTask( Description ); Container.AddTask( Task ); }
public DoitTaskManager() { _Current = new DoitTaskContainer( "Current" ); _Completed = new List<DoitTaskContainer>(); }
public TaskTextBox_old() { InitializeComponent(); _Container = new DoitTaskContainer(); }