Ejemplo n.º 1
0
        public static void Initialize()
        {
            IbetEngineObj       = new IbetEngine();
            SboEngineObj        = new SboEngine();
            IbetSboProcessorObj = new IbetSboProcessor();

            //DataContainer.IbetAccounts = new List<AccountDTO>()
            //{
            //    new AccountDTO() {Username = "******", Password = "******"}
            //};

            //DataContainer.SboAccounts = new List<AccountDTO>()
            //{
            //    new AccountDTO() {Username = "******", Password = "******"}
            //};

            //DataContainer.CookieContainer = new CookieContainer();
        }
Ejemplo n.º 2
0
        private void Init(IbetSboDriver driver, ServerCallback serverCallback)
        {
            if (!this.IsHandleCreated)
            {
                this.CreateHandle();
            }

            ID = Guid.NewGuid();
            SetDefaultStyle();
            Processor = new IbetSboProcessor(driver, serverCallback);
            //DataContainer.TransactionProcess.Add(Processor.TransactionQueue);
            IbetEngine = new IbetEngine();
            IbetEngine.RealIpAddress = IpReal;
            SboEngine = new SboEngine();
            SboEngine.RealIpAddress = IpReal;
            IbetEngine.TabCode      = Code;
            SboEngine.TabCode       = Code;

            cboIBetDomain.DataSource      = DataContainer.IbetServers;
            cboSboDomain.DataSource       = DataContainer.SboServers;
            dgvLeaguesSetting.DataSource  = DataContainer.LeaguesSettings;
            cboMarket.SelectedIndex       = 0;
            cboCompareValue.SelectedIndex = 0;
            cboMinOddDef.SelectedIndex    = 1;

            BindConvertStakeInfo();

            lblSboStatus.TextChanged  += OnStatusTextChanged;
            lblIbetStatus.TextChanged += OnStatusTextChanged;

            IbetEngine.OnLogOffEvent += OnLogOffEvent;
            SboEngine.OnLogOffEvent  += OnLogOffEvent;

            Processor.OnProcessStateChange     += ProcessorOnOnProcessStateChange;
            Processor.OnPingEvent              += ProcessorOnOnPingEvent;
            webIbetStatement.DocumentCompleted += OnIbetStatementDocumentCompleted;
            webSboStatement.DocumentCompleted  += OnSboStatementDocumentCompleted;

            timerCheck          = new System.Timers.Timer(60000 * 2);
            timerCheck.Elapsed += CheckInfoStatus;
        }
Ejemplo n.º 3
0
        public void InitProcessor(Guid processGuid, AccountDTO firstAccountDto, AccountDTO secondAccountDto)
        {
            try
            {
                IProcessor processor = new IbetSboProcessor();

                LoginEngine(firstAccountDto, ref processor);
                LoginEngine(secondAccountDto, ref processor);
                //processor.IbetEngine.InitEngine();
                //processor.SboEngine.InitEngine();
                //processor.Initialize();
                //processor.Start();
                ProcessorContainer.Add(processGuid, processor);
            }
            finally
            {
                //RemoveTab(firstAccountDto.GuidID);
                //RemoveTab(secondAccountDto.GuidID);
            }

            //Object.ReferenceEquals(n1.GetType(), n2.GetType()));
        }
Ejemplo n.º 4
0
        public Guid InitProcessor(IbetEngine ibetEngine, SboEngine sboEngine, ProcessorConfigInfoDTO secondAccountDto)
        {
            try
            {
                Guid       ni        = Guid.NewGuid();
                IProcessor processor = new IbetSboProcessor();
                processor.IbetEngine = ibetEngine;
                processor.SboEngine  = sboEngine;

                //processor.IbetEngine.InitEngine();
                //processor.SboEngine.InitEngine();
                //processor.Initialize();
                //processor.Start();
                ProcessorContainer.Add(ni, processor);
                return(ni);
            }
            finally
            {
                //RemoveTab(firstAccountDto.GuidID);
                //RemoveTab(secondAccountDto.GuidID);
            }

            //Object.ReferenceEquals(n1.GetType(), n2.GetType()));
        }