public RegionalSettingsViewModel() { if (BoLib.getCountryCode() != BoLib.getSpainCountryCode()) { _isSpanishMachine = false; return; //not a spanish machine so dont load. } var i = 0; foreach (var s in _streetMarketRegions) { var sr = new SpanishRegional(); BoLib.getDefaultRegionValues(i, ref sr); _street.Add(new SpanishRegionalModel(_streetMarketRegions[i], sr)); i++; } var smLength = _streetMarketRegions.Length - 1; i = 0; foreach (var arcade in _arcadeRegions) { var sr = new SpanishRegional(); BoLib.getDefaultRegionValues(smLength + i, ref sr); _arcades.Add(new SpanishRegionalModel(_arcadeRegions[i], sr)); i++; } _editableLiveRegion = new SpanishRegionalModel("", new SpanishRegional()); SelectionChanged = false; AlwaysFichas = BoLib.getLiveElement((int)EspRegionalExt.EspAlwaysFichas); AutoTransferStake = BoLib.getLiveElement((int)EspRegionalExt.EspAutoTfxToStake); LoadSettings(); LoadSettingsView(); _startUpMultiplier = _editableLiveRegion.GamesPerPeriod; RaisePropertyChangedEvent("EditableLiveRegion"); RaisePropertyChangedEvent("Arcades"); RaisePropertyChangedEvent("Street"); RaisePropertyChangedEvent("Selected"); RaisePropertyChangedEvent("IsSpanishMachine"); }
public SpanishRegionalModel(string community, SpanishRegional region) { this.Community = community; this.GiveChangeThreshold = region.ChangeValue; this.CycleSize = region.CycleSize; this.FastTransfer = region.FastTransfer; this.GameTime = region.Gtime; this.MaxBank = region.MaxBank; this.MaxPlayerPoints = region.MaxPlayerPoints; this.MaxCredits = region.MaxCredit; this.MaxReserveCredits = region.MaxReserve; this.MaxStakeBank = region.MaxStakeFromBank; this.MaxStakeCredits = region.MaxStake; this.EscrowState = region.NoteEscrow; this.Rtp = region.Rtp; this.StakeMask = region.StakeMask; this.MaxWinPerStake = region.MaxWinPerStake; this.AllowBank2Credit = region.BankToCredits; this.ConvertToPlay = region.ChargeConvertPoints; this.MaxBankNote = region.MaxNote; this.GamesPerPeriod = region.GamesPerPeriod; }
public static extern void getRegionalValues(int index, ref SpanishRegional region);
void DoResetLiveToDefault() { var id = (Selected.VenueType == "Street Market") ? Selected.Id : Selected.Id + 1; var sr = new SpanishRegional(); BoLib.getDefaultRegionValues(id, ref sr); _editableLiveRegion = new SpanishRegionalModel(Selected.Community, sr); SaveChanges(); LoadSettings(); LoadSettingsView(); RaisePropertyChangedEvent("EditableLiveRegion"); }
public void SetRegion() { if (_arcadeSelectedIndex == -1 && _marketSelectedIndex == -1) return; var id = 0; if (_arcadeSelectedIndex >= 0) { Selected.VenueType = "Arcade"; Selected.Community = _arcadeRegions[_arcadeSelectedIndex]; id = Array.IndexOf(_arcadeRegions, Selected.Community) + (_streetMarketRegions.Length + 1); } else { Selected.VenueType = "Street Market"; Selected.Community = _streetMarketRegions[_marketSelectedIndex]; id = Array.IndexOf(_streetMarketRegions, Selected.Community);// +1; } var sr = new SpanishRegional(); BoLib.getDefaultRegionValues(id, ref sr); _editableLiveRegion = new SpanishRegionalModel(Selected.Community, sr); //_editableLiveRegion.Rtp;// /= 100; SelectionChanged = true; SaveChanges(); LoadSettings(); LoadSettingsView(); RaisePropertyChangedEvent("Selected"); RaisePropertyChangedEvent("EditableLiveRegion"); }