예제 #1
0
        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;
                    }
                }
            }
        }
예제 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            FlottenInfo FlottenI = new FlottenInfo(_WebsiteEx, _OGCOntrolManage._Session, ((OGControl)_OGCOntrolManage._OGControl["4:276:4"]).PlanetID);

            FlottenI._DefaultFlottenState = EFlottenState.Flotten1;
            FlottenI.Thisgalaxy           = "4";
            FlottenI.Thissystem           = "276";
            FlottenI.Thisplanet           = "4";

            FlottenI.Thisplanettype = "1";
            FlottenI.Planettype     = "1";
            FlottenI.Order          = "3";
            FlottenI.Galaxy         = FSgalaxy.Value.ToString();
            FlottenI.System         = FSsystem.Value.ToString();
            FlottenI.Planet         = FSplanet.Value.ToString();
            FlottenI.Speed          = FSspeed.Text;
            _FlottenCmd.AddFlotten(FlottenI);
        }
예제 #3
0
 /// <summary>
 /// 添加舰队任务
 /// </summary>
 /// <param name="FI"></param>
 public void AddFlotten(FlottenInfo FI)
 {
     //加入重复任务检测
     _FlottenList.Add(FI);
     RunFlotten();
 }