Esempio n. 1
0
 private void btSaveHope_Click(object sender, EventArgs e)
 {
     if (hope == null)
     {
         try
         {
             hope = new HOPE(
                 Convert.ToDateTime(dtpDeparture.Value),
                 tbDescription.Text,
                 new GeoCoordinate(
                     Convert.ToDouble(tbLat1.Text + "." + tbLat2.Text),
                     Convert.ToDouble(tbLon2.Text + "." + tbLon2.Text)),
                 cbBoatType.SelectedItem as BoatType,
                 null,
                 null,
                 Convert.ToDateTime(dtpReturnDate.Value));
             MessageBox.Show(administration.AddMission(hope as Mission));
         }
         catch (FormatException)
         {
             MessageBox.Show("Invoer was fout"); // GEEN TIJD VOOR NETTERE OPLOSSING
         }
     }
     else
     {
         administration.ChangeMission(hope as Mission);
     }
 }
Esempio n. 2
0
        public HOPEForm(Administration administrationMain, HOPE hopeLoad)
        {
            InitializeComponent();
            administration = administrationMain;
            hope = hopeLoad;

            if (hope != null)
            {
                LoadHope();
            }

            this.LoadFunctions();
            this.LoadBoats();
            this.LoadMaterials();
        }