Exemplo n.º 1
0
        private void newCourseBTN_Click(object sender, EventArgs e)
        {
            Course oldCourse = _race.Course;
            Course c         = new Course("New Course", _race.UtcStart, _race.Lake);

            c.Save();
            _race.Course = c;
            _race.Save();
            EditCourses ec = new EditCourses(_race);

            ec.ShowDialog();
            if (ec.DialogResult == DialogResult.OK)
            {
                LoadCourses();
            }
            else
            {
                if (oldCourse != null)
                {
                    _race.Course = oldCourse;
                    _race.Save();
                    c.Delete();
                }
            }
        }
Exemplo n.º 2
0
        private void editCourseBTN_Click_2(object sender, EventArgs e)
        {
            BusyDialogManager.Show("Loading Course");
            EditCourses ec = new EditCourses(_race);

            BusyDialogManager.Hide();
            ec.ShowDialog(this.Parent);
            LoadCourses();
        }
Exemplo n.º 3
0
 private void newCourseBTN_Click(object sender, EventArgs e)
 {
     Course oldCourse = _race.Course;
     Course c = new Course("New Course", _race.UtcStart, _race.Lake);
     c.Save();
     _race.Course = c;
     _race.Save();
     EditCourses ec = new EditCourses(_race);
     ec.ShowDialog();
     if (ec.DialogResult == DialogResult.OK)
     {
         LoadCourses();
     }
     else
     {
         if (oldCourse != null)
         {
             _race.Course = oldCourse;
             _race.Save();
             c.Delete();
         }
     }
 }
Exemplo n.º 4
0
 private void editCourseBTN_Click_2(object sender, EventArgs e)
 {
     BusyDialogManager.Show("Loading Course");
     EditCourses ec = new EditCourses(_race);
     BusyDialogManager.Hide();
     ec.ShowDialog(this.Parent);
     LoadCourses();
 }