예제 #1
0
        private void OnSave(object sender, EventArgs e)
        {
            try
            {
                if(null == _rti)
                {
                    _rti = RaceTracks.CreateNew(_tbTrackName.Text, _tbBrisAbrv.Text, _tbTrackCode.Text);
                }
                else
                {
                    _rti.SetValues(_tbTrackName.Text,_tbBrisAbrv.Text,_tbTrackCode.Text,false);
                }

                UpdateScreen();

                _dialogResult = DialogResult.OK;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
 public RaceTrackSettingForm(string trackCode)
 {
     _raceTrackInfo = RaceTracks.GetRaceTrackInfo(trackCode);
     InitializeComponent();
 }
예제 #3
0
 public void RemoveSiblingTrack(RaceTrackInfo other)
 {
     if ((other.TrackFlag & _siblingsFlag) == other.TrackFlag)
     {
         _siblingsFlag = _siblingsFlag & ~other.TrackFlag;
         UpdateSiblingsToDb();
         FactorPerformance.Reset();
     }
 }
예제 #4
0
 public bool IsSibling(RaceTrackInfo other)
 {
     return (_siblingsFlag & other.TrackFlag) == other.TrackFlag;
 }
예제 #5
0
 public EditRaceTrackInfoForm(RaceTrackInfo rti)
 {
     _rti = rti;
     InitializeComponent();
 }