Exemple #1
0
        public bool MainUnion()
        {
            Application.DoEvents();
            if (_WB.Document.GetElementById("content") == null)
            {
                _WB.Navigate(_Navigate.EndUrl);
                return(true);
            }


            Rankings[] lRankings = new Rankings[100];
            int[]      Members   = new int[100];

            bool TmpInfo = GetUnionInfo(lRankings, Members);

            if (TmpInfo == false)
            {
                _WB.Navigate(_Navigate.EndUrl);
                _Log.AddInformation("<MainPlayer>" + "\"GetUnionInfo\"出错,重新扫描" + GetPlayerStart());
                return(true);
            }
            else
            {
                Count++;
            }

            //数据保存代码
            if (_TypeI == 0)//分数
            {
                _IOData.OutUnionRankings(lRankings, Members, "UnionPts");
                _IOData.UpDataUnionRankings(lRankings, Members);
            }
            else if (_TypeI == 1)//舰队
            {
                _IOData.OutUnionRankings(lRankings, "UnionFlt");
            }
            else if (_TypeI == 2)//研究
            {
                _IOData.OutUnionRankings(lRankings, "UnionEes");
            }



            if (lRankings[99].Name == null)
            {
                return(PlayerNextPage(true));
            }
            else
            {
                return(PlayerNextPage(false));
            }
        }
Exemple #2
0
        /// <summary>
        /// 个人扫描
        /// </summary>
        public bool MainPlayer()
        {
            Application.DoEvents();
            if (_WB.Document.GetElementById("content") == null)
            {
                _WB.Navigate(_Navigate.EndUrl);
                return(true);
            }


            Rankings[] lRankings = new Rankings[100];

            bool TmpInfo = GetPlayerInfo(lRankings);

            if (TmpInfo == false)
            {
                _WB.Navigate(_Navigate.EndUrl);
                _Log.AddInformation("<MainPlayer>" + "\"GetPlayerInfo\"出错,重新扫描" + GetPlayerStart());
                return(true);
            }

            //数据保存代码
            if (_TypeI == 0)//分数
            {
                _IOData.OutRankings(lRankings, "UserPts");
                _IOData.UpDataRankings(lRankings);
            }
            else if (_TypeI == 1)//舰队
            {
                _IOData.OutRankings(lRankings, "UserFlt");
            }
            else if (_TypeI == 2)//研究
            {
                _IOData.OutRankings(lRankings, "UserEes");
            }

            Count++;

            if (lRankings[99].Name == _OldName)
            {
                _OldName = "";
                return(PlayerNextPage(true));
            }
            else
            {
                _OldName = lRankings[99].Name;
                return(PlayerNextPage(false));
            }
        }