private void AutoFSTimer_Tick(object sender, EventArgs e)
        {
            //加入重复任务检测就OK了
            for (int i = 0; i < _DTFleetFly.Rows.Count; i++)
            {
                if (((_DTFleetFly.Rows[i][InfoFleet.FFLtColumn.Content].ToString()) == "Attack") ||
                    ((_DTFleetFly.Rows[i][InfoFleet.FFLtColumn.Content].ToString()) == "FlightAttack") ||
                    ((_DTFleetFly.Rows[i][InfoFleet.FFLtColumn.Content].ToString()) == "Federation") ||
                    ((_DTFleetFly.Rows[i][InfoFleet.FFLtColumn.Content].ToString()) == "FlightEspionage"))
                {
                    if ((DateTime.Now.Subtract((DateTime)_DTFleetFly.Rows[i][InfoFleet.FFLtColumn.CreateTime]).Ticks > new TimeSpan(0, 2, 0).Ticks) &&
                        (((bool)_DTFleetFly.Rows[i][InfoFleet.FFLtColumn.FSWaring]) == false))
                    {
                        _DTFleetFly.Rows[i][InfoFleet.FFLtColumn.FSWaring] = true;
                        string     MsgStr = "http://uni8.cn.ogame.org/game/index.php?page=writemessages&session={0}&gesendet=1&messageziel={1}&to={2}&betreff={3}&text={4}";
                        WebBrowser MsgWB  = new WebBrowser();
                        string     cc     = string.Format(MsgStr, new string[] { _OGCOntrolManage._Session, _DTFleetFly.Rows[i][InfoFleet.FFLtColumn.PID].ToString(), _DTFleetFly.Rows[i][InfoFleet.FFLtColumn.PlayerName].ToString(), "无标题", "我在线,你就不用来了!!" });
                        MsgWB.Navigate(string.Format(MsgStr, new string[] { _OGCOntrolManage._Session, _DTFleetFly.Rows[i][InfoFleet.FFLtColumn.PID].ToString(), _DTFleetFly.Rows[i][InfoFleet.FFLtColumn.PlayerName].ToString(), "无标题", "我在线,你就不用来了!!" }));
                    }

                    if ((((TimeSpan)_DTFleetFly.Rows[i][InfoFleet.FFLtColumn.SurplusTime]).Ticks < new TimeSpan(0, 5, 0).Ticks) &&
                        (((bool)_DTFleetFly.Rows[i][InfoFleet.FFLtColumn.FS]) == false))
                    {
                        OGControl OGCl = ((OGControl)_OGCOntrolManage._OGControl[_DTFleetFly.Rows[i][InfoFleet.FFLtColumn.ReachPlace]]);

                        FlottenInfo FlottenI = new FlottenInfo(_WebsiteEx, _OGCOntrolManage._Session, OGCl.PlanetID);
                        FlottenI._DefaultFlottenState = EFlottenState.Flotten1;
                        FlottenI.Thisgalaxy           = OGCl.GalaxyLocation;
                        FlottenI.Thissystem           = OGCl.SystemLocation;
                        FlottenI.Thisplanet           = OGCl.PositionLocation;

                        FlottenI.Thisplanettype = "1";
                        FlottenI.Planettype     = "1";
                        FlottenI.Order          = OGCl._FSOrder;
                        FlottenI.Galaxy         = OGCl._FSGalaxy;
                        FlottenI.System         = OGCl._FSSystem;
                        FlottenI.Planet         = OGCl._FSPosition;
                        FlottenI.Speed          = OGCl._FSSheep;
                        _FlottenCmd.AddFlotten(FlottenI);

                        FSList.Items.Add(DateTime.Now.ToString() + "  " + OGCl.Planet + "(" + OGCl.Location + ")收到攻击,全舰队逃跑至" + OGCl._FSGalaxy.ToString() + OGCl._FSSystem.ToString() + OGCl._FSPosition.ToString());
                        _DTFleetFly.Rows[i][InfoFleet.FFLtColumn.FS] = true;
                    }
                }
            }
        }
        //分析建造链接
        private void SetBuildUrl(DataRow BuildDR, HtmlElement BuildInfoUp, ObjectInfo ORes, OGControl This)
        {
            if (BuildInfoUp.InnerHtml == null)
            {
                return;
            }
            if (BuildInfoUp.InnerHtml.Trim().Length == 0)
            {//没有内容说明不用升级
                ORes.Url   = "";
                ORes.State = EBuildState.Disabled;
            }
            else if (BuildInfoUp.InnerHtml.Trim().IndexOf("<A href") == 0)
            {//如果可以升级
             //string TmpUrl = BuildInfoUp.InnerHtml.Substring(BuildInfoUp.InnerHtml.IndexOf("index.php"));
             //TmpUrl = TmpUrl.Substring(0, TmpUrl.IndexOf("\">"));
             //ORes.Url = TmpUrl.Replace("amp;", "");//不知道是什么,必须剔除

                ORes.Url   = string.Format(BuildAdd, _This.Session, _This.PlanetID, BuildDR["gid"].ToString());
                ORes.State = EBuildState.Enabled;
            }
            else if (BuildInfoUp.InnerHtml.Trim().IndexOf("<DIV") == 0)
            {//正在升级中的建筑
                string TmpStr = BuildInfoUp.InnerHtml.Substring(BuildInfoUp.InnerHtml.IndexOf("index.php?"));
                //ORes.Url = TmpStr.Substring(0, TmpStr.IndexOf("\">")).Replace("amp;", "");
                ORes.Url   = string.Format(BuildRemove, _This.Session, _This.PlanetID);
                ORes.State = EBuildState.Uping;

                //当前建造情况
                TmpStr = TmpStr.Substring(TmpStr.IndexOf("pp='") + "pp='".Length);
                TmpStr = TmpStr.Substring(0, TmpStr.IndexOf("'"));
                //获得剩余时间

                //显示当前建造情况
                long     T       = (long)(Convert.ToDouble(TmpStr) * 10000000);
                DateTime DateEnd = DateTime.Now.AddTicks(T);

                //设置倒计时时间控件以及显示的Label
                _This.BuildNowCountdownEX.Max = ORes.Period.Ticks;
                _This.BuildNowCountdownEX.Tag = DateEnd;
                _This.BuildNowTimer.Tag       = _This.BuildNowCountdownEX;
                _This.BuildNowTimer.Start();

                //显示当前研究情况
                _This.BuildNowText.Text     = ORes.Text;
                _This.BuildNowTime.Text     = DateEnd.ToString("M-d HH:mm:ss");
                _This.BuildNowCancel.Tag    = ORes.Url;
                _This.BuildNowCancel.Click += new EventHandler(BuildName_Click);
                _This.BuildNow.Visible      = true;
            }
        }
 public BuildHelper(OGControl This)
 {
     _This = This;
 }
//        研究
//index.php?page=buildings&session=9458ca80224d&mode=Forschung&bau=111
//取消
//index.php?page=buildings&session=9458ca80224d&unbau=111&mode=Forschung&cp=33622696

        public ForschungHelper(OGControl This)
        {
            _This = This;
        }
 public VerteidigungHelper(OGControl This)
 {
     _This = This;
 }
 public FlotteHelper(OGControl This)
 {
     _This = This;
 }