コード例 #1
0
        public void Click(RadarForm form, MouseEventArgs e)
        {
            Point cursorPosition = form.PointToClient(Cursor.Position);
            var   cursorRect     = new Rectangle(cursorPosition.X, cursorPosition.Y, 5, 5);

            try
            {
                foreach (PGameObject node in ObjectManager.GetGameObject)
                {
                    if (FindNode.IsHerb(node) || FindNode.IsMine(node))
                    {
                        float x       = form.OffsetX(node.Location.X, ObjectManager.MyPlayer.Location.X);
                        float y       = form.OffsetY(node.Location.Y, ObjectManager.MyPlayer.Location.Y);
                        var   objRect = new Rectangle((int)y, (int)x, 5, 5);
                        if (Rectangle.Intersect(objRect, cursorRect) != Rectangle.Empty)
                        {
                            if (FlyingBlackList.IsBlacklisted(node))
                            {
                                FlyingBlackList.Unblacklist(node);
                            }
                            else
                            {
                                Logging.Write("Added the node to the permanent blacklist");
                                FlyingBlackList.AddBadNode(node);
                            }
                        }
                    }
                }
            }
            catch
            {
            }
        }
コード例 #2
0
ファイル: DrawWaypoints.cs プロジェクト: semi420/lazybot
 private void PrintWay(List <Location> loc, Color color, RadarForm form)
 {
     if (loc != null)
     {
         PointF[] points;
         Point    tempP;
         Location ld;
         if (loc.Count != 0)
         {
             points = new PointF[loc.Count + 1];
             int i = 0;
             foreach (Location lo in loc)
             {
                 form.PrintCircle(color, form.OffsetY(lo.Y, ObjectManager.MyPlayer.Location.Y),
                                  form.OffsetX(lo.X, ObjectManager.MyPlayer.Location.X), "");
                 tempP = new Point(form.OffsetY(lo.Y, ObjectManager.MyPlayer.Location.Y),
                                   form.OffsetX(lo.X, ObjectManager.MyPlayer.Location.X));
                 points[i] = tempP;
                 i++;
             }
             ld    = loc[0];
             tempP = new Point(form.OffsetY(ld.Y, ObjectManager.MyPlayer.Location.Y),
                               form.OffsetX(ld.X, ObjectManager.MyPlayer.Location.X));
             points[i] = tempP;
             form.ScreenDc.DrawLines(new Pen(_colorWaypoints), points);
         }
     }
 }
コード例 #3
0
ファイル: DrawUnits.cs プロジェクト: semi420/lazybot
        public void Draw(RadarForm form)
        {
            const string othTop = "";
            string       othBot;

            foreach (PUnit mob in ObjectManager.GetUnits)
            {
                if (mob.GUID.Equals(ObjectManager.MyPlayer.GUID))
                {
                    continue;
                }

                if (mob.IsPlayer)
                {
                    continue;
                }

                if (mob.IsDead)
                {
                    continue;
                }

                othBot = mob.Name + " ";
                othBot = othBot.TrimEnd();

                form.PrintArrow(_colorUnits,
                                form.OffsetY(mob.Location.Y, ObjectManager.MyPlayer.Location.Y),
                                form.OffsetX(mob.Location.X, ObjectManager.MyPlayer.Location.X),
                                mob.Facing, othTop, othBot);
            }
        }
コード例 #4
0
 public void Draw(RadarForm form)
 {
     if (FlyingEngine.CurrentProfile != null)
     {
         FlyingProfile temp = FlyingEngine.CurrentProfile;
         PrintWay(temp.GetListSortedAfterDistance(ObjectManager.MyPlayer.Location), _colorWaypoints, form);
         PrintWay(temp.GetListSortedAfterDistance(ObjectManager.MyPlayer.Location, temp.WaypointsToTown),
                  _colorToTown, form);
     }
 }
コード例 #5
0
ファイル: DrawWaypoints.cs プロジェクト: semi420/lazybot
 public void Draw(RadarForm form)
 {
     /*
      * if (GrindingEngine.CurrentProfile != null)
      * {
      *  GrindingProfile temp = GrindingEngine.CurrentProfile;
      *  PrintWay(temp.GetListSortedAfterDistance(ObjectManager.MyPlayer.Location), _colorWaypoints, form);
      *  PrintWay(temp.GetListSortedAfterDistance(ObjectManager.MyPlayer.Location, temp.WaypointsGhost), _colorGhost, form);
      *  PrintWay(temp.GetListSortedAfterDistance(ObjectManager.MyPlayer.Location, temp.WaypointsToTown), _colorToTown, form);
      * } */
 }
コード例 #6
0
 private void OpenRadar()
 {
     if (_radar != null && !_radar.IsDisposed)
     {
         _radar.Close();
     }
     _radar = new RadarForm();
     foreach (IDrawItem drawItem in EngineHandler.GetRadarDraw())
     {
         _radar.AddDrawItem(drawItem);
     }
     foreach (IMouseClick mouseClick in EngineHandler.GetRadarClick())
     {
         _radar.AddMonitorMouseClick(mouseClick);
     }
     _radar.Show();
 }
コード例 #7
0
ファイル: DrawEnemies.cs プロジェクト: civicacid/myevo
 public void Draw(RadarForm form)
 {
     string othBot;
     foreach (
         PPlayer play in
             ObjectManager.GetPlayers.Where(
                 cur => !cur.PlayerFaction.Equals(ObjectManager.MyPlayer.PlayerFaction)))
     {
         if (play.GUID.Equals(ObjectManager.MyPlayer.GUID))
             continue;
         string othTop = play.Name;
         othBot = " Lvl: " + play.Level;
         othBot = othBot.TrimEnd();
         form.PrintArrow(_colorEnemies, form.OffsetY(play.Location.Y, ObjectManager.MyPlayer.Location.Y),
                         form.OffsetX(play.Location.X, ObjectManager.MyPlayer.Location.X),
                         play.Facing, othTop, othBot);
     }
 }
コード例 #8
0
        protected virtual void OnSearchButton()
        {
            var rdr = Activator.CreateInstance(dbManager.RadarDocument, dbManager.RadarParams);

            Debug.Assert(rdr is IRadarForm);
            RadarForm myRadar = rdr as RadarForm;

            myRadar.FindQuery = string.Empty;
            ERPFramework.GlobalInfo.StyleManager.Clone(myRadar);

            if (dbManager.Status == DBMode.Find)
            {
                myRadar.FindQuery = PrepareFindQuery();
            }

            myRadar.RadarFormRowSelected += new RadarForm.RadarFormRowSelectedEventHandler(myRadar_RadarFormRowSelected);
            myRadar.ShowDialog(GlobalInfo.MainForm);
            myRadar.RadarFormRowSelected -= new RadarForm.RadarFormRowSelectedEventHandler(myRadar_RadarFormRowSelected);
        }
コード例 #9
0
ファイル: DrawEnemies.cs プロジェクト: semi420/lazybot
        public void Draw(RadarForm form)
        {
            string othBot;

            foreach (
                PPlayer play in
                ObjectManager.GetPlayers.Where(
                    cur => !cur.PlayerFaction.Equals(ObjectManager.MyPlayer.PlayerFaction)))
            {
                if (play.GUID.Equals(ObjectManager.MyPlayer.GUID))
                {
                    continue;
                }
                string othTop = play.Name;
                othBot = " Lvl: " + play.Level;
                othBot = othBot.TrimEnd();
                form.PrintArrow(_colorEnemies, form.OffsetY(play.Location.Y, ObjectManager.MyPlayer.Location.Y),
                                form.OffsetX(play.Location.X, ObjectManager.MyPlayer.Location.X),
                                play.Facing, othTop, othBot);
            }
        }
コード例 #10
0
ファイル: DrawNodes.cs プロジェクト: semi420/lazybot
 public void Draw(RadarForm form)
 {
     foreach (PGameObject selectNode in ObjectManager.GetGameObject)
     {
         if (FindNode.IsHerb(selectNode) || FindNode.IsMine(selectNode))
         {
             if (FlyingBlackList.IsBlacklisted(selectNode))
             {
                 form.PrintCircle(_colorBadNodes,
                                  form.OffsetY(selectNode.Location.Y, ObjectManager.MyPlayer.Location.Y),
                                  form.OffsetX(selectNode.Location.X, ObjectManager.MyPlayer.Location.X),
                                  selectNode.Name);
             }
             else
             {
                 form.PrintCircle(_colorObjects,
                                  form.OffsetY(selectNode.Location.Y, ObjectManager.MyPlayer.Location.Y),
                                  form.OffsetX(selectNode.Location.X, ObjectManager.MyPlayer.Location.X),
                                  selectNode.Name);
             }
         }
     }
 }
コード例 #11
0
ファイル: DrawUnits.cs プロジェクト: civicacid/myevo
        public void Draw(RadarForm form)
        {
            const string othTop = "";
            string othBot;
            foreach (PUnit mob in ObjectManager.GetUnits)
            {
                if (mob.GUID.Equals(ObjectManager.MyPlayer.GUID))
                    continue;

                if (mob.IsPlayer)
                    continue;

                if (mob.IsDead)
                    continue;

                othBot = mob.Name + " ";
                othBot = othBot.TrimEnd();

                form.PrintArrow(_colorUnits,
                                form.OffsetY(mob.Location.Y, ObjectManager.MyPlayer.Location.Y),
                                form.OffsetX(mob.Location.X, ObjectManager.MyPlayer.Location.X),
                                mob.Facing, othTop, othBot);
            }
        }
コード例 #12
0
ファイル: DrawObjects.cs プロジェクト: civicacid/myevo
 public void Draw(RadarForm form)
 {
     foreach (PGameObject selectNode in ObjectManager.GetGameObject)
     {
         if (selectNode.Name.Contains("Survey"))
         {
             try
             {
                 form.PrintArrow(_colorObjects,
                                 form.OffsetY(selectNode.Location.Y, ObjectManager.MyPlayer.Location.Y),
                                 form.OffsetX(selectNode.Location.X, ObjectManager.MyPlayer.Location.X),
                                 selectNode.Facing, selectNode.Name, "");
                 Logging.Write("" + selectNode.Facing);
             } catch {}
         }
         else
         {
             form.PrintCircle(_colorObjects,
                              form.OffsetY(selectNode.Location.Y, ObjectManager.MyPlayer.Location.Y),
                              form.OffsetX(selectNode.Location.X, ObjectManager.MyPlayer.Location.X),
                              selectNode.Name);
         }
     }
 }
コード例 #13
0
ファイル: DrawObjects.cs プロジェクト: semi420/lazybot
 public void Draw(RadarForm form)
 {
     foreach (PGameObject selectNode in ObjectManager.GetGameObject)
     {
         if (selectNode.Name.Contains("Survey"))
         {
             try
             {
                 form.PrintArrow(_colorObjects,
                                 form.OffsetY(selectNode.Location.Y, ObjectManager.MyPlayer.Location.Y),
                                 form.OffsetX(selectNode.Location.X, ObjectManager.MyPlayer.Location.X),
                                 selectNode.Facing, selectNode.Name, "");
                 Logging.Write("" + selectNode.Facing);
             } catch {}
         }
         else
         {
             form.PrintCircle(_colorObjects,
                              form.OffsetY(selectNode.Location.Y, ObjectManager.MyPlayer.Location.Y),
                              form.OffsetX(selectNode.Location.X, ObjectManager.MyPlayer.Location.X),
                              selectNode.Name);
         }
     }
 }