Ejemplo n.º 1
0
 private void assignJobButton_Click(object sender, EventArgs e)
 {
     if (queen.AssignWork(workerBeeJob.Text, (int)shifts.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 {shifts.Value} shifts", "The queen bee says...");
     }
 }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (_queen.AssignWork(comboBox1.Text, (int)numericUpDown1.Value) == false)
     {
         MessageBox.Show("Nie ma dostępnych robotnic do wykonania zadania '" + comboBox1.Text + "'",
                         "Królowa pszczół mówi...");
     }
     else
     {
         MessageBox.Show($"Zadanie '{comboBox1.Text}' będzie ukończone za {numericUpDown1.Value} zmiany",
                         "Królowa pszczół mówi...");
     }
 }
Ejemplo n.º 3
0
 private void assign_Click(object sender, EventArgs e)
 {
     if (queen.AssignWork(workerBeeJob.Text, (int)shifts.Value))
     {
         MessageBox.Show("The job ‘" + workerBeeJob.Text + "’ will be done in "
                         + shifts.Value + " shifts", "The queen bee says...");
     }
     else
     {
         MessageBox.Show("No workers are available to do the job ‘"
                         + workerBeeJob.Text + "’", "The queen bee says...");
     }
 }