Beispiel #1
0
        private void _ipcClient_MessageReceived(object sender, IpcMessageEventArgs e)
        {
            switch (e.Message.MessageCode)
            {
            case IpcMessageCode.Unset:
                Trace.TraceError("Received IpcMessage with unset code.\n{0}", e.Message.Data.ToDataString());
                break;

            case IpcMessageCode.Debug:
                OnMessage(new DebugAnperiMessage(e.Message.Data));
                break;

            case IpcMessageCode.Error:
                OnMessage(new ErrorAnperiMessage(e.Message.Data));
                break;

            case IpcMessageCode.PeripheralEventFired:
                OnMessage(new EventFiredAnperiMessage(e.Message.Data));
                break;

            case IpcMessageCode.PeripheralDisconnected:
                IsPeripheralConnected = false;
                OnPeripheralDisconnected();
                break;

            case IpcMessageCode.PeripheralConnected:
                IsPeripheralConnected = true;
                var pCon = new PeripheralConnectedAnperiMessage(e.Message.Data);
                PeripheralInfo = pCon.PeripheralInfo;
                if (pCon.PeripheralInfo.Version != ApiVersion)
                {
                    OnIncompatibleDeviceConnected(pCon.PeripheralInfo);
                }
                else
                {
                    OnPeripheralConnected(new PeripheralConnectedAnperiMessage(e.Message.Data).PeripheralInfo);
                }
                break;

            case IpcMessageCode.ControlLost:
                HasControl = false;
                OnControlLost();
                break;

            case IpcMessageCode.NotClaimed:
                OnHostNotClaimed();
                break;

            case IpcMessageCode.ClaimControl:
            case IpcMessageCode.FreeControl:
            case IpcMessageCode.SetPeripheralLayout:
            case IpcMessageCode.SetPeripheralElementParam:
            default:
                Trace.TraceError("Message {0} not implemented, data:\n{1}", e.Message.MessageCode.ToString(), e.Message.Data.ToDataString());
                break;
            }
        }
        public StationWS GetStationProperties(string stationNumber, string sIpAddress, string teamViewerId, string serverVersion,
                                              PeripheralInfo pi, out valueForm hubResponse,
                                              out BsmHubConfigurationResponse hubConfigurationResponse, DriverInfo[] drivers)
        {
            StationWS testProperties = new StationWS();

            testProperties.isAnonymousBettingEnabled = true;
            testProperties.isStatisticsEnabled       = true;
            testProperties.allowMultiBet             = false;
            testProperties.allowOffLine = false;
            testProperties.barcodeScannerAlwayActive = false;
            testProperties.stationAutorestartTime    = "NONE";
            testProperties.doRestart                       = 0;
            testProperties.active                          = 3;
            testProperties.propertyPrematch                = 1;
            testProperties.propertyLiveMatch               = 0;
            testProperties.printingDefaultLanguage         = 7;
            testProperties.printingLanguageSetting         = 1;
            testProperties.propertyIdCard                  = 1;
            testProperties.propertyAutoLogout              = 0;
            testProperties.stationName                     = "Test Terminal";
            testProperties.locationName                    = "Test Location";
            testProperties.franchisorName                  = "Test Franchisor";
            testProperties.userCardPinSetting              = 3;
            testProperties.operatorCardPinSetting          = 1;
            testProperties.authorizedTicketScanning        = true;
            testProperties.creditNoteExpireDays            = 60;
            testProperties.payoutExpiredPaymentCreditNotes = false;
            testProperties.stationStoreTicketEnabled       = false;
            testProperties.allowMixedStakes                = true;
            testProperties.multiBetBonusFromOdd            = 2;
            testProperties.maxStakeSingleBet               = 500;
            testProperties.logRotationFileSize             = 20;
            testProperties.logRotationNumber               = 50;
            testProperties.maxOdd                          = 1000;
            testProperties.minStakeCombiBet                = 1;
            testProperties.maxStakeCombi                   = 500;
            testProperties.maxWinSingleBet                 = 2000;
            testProperties.minStakeSingleBet               = 1;
            testProperties.maxStakeSystemBet               = 1000;
            testProperties.minStakeSystemBet               = 1;
            testProperties.maxWinSystemBet                 = 10000;
            testProperties.displayTaxField                 = false;
            testProperties.maxSystemBet                    = 4;
            testProperties.stationAllowFutureMatches       = true;
            testProperties.enableOddsChangeIndication      = true;
            testProperties.sngLiveBetTicketAcceptTime      = 30;
            testProperties.combiLiveBetTicketAcceptTime    = 0;
            testProperties.minCombination                  = 2;
            testProperties.maxCombination                  = 20;
            testProperties.printLogo                       = true;
            testProperties.syncInterval                    = 1000;
            testProperties.cashAcceptorAlwayActive         = true;
            testProperties.franchisorID                    = 777;
            testProperties.locationID                      = 888;
            testProperties.vflVideoSourceType              = 0;
            testProperties.bonusRanges                     = new BonusRangeWS[0];
            testProperties.combiLimits                     = new CombiLimitWS[0];

            hubResponse        = new valueForm();
            hubResponse.fields = new valueField[0];

            hubConfigurationResponse = new BsmHubConfigurationResponse();

            return(testProperties);
        }
Beispiel #3
0
 protected virtual void OnIncompatibleDeviceConnected(PeripheralInfo msg)
 {
     IncompatibleDeviceConnected?.Invoke(this, new PeripheralConnectedEventArgs(msg));
 }
Beispiel #4
0
 protected virtual void OnPeripheralConnected(PeripheralInfo msg)
 {
     PeripheralConnected?.Invoke(this, new PeripheralConnectedEventArgs(msg));
 }
Beispiel #5
0
 public PeripheralConnectedEventArgs(PeripheralInfo peripheralInfo)
 {
     PeripheralInfo = peripheralInfo;
 }