Пример #1
0
        private void SatelliteEditBtn_Click(object sender, EventArgs e)
        {
            if (SelectedSatellite != null)
            {
                int index = fCalendar.Satellites.IndexOf(SelectedSatellite);

                SatelliteForm dlg = new SatelliteForm(SelectedSatellite);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    fCalendar.Satellites[index] = dlg.Satellite;
                    update_satellites();
                }
            }
        }
Пример #2
0
        private void SatelliteAddBtn_Click(object sender, EventArgs e)
        {
            Satellite s = new Satellite();

            s.Name = "New Satellite";

            SatelliteForm dlg = new SatelliteForm(s);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fCalendar.Satellites.Add(dlg.Satellite);
                update_satellites();
            }
        }