Пример #1
0
        public void Initialize()
        {
            if (SboEngine.CheckLogin() && IbetEngine.CheckLogin())
            {
                if (SboEngine.Status == eServiceStatus.Unknown)
                {
                    SboBetPool = new Dictionary <string, int>();
                    //SboEngine.UpdateLiveDataChange += sbobetUpdateChange_Event;
                    //SboEngine.UpdateNonLiveDataChange += sbobetUpdateChange_Event;
                    SboEngine.OnExceptionEvent += OnExceptionEvent;
                    SboEngine.InitEngine();
                }

                if (IbetEngine.Status == eServiceStatus.Unknown)
                {
                    //IbetEngine.UpdateLiveDataChange += ibetUpdateChange_Event;
                    //IbetEngine.UpdateNonLiveDataChange += ibetUpdateChange_Event;

                    IbetEngine.OnExceptionEvent += OnExceptionEvent;
                    //IbetEngine.OnReConnectFail += IbetEngine_OnReConnectFail;
                    //IbetEngine.OnReConnectSuccess += IbetEngine_OnReConnectSuccess;
                    IbetBetPool = new Dictionary <string, int>();
                    IbetEngine.InitEngine();
                }

                Status = eServiceStatus.Initialized;
            }
        }
 public void Start()
 {
     if (IbetEngine.CheckLogin())
     {
         IbetEngine.InitEngine();
         IbetEngine.StartScanEngine();
     }
     else
     {
         StartServerFault startServerFault = new StartServerFault();
         startServerFault.ServerID = IbetEngine.Account.GuidID;
         startServerFault.Message  = "Login Fail !";
         throw new FaultException <StartServerFault>(startServerFault);
     }
 }