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); } }
public RaceTrackSettingForm(string trackCode) { _raceTrackInfo = RaceTracks.GetRaceTrackInfo(trackCode); InitializeComponent(); }
public void RemoveSiblingTrack(RaceTrackInfo other) { if ((other.TrackFlag & _siblingsFlag) == other.TrackFlag) { _siblingsFlag = _siblingsFlag & ~other.TrackFlag; UpdateSiblingsToDb(); FactorPerformance.Reset(); } }
public bool IsSibling(RaceTrackInfo other) { return (_siblingsFlag & other.TrackFlag) == other.TrackFlag; }
public EditRaceTrackInfoForm(RaceTrackInfo rti) { _rti = rti; InitializeComponent(); }