Exemplo n.º 1
0
 private void statusToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ChangeStatusDialog statusDialog = new ChangeStatusDialog();
     DialogResult result = statusDialog.ShowDialog();
     if (result == DialogResult.OK)
     {
         cbStatuses.Items.Add(statusDialog.Status);
         cbStatuses.SelectedIndex = cbStatuses.Items.Count - 1;
     }
 }
Exemplo n.º 2
0
 private void cbStatuses_SelectedIndexChanged(object sender, EventArgs e)
 {
     #warning remove hadcoding
     if (cbStatuses.SelectedIndex == 5)
     {
         ChangeStatusDialog statusDialog = new ChangeStatusDialog();
         DialogResult result = statusDialog.ShowDialog();
         if (result == DialogResult.OK)
         {
             cbStatuses.Items.Add(statusDialog.Status);
             cbStatuses.SelectedIndex = cbStatuses.Items.Count - 1;
         }
     }
     else
     {
         OnChangeStatusEvent(cbStatuses.SelectedItem.ToString());
     }
 }