コード例 #1
0
        private void Save()
        {
            Rides ride = new Rides(dateTimePicker1.Value, Direction.directions[comboBox1.SelectedIndex]);

            ride.bus    = Bus.buss[comboBox2.SelectedIndex];
            ride.driver = Driver.drivers[comboBox3.SelectedIndex];

            Rides.rides.Add(ride);
            Rides.SaveRides();
            LoadRiders();
        }
コード例 #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Rides.rides.RemoveAt(listBox1.SelectedIndex);
     Rides.SaveRides();
     LoadRiders();
 }