コード例 #1
0
ファイル: MatchDisplayUI.cs プロジェクト: yjtang/AutoBws
 public MatchDisplayUI()
 {
     this._objMatchList = new List<MatchNew>();
     this._strCompany = "";
     this._isAutoRefresh = false;
     this._objWebsite = null;
 }
コード例 #2
0
ファイル: MatchDisplayUI.cs プロジェクト: yjtang/AutoBws
 public MatchDisplayUI(List<MatchNew> list1, string text1, WebSiteAbstractClass class1, bool flag1)
 {
     this._objMatchList = new List<MatchNew>();
     this._strCompany = "";
     this._isAutoRefresh = false;
     this._objWebsite = null;
     this._objMatchList = list1;
     this._strCompany = text1;
     this._objWebsite = class1;
     this._isAutoRefresh = flag1;
 }
コード例 #3
0
ファイル: frmMatchDisplayUI.cs プロジェクト: yjtang/AutoBws
 public frmMatchDisplayUI(List<MatchNew> list1, string text1, WebSiteAbstractClass class1, bool flag1)
 {
     base.Load += new EventHandler(this.frmMatchDisplayUI_Load);
     this._objMatchList = new List<MatchNew>();
     this._strCompany = "";
     this._isAutoRefresh = false;
     this._objWebsite = null;
     this.InitializeComponent();
     this._objMatchList = list1;
     this._strCompany = text1;
     this._objWebsite = class1;
     this._isAutoRefresh = flag1;
     this.Text = string.Format("{0} - Match Display UI", text1);
     this.get_dgvMatchDisplay().RefreshMatch(list1);
     this.get_tmrAutoRefresh().Enabled = flag1;
 }
コード例 #4
0
 private void set__objWebsite(WebSiteAbstractClass class1)
 {
     if (this.__objWebsite != null)
     {
         this.__objWebsite.remove_BetQueueListRefresh(new WebSiteAbstractClass.BetQueueListRefreshEventHandler(this.WebsiteBetSuccess));
         this.__objWebsite.remove_NewProgramLog(new WebSiteAbstractClass.NewProgramLogEventHandler(this.NewWebsiteProgramLog));
         this.__objWebsite.remove_LoginAccountProgress(new WebSiteAbstractClass.LoginAccountProgressEventHandler(this.UpdateWebsiteLoginStatus));
     }
     this.__objWebsite = class1;
     if (this.__objWebsite != null)
     {
         this.__objWebsite.add_BetQueueListRefresh(new WebSiteAbstractClass.BetQueueListRefreshEventHandler(this.WebsiteBetSuccess));
         this.__objWebsite.add_NewProgramLog(new WebSiteAbstractClass.NewProgramLogEventHandler(this.NewWebsiteProgramLog));
         this.__objWebsite.add_LoginAccountProgress(new WebSiteAbstractClass.LoginAccountProgressEventHandler(this.UpdateWebsiteLoginStatus));
     }
 }
コード例 #5
0
 public WebsiteBetQueueControl(WebSiteAbstractClass class1)
 {
     base.Resize += new EventHandler(this.WebsiteBetQueueControl_Resize);
     this._objLanguageListEN = new DataDescriptionList();
     this._objLanguageListCH = new DataDescriptionList();
     this._synchronisingObject = null;
     this._strCurrentLanguage = "en-us";
     this._isOddsTypeEnabled = false;
     this.InitializeComponent();
     this.set__objWebsite(class1);
     this.get__objWebsite().set_IsProgramLoggerEnabled(false);
     this.get_logWebsite().set_ContentLogger(new Logger(this.get__objWebsite().get_ProgramLogger().get_LogFilename(), this.get__objWebsite().get_ProgramLogger().get_LogBackupPath(), 0x200L, true, 0, Logger.eBackupOption.OnlyOneBackup));
     this.get_lstWebsiteBetQueueMonitor().set_BetQueueMonitorSource(this.get__objWebsite().get_BetQueueList());
     ComboBox box = this.get_cboWebsiteClientURL();
     this.get__objWebsite().get_LoginURLList().OutputToComboBox(ref box);
     this.set_cboWebsiteClientURL(box);
     if (this.get_cboWebsiteClientURL().Items.Count > 0)
     {
         this.get_cboWebsiteClientURL().SelectedIndex = 0;
     }
     else
     {
         this.get_cboWebsiteClientURL().Text = this.get__objWebsite().get_LoginURL();
     }
     if (CommonFunction.isFileExisted(Path.Combine(CommonFunction.GetAppPath(), @"Image\GreenBG.png")))
     {
         this._imgGreenBG = new Bitmap(Path.Combine(CommonFunction.GetAppPath(), @"Image\GreenBG.png"));
     }
     if (CommonFunction.isFileExisted(Path.Combine(CommonFunction.GetAppPath(), @"Image\Bad.png")))
     {
         this._imgSlow = new Bitmap(Path.Combine(CommonFunction.GetAppPath(), @"Image\Bad.png"));
     }
     if (CommonFunction.isFileExisted(Path.Combine(CommonFunction.GetAppPath(), @"Image\VeryGood.png")))
     {
         this._imgVeryGood = new Bitmap(Path.Combine(CommonFunction.GetAppPath(), @"Image\VeryGood.png"));
     }
     if (CommonFunction.isFileExisted(Path.Combine(CommonFunction.GetAppPath(), @"Image\Good.png")))
     {
         this._imgGood = new Bitmap(Path.Combine(CommonFunction.GetAppPath(), @"Image\Good.png"));
     }
     if (CommonFunction.isFileExisted(Path.Combine(CommonFunction.GetAppPath(), @"Image\VeryBad.png")))
     {
         this._imgVerySlow = new Bitmap(Path.Combine(CommonFunction.GetAppPath(), @"Image\VeryBad.png"));
     }
     if (CommonFunction.isFileExisted(Path.Combine(CommonFunction.GetAppPath(), @"Image\Normal.png")))
     {
         this._imgNormal = new Bitmap(Path.Combine(CommonFunction.GetAppPath(), @"Image\Normal.png"));
     }
     if (CommonFunction.isFileExisted(Path.Combine(CommonFunction.GetAppPath(), @"Image\NoSignal.png")))
     {
         this._imgNoSignal = new Bitmap(Path.Combine(CommonFunction.GetAppPath(), @"Image\NoSignal.png"));
         this.get_lblSignal().Image = this._imgNoSignal;
     }
     this.get_lstWebsiteBetList().SetSynchronizeInvoker((Form) this._synchronisingObject);
     this.get_lstWebsiteBetListFailed().SetSynchronizeInvoker((Form) this._synchronisingObject);
     this.get_lstWebsitePerMatchLimitList().SetSynchronizeInvoker((Form) this._synchronisingObject);
 }
コード例 #6
0
 public void SetBaseWebsite(WebSiteAbstractClass class1)
 {
     this._objBaseWebsite = class1;
 }
コード例 #7
0
ファイル: PlayerVariable.cs プロジェクト: yjtang/AutoBws
        /// <summary>
        /// 初始化玩家信息
        /// </summary>
        /// <param name="bet"></param>
        private void initBet(WebSiteAbstractClass bet)
        {
            bet.set_OddsRangeBad(dblAcceptedOddDifferentBad);
               bet.set_OddsRangeBetter(dblAcceptedOddDifferentBetter);
               bet.get_BetQueueList().SetInfo(intBetCreateExpiredMin, intBetOddsExpiredSec);
               bet.set_BetQueueMaxAttempt(intBetAttempt);
               bet.set_SpiderMethod(EnumCollection.eSpiderMethod.Full);
               bet.set_Name(bet.get_WebsiteName() + "_" + bet.get_AccountID());

               bet.set_IsToTryFuzzy(false);
               bet.set_IsToTryManualMatching(false);
               bet.set_IsSearchUsingSingleName(true);
               bet.set_IsToGetMatchResultList(false);

               bet.IsCanGetSoccer = true;
               bet.IsCanGetBasketball = true;
               bet.IsCanGetTennis = true;
               bet.IsCanGetFootball = true;
               bet.IsCanGetBaseball = true;
               //bet.IsCanGetBilliards  = true;
               //bet.IsCanGetBadminton = true;
        }
コード例 #8
0
ファイル: PlayerVariable.cs プロジェクト: yjtang/AutoBws
        /// <summary>
        /// 设置玩家监听事件
        /// </summary>
        /// <param name="gamer"></param>
        public void set_objGamer(WebSiteAbstractClass webSite)
        {
            if (this.gamer != null)
            {
                this.gamer.WebSite = webSite;

                // 注册监听器
                PlayerListener playerListener = new PlayerListener(gamer);
                playerListener.RegisterListener();

                // set ip
                if (!String.IsNullOrEmpty(gamer.Player.Ip))
                {
                    this.gamer.WebSite.setIpAdress(gamer.Player.Ip);
                }
            }
        }
コード例 #9
0
ファイル: PlayerListener.cs プロジェクト: yjtang/AutoBws
        /// <summary>
        ///  当投注额大于单场赛事限制投注额时,进行二分法投注
        /// </summary>
        /// <param name="gamerSite">博彩网</param>
        /// <param name="message">下注消息</param>
        /// <param name="currentBet">当前下注对象</param>
        private void TryBetAgain(WebSiteAbstractClass gamerSite, string message, AgentToClientBet currentBet)
        {
            if (message.Contains(IBC_STAKE_DESC) ||
                message.Contains(SBO_STAKE_DESC) ||
                message.Contains(IBC_BETCREDIT_DESC) ||
                message.Contains(SBO_BETCREDIT_DESC) ||
                currentBet.get_SourceAgentMemberBet().BetFailCount > ConstUtil.BET_FAIL_COUNT)
            {
                PlayerBetLog log = setBetLogMessage(message);
                DataServiceAdapter.SavePlayerBetLog(log);
                currentBet.set_IsRemoved(true);
            }
            else if (message.Contains(IBC_PERLIMIT) || message.Contains(SBO_PERLIMIT))
            {
                int betAmount = currentBet.get_TargetAmount();
                String[] arrays = message.Split(SPLIT);
                // 当单场赛事投注达到限制投注额时,将赌注降低为原来的一半进行下注
                if (arrays.Length == 2)
                {
                    betAmount = Conversions.ToInteger(arrays[1]) / 2;
                }
                currentBet.set_TargetAmount(betAmount);
                currentBet.set_BetAmountValue(MARK_VALUE);

                if (!gamerSite.get_IsGettingFullOdds())
                {
                    gamerSite.GetOddsFromServer();
                }
                List<MatchNew> newMatchNews = gamerSite.get_MatchListFull();
                MatchNew oldMatchNew = currentBet.get_TargetClientMatch();
                foreach (var newMatchNew in newMatchNews)
                {
                    // 取最新的赛事数据
                    if (oldMatchNew.get_FT_ID() == newMatchNew.get_FT_ID())
                    {
                        currentBet.set_TargetClientMatch(newMatchNew);
                        break;
                    }
                }
            }
            gamerSite.get_BetQueueList().UpdateBetMatchInfo(currentBet);
        }