public FullSystemForm(int numberOfRaces, FullSystem fullSystem) { _numberOfRaces = numberOfRaces; _fullSystem = fullSystem; InitializeComponent(); }
public CheckWinningCombinationForm(FullSystem fs) { _fullSystem = fs; InitializeComponent(); }
public void CopyMainSelections(FullSystem other) { Debug.Assert(NumberOfRaces == other.NumberOfRaces); _developedCount = 0; _developedSystem.Clear(); _unitBet = other._unitBet; _needsToBeSaved = true; _needsToBeCounted = true; _raceTrack = other._raceTrack; _date = other._date; FirstRace = other.FirstRace; AddNonExistingHorses(other); RemoveNonSelectedHorses(other); for (int i = 0; i < _group.Count; ++i) { var lim = _group[i]; lim.SetFirstRace(FirstRace); } }
private void AddNonExistingHorses(FullSystem other) { for (int raceNumber = 0; raceNumber < NumberOfRaces; ++raceNumber) { RaceSelection rs = other.GetRaceSelection(raceNumber); for (int j = 0; j < rs.Count; ++j) { int horse = rs.Get(j); if (false == GetRaceSelection(raceNumber).ContainsHorse(horse)) { GetRaceSelection(raceNumber).AddHorse(horse); // this can be eliminated by using a pointer to parent but let's live with it for a while May102008 for (int groupIndex = 0; groupIndex < _group.Count; ++groupIndex) { _group[groupIndex].AddHorse(raceNumber, horse); } } } } }
private void Open(string filename) { _fullSystem = FullSystem.Make(filename); if (null != _fullSystem) { BindFullSystem(); OnCount(null, null); } Text = "[ Exotic Studio ] (c) Kasosoft 2008 - 2011 " + filename; _outputTextBox.Text = ""; }
private void RemoveNonSelectedHorses(FullSystem other) { for (int raceNumber = 0; raceNumber < NumberOfRaces; ++raceNumber) { RaceSelection rs = GetRaceSelection(raceNumber); for (int j = 0; j < rs.Count; ++j) { int horse = rs.Get(j); if (false == other.GetRaceSelection(raceNumber).ContainsHorse(horse)) { GetRaceSelection(raceNumber).Remove(horse); // this can be eliminated by using a pointer to parent but let's live with it for a while May102008 for (int groupIndex = 0; groupIndex < _group.Count; ++groupIndex) { _group[groupIndex].RemoveHorse(raceNumber, horse); } // The following statement that rolls back the index // was missing, thus creating a nusty bug // where a horse previously selected was not removed since its index // was skipped after the removal ... June082008 // PLEASE BE CAREFULL IN SIMILAR SITUATIONS IN THE FUTURE! --j; } } } }
private void OnEditFullSystem(object sender, EventArgs e) { var f = new FullSystemForm(_fullSystem.NumberOfRaces, _fullSystem); if (f.ShowDialog() == DialogResult.OK) { _fullSystem = f.GetFullSystem(); BindFullSystem(); } }
private void OnNew(object sender, EventArgs e) { OnFormIsClosing(null, null); var selectRaces = new SelectNumberOfRacesForm(); if (selectRaces.ShowDialog() == DialogResult.OK) { var f = new FullSystemForm(selectRaces.GetNumberOfRaces(), null); if (f.ShowDialog() == DialogResult.OK) { _fullSystem = f.GetFullSystem(); BindFullSystem(); this.Text = "[ Exotic Studio ] (c) Kasosoft 2008 - 2011 New System"; _outputTextBox.Text = ""; } } }
private void OnCloseDocument(object sender, EventArgs e) { OnFormIsClosing(null, null); _updateToolButtonsTimer.Stop(); _fullSystem = null; BindFullSystem(); _groupMatchesInputUserCtrl.BindFullSystem(_fullSystem); _updateToolButtonsTimer.Start(); }
public FrequenciesForm(FullSystem fs) { _fullSystem = fs; InitializeComponent(); }
public LimitationGroup(SerializationInfo info, StreamingContext ctxt) { _parent = null; _limitation = (ArrayList)info.GetValue("_limitationGroup", typeof(ArrayList)); }
public LimitationGroup(FullSystem parent) { _parent = parent; }
public void SetParent(FullSystem parent) { _parent = parent; }