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