示例#1
0
        private void AddRadarButton_Click(object sender, EventArgs e)
        {
            Radar           r = new Radar(null, "", 0, 0);
            RadarEditDialog d = new RadarEditDialog(r);

            if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Radars.Add(r);
            }
        }
示例#2
0
 private void EditButton_Click(object sender, EventArgs e)
 {
     if (RadarComboBox.SelectedItem != null)
     {
         RadarEditDialog edit = new RadarEditDialog((Radar)RadarComboBox.SelectedItem);
         if (edit.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             RadarComboBox.Text = ((Radar)RadarComboBox.SelectedItem).ToString();
         }
     }
 }