Esempio 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;
                }
            }
        }
        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();
            }
        }