示例#1
0
        private void SetTaskContainer( DoitTaskContainer Container )
        {
            _Container = Container;

            tb_Title.Text = _Container.GetName();
            PopulateContainer();
        }
示例#2
0
        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();
        }
示例#3
0
        public TaskContainerPanel( DoitTaskContainer Container )
        {
            if( Container == null ) throw new Exception( "Container can't be null" );

            InitializeComponent();
            SetTaskContainer( Container );
        }
示例#4
0
 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;
 }
示例#5
0
        public void ResetTask( DoitTask Task, DoitTaskContainer Container )
        {
            Container.RemoveTask( Task );
            Task.ResetTask();

            _Current.AddTask( Task );
            DeleteCompletionContainerIfEmpty( Container );
        }
示例#6
0
        public void CompleteTask( DoitTask Task, DoitTaskContainer Container )
        {
            Task.CompleteTask();
            Container.RemoveTask( Task );

            var CompletionContainer = GetCompletionContainer( Task.DateCompleted().Value );
            CompletionContainer.AddTask( Task );
        }
示例#7
0
        public TaskTextBox_old( DoitTaskContainer Container )
        {
            InitializeComponent();
            if( Container == null ) throw new Exception( "Container is null" );

            _Container = Container;
            Populate();
        }
示例#8
0
        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 );
        }
示例#9
0
 public void ContainerDefaultCtorTest()
 {
     DoitTaskContainer container = new DoitTaskContainer();
     Assert.AreEqual( container.GetName(), "Container" );
 }
示例#10
0
 public DoitTaskContainerTests()
 {
     _Container = new DoitTaskContainer( "Default" );
 }
示例#11
0
        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;
        }
示例#12
0
 private void DeleteCompletionContainerIfEmpty( DoitTaskContainer Container )
 {
     if( Container.TasksCount() == 0 )
         _Completed.Remove( Container );
 }
示例#13
0
 public void RemoveTask( DoitTask Task, DoitTaskContainer Container )
 {
     Container.RemoveTask( Task );
 }
示例#14
0
 public void AddTask( string Description, DoitTaskContainer Container)
 {
     DoitTask Task = new DoitTask( Description );
     Container.AddTask( Task );
 }
示例#15
0
 public DoitTaskManager()
 {
     _Current = new DoitTaskContainer( "Current" );
     _Completed = new List<DoitTaskContainer>();
 }
示例#16
0
 public TaskTextBox_old()
 {
     InitializeComponent();
     _Container = new DoitTaskContainer();
 }