Example #1
0
 private void assign_Click(object sender, EventArgs e)
 {
     if (_queen.AssignWork(workerBeeJob.Text, (int)shifts.Value))
     {
         MessageBox.Show(@"Job Assigned!");
     }
     else
     {
         MessageBox.Show(@"No available bees!");
     }
 }
 private void assignmentButton_Click(object sender, EventArgs e)
 {
     if (queen.AssignWork(workerBeeJob.Text, (int)shiftsValueControl.Value) == false)
     {
         MessageBox.Show("No workers are available to do the job '" + workerBeeJob.Text + "'", "The queen bee says...");
     }
     else
     {
         MessageBox.Show("The job '" + workerBeeJob.Text + "' will be done in " + shiftsValueControl.Value + " shifts",
                         "The queen bee says...");
     }
 }
Example #3
0
 private void assignJob_Click(object sender, EventArgs e)
 {
     if (queen.AssignWork(workerBeeJob.Text, (int)shifts.Value) == false)
     {
         MessageBox.Show("Для этого задания рабочих нет ‘"
                         + workerBeeJob.Text + "’", "Матка говорит...");
     }
     else
     {
         MessageBox.Show("Задание ‘" + workerBeeJob.Text + "’ будет закончено через "
                         + shifts.Value + " смен", "Матка говорит...");
     }
 }