Example #1
0
        public void MoveCard(JobCard card, int where)
        {
            RemoveJob(card);
            switch (where)
            {
            case 0:
                card.status = 0;
                pan_unstarted.Controls.Add(card);
                break;

            case 1:
                card.status = 1;
                pan_inprogress.Controls.Add(card);
                break;

            case 2:
                card.status = 2;
                pan_done.Controls.Add(card);
                break;

            default:
                card.status = 0;
                pan_unstarted.Controls.Add(card);
                break;
            }
            card.TopLevel = false;

            card.setColor();
            card.UpdateUI();
            card.Show();
        }
Example #2
0
        /*    this is the Second OVERLOADED method with one argument.
         *
         *    Params:
         *   JobCard job - applied to the newly created JobCard as JobCard.title
         *
         * */
        public void AddJobToBoard(JobCard job)
        {
            job.UpdateUI();

            //add card to list of jobs
            jobs.Add(job);


            job.form1 = this;
            //add to the controls on the first flowpanel
            job.TopLevel = false;
            pan_unstarted.Controls.Add(job);
            job.Show();
        }
Example #3
0
        /*    this is the FIRST OVERLOADED method with one argument.
         *
         *    Params:
         *    String job - applied to the newly created JobCard as JobCard.title
         *
         * */
        public void AddJobToBoard(String job)
        {
            //create jobcard
            JobCard card = new JobCard();

            card.title       = job;
            card.description = "";
            card.UpdateUI();

            //add card to list of jobs
            jobs.Add(card);
            card.form1 = this;
            //add to the controls on the first flowpanel
            card.TopLevel = false;
            pan_unstarted.Controls.Add(card);
            card.Show();

            //clear our textbox as a first indication something is working, and for next use;
            tb_addjob.Text = "";
        }
 public void button1_Click(object sender, EventArgs e)
 {
     card.worker.name = textBox1.Text;
     card.UpdateUI();
     this.Close();
 }