Esempio n. 1
0
        private void boatEditBTN_Click(object sender, EventArgs e)
        {
            //int id = int.Parse(boatsLV.Items[boatsLV.SelectedIndices[0]].SubItems[5].Text);
            Boat     b  = _boats[boatsLV.SelectedIndices[0]];//Boat.FindById(id);
            EditBoat eb = new EditBoat(b);

            eb.ShowDialog();
            if (eb.Boat != null)
            {
                b = eb.Boat;
                b.Save();
                LoadBoats();
            }
        }
Esempio n. 2
0
        private void newBoatBTN_Click_1(object sender, EventArgs e)
        {
            Boat     b  = new Boat("New Boat", "Sail Number", AmphibianSoftware.VisualSail.Library.ColorHelper.AutoColorPick(_race.Boats.Count).ToArgb(), BoatType.FindAll()[0]);
            EditBoat eb = new EditBoat(b);

            eb.ShowDialog();
            if (eb.DialogResult == DialogResult.OK)
            {
                b = eb.Boat;
                b.Save();

                //EditSensorFiles esf = new EditSensorFiles(b);
                //esf.ShowDialog();
                ImportFiles imfi = new ImportFiles(b);
                imfi.ShowDialog();
                b.RefreshGpsBounds();

                _boats.Add(b);
                _race.Boats.Add(b);

                LoadBoats();
            }
        }
Esempio n. 3
0
        private void newBoatBTN_Click_1(object sender, EventArgs e)
        {
            Boat b = new Boat("New Boat", "Sail Number", AmphibianSoftware.VisualSail.Library.ColorHelper.AutoColorPick(_race.Boats.Count).ToArgb(), BoatType.FindAll()[0]);
            EditBoat eb = new EditBoat(b);
            eb.ShowDialog();
            if (eb.DialogResult==DialogResult.OK)
            {
                b = eb.Boat;
                b.Save();
                
                //EditSensorFiles esf = new EditSensorFiles(b);
                //esf.ShowDialog();
                ImportFiles imfi = new ImportFiles(b);
                imfi.ShowDialog();
                b.RefreshGpsBounds();

                _boats.Add(b);
                _race.Boats.Add(b);

                LoadBoats();
            }
        }
Esempio n. 4
0
 private void boatEditBTN_Click(object sender, EventArgs e)
 {
     //int id = int.Parse(boatsLV.Items[boatsLV.SelectedIndices[0]].SubItems[5].Text);
     Boat b = _boats[boatsLV.SelectedIndices[0]];//Boat.FindById(id);
     EditBoat eb = new EditBoat(b);
     eb.ShowDialog();
     if (eb.Boat != null)
     {
         b = eb.Boat;
         b.Save();
         LoadBoats();
     }
 }