Ejemplo n.º 1
0
        private void ReStartSbo(object obj)
        {
            SboEngine s = obj as SboEngine;

            Logger.Info("TAM DUNG SBO SCAN<<<<<<<<<<<<<<<<<<");
            s.OnExceptionEvent        -= OnExceptionEvent;
            s.UpdateLiveDataChange    -= sbobetUpdateChange_Event;
            s.UpdateNonLiveDataChange -= sbobetUpdateChange_Event;
            s.LogOff();

            if (s.ReLogin())
            {
                s.UpdateLiveDataChange    += sbobetUpdateChange_Event;
                s.UpdateNonLiveDataChange += sbobetUpdateChange_Event;
                s.OnExceptionEvent        += OnExceptionEvent;
                s.StartScanDriver(ScanType);

                switch (ScanType)
                {
                case eScanType.Live:
                    s.StartUpdateLiveDriver();
                    break;

                case eScanType.NonLive:
                    s.StartUpdateNonLiveDriver();
                    break;

                case eScanType.All:
                    s.StartUpdateLiveDriver();
                    s.StartUpdateNonLiveDriver();
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        private void ReStartSboBet(object obj)
        {
            SboEngine s = obj as SboEngine;

            UpdateLogText(string.Format("Mất kết nối tài khoản [{0}] đang thực hiện kết nối lại....", s.UserName), eLogTextType.Error);
            s.OnExceptionEvent -= SboBetOnOnExceptionEvent;
            s.LogOff();

            if (s.ReLogin())
            {
                s.OnExceptionEvent += SboBetOnOnExceptionEvent;
                s.StartBetRunEngine(scanType, true);
                UpdateLogText(string.Format("Kết nối tài khoản [{0}] thành công!", s.UserName), eLogTextType.Warning);
            }
        }
Ejemplo n.º 3
0
        private void ReStartSbo(object obj)
        {
            SboEngine s = obj as SboEngine;

            s.OnExceptionEvent        -= sboScan_OnExceptionEvent;
            s.UpdateLiveDataChange    -= sboScan_UpdateLiveDataChange;
            s.UpdateNonLiveDataChange -= sboScan_UpdateLiveDataChange;
            s.LogOff();

            if (s.ReLogin())
            {
                s.UpdateLiveDataChange    += sboScan_UpdateLiveDataChange;
                s.UpdateNonLiveDataChange += sboScan_UpdateLiveDataChange;
                s.OnExceptionEvent        += sboScan_OnExceptionEvent;
                s.StartBetRunEngine(scanType, false);
            }
        }
        private void ReStartSbo(object obj)
        {
            SboEngine s = obj as SboEngine;

            Logger.Info("TAM DUNG SBO SCAN<<<<<<<<<<<<<<<<<<");
            s.OnExceptionEvent     -= OnExceptionEvent;
            s.UpdateLiveDataChange -= sbobetUpdateChange_Event;
            s.LogOff();

            if (s.ReLogin())
            {
                s.UpdateLiveDataChange += sbobetUpdateChange_Event;
                s.OnExceptionEvent     += OnExceptionEvent;
                s.StartScanLiveDriver();
                s.StartUpdateLiveDriver();
            }
        }
Ejemplo n.º 5
0
        private void SboScan_OnExceptionEvent(ExceptionMessage logMsg, eServerType serverType, object obj)
        {
            SboEngine engine = obj as SboEngine;

            engine.OnExceptionEvent -= SboScan_OnExceptionEvent;
            engine.LogOff();

            while (engine.AccountStatus == eAccountStatus.Offline)
            {
                if (engine.ReLogin())
                {
                    engine.StartScanEngine(eScanType.Live);
                    engine.OnExceptionEvent += SboScan_OnExceptionEvent;
                    break;
                }

                Thread.Sleep(15000);
            }
        }