示例#1
0
 private void comboBoxNavigator_SelectedIndexChanged(object sender, EventArgs e)
 {
     NavigatorId = -1;
     if (comboBoxNavigator.SelectedIndex >= 0)
     {
         if (Navigator == null)
         {
             Navigator = new SubscriberSet();
         }
         int _id = -1;
         NavigatorName = comboBoxNavigator.Text;
         if (int.TryParse(comboBoxNavigator.SelectedValue.ToString(), out _id))
         {
             NavigatorId = _id;
             Navigator   = ListParticipants.FirstOrDefault(r => r.Id == _id);
         }
     }
     UpdateEnablement();
 }
示例#2
0
 private void comboBoxPilot_SelectedIndexChanged(object sender, EventArgs e)
 {
     PilotId = -1;
     if (Pilot == null)
     {
         Pilot = new SubscriberSet();
     }
     if (comboBoxPilot.SelectedIndex > 0)
     {
         int _id = -1;
         PilotName = comboBoxPilot.Text;
         if (int.TryParse(comboBoxPilot.SelectedValue.ToString(), out _id))
         {
             PilotId = _id;
             Pilot   = ListParticipants.Find(r => r.Id == _id);
         }
     }
     UpdateEnablement();
 }