Ejemplo n.º 1
0
 internal void OnDataClick(object sender, ChartPoint point)
 {
     if (DataClick != null)
     {
         DataClick.Invoke(sender, point);
     }
 }
Ejemplo n.º 2
0
 public CartesianChart()
 {
     Child              = WpfBase;
     WpfBase.DataClick += (o, point) =>
     {
         if (DataClick != null)
         {
             DataClick.Invoke(o, point);
         }
     };
 }
Ejemplo n.º 3
0
 public PieChart()
 {
     Child            = Chart;
     Chart.DataClick += (o, point) =>
     {
         if (DataClick != null)
         {
             DataClick.Invoke(o, point);
         }
     };
 }
Ejemplo n.º 4
0
        private void DataMouseDown(object sender, MouseEventArgs e)
        {
            var result = Series.SelectMany(x => x.Values.Points).FirstOrDefault(x =>
            {
                var pointView = x.View as PointView;
                return(pointView != null && Equals(pointView.HoverShape, sender));
            });

            if (DataClick != null)
            {
                DataClick.Invoke(sender, result);
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PieChart"/> class.
 /// </summary>
 public PieChart()
 {
     Child              = WpfBase;
     WpfBase.DataClick += (o, point) =>
     {
         if (DataClick != null)
         {
             DataClick.Invoke(o, point);
         }
     };
     if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
     {
         WpfBase.Series = WpfBase.GetDesignerModeCollection();
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 鼠标点击指令
 /// </summary>
 /// <param name="xy">坐标</param>
 /// <param name="OffsetX">偏移X</param>
 /// <param name="OffsetY">偏移Y</param>
 /// <returns></returns>
 public static Point Click(DataClick xy, int delayTime = 0, int OffsetX = 0, int OffsetY = 0)
 {
     if (xy == null)
     {
         return(Point.Empty);
     }
     if (GlobalObject.GameHandle.IsSuccess)
     {
         return(Click(GlobalObject.GameHandle, xy.GetXY(), delayTime + Random(50, 100), OffsetX, OffsetY));
     }
     else
     {
         throw new Exceptions.NoGameHandleException();
     }
 }
Ejemplo n.º 7
0
        /// <summary>
        /// 补给舰队
        /// </summary>
        /// <param name="GroupMember"></param>
        public void Supply(LuaTable GroupMember)
        {
补给队伍:
            int i = 0;

            /*
             * while (true)
             * {
             *  if (Judge(DataJudgePonds.补给页))
             *  {
             *      if (Judge(new DataJudge("145,118 @ 23A0A1|23A0A1|D4E1DE|FFF6F2", "补给队伍1")))
             *          break;
             *      else
             *      {
             *          Click(new DataClick("145,117|152,120", "补给队伍1"));
             *          i = 0;
             *      }
             *  }
             *  Overtime(ref i, 30000);
             * }*/

            if (!Judge(DataJudgePonds.补给页))
            {
                throw new Exceptions.TimeOutException("补给页判定异常错误!!");
            }

            // 检测舰船数量
            int p = 0;

            for (i = 0; i < 6; i++)
            {
                if (Judge(DataJudgePonds.补给舰娘存活List[i]))
                {
                    p++;
                }
            }
            p = 6 - p;// 队伍中的舰娘数量

            bool isOnece = true;

            foreach (dynamic item in GroupMember)
            {
                if ((bool)(item.Value) == false)
                {
                    isOnece = false;
                    break;
                }
            }
            if (isOnece == false)
            {
                // 执行单舰补给
                var 单舰补给选择框 = new DataClick("115,164|120,169");
                for (int j = 0; j < p; j++)
                {
                    if ((bool)GroupMember[j + 1])
                    {
                        if (Judge(DataJudgePonds.补油判定List[j]) && Judge(DataJudgePonds.补弹判定List[j]))
                        {
                            continue;
                        }
                        else
                        {
                            i = 0;
                            while (true)
                            {
                                if (Judge(new DataJudge("695,440 @ 494949|535353|A0A0A0|B9B9B9", "まとめと补给灰")) &&
                                    !(Judge(DataJudgePonds.补油判定List[j]) && Judge(DataJudgePonds.补弹判定List[j])))
                                {
                                    Click(单舰补给选择框, 200, 0, 52 * j);
                                    i = 0;
                                }
                                else if (Judge(new DataJudge("695,440 @ 045758|285950|D1D6CB|FFF5F1", "まとめと补给可选")) ||
                                         Judge(new DataJudge("695,440 @ C5560D|B06F2C|FFCFAC|FFE0D3", "まとめと补给已选")))
                                {
                                    Click(new DataClick("671,435|740,448", "まとめて補給"));
                                    i = 0;
                                }
                                else if (Judge(DataJudgePonds.补油判定List[j]) && Judge(DataJudgePonds.补弹判定List[j]))
                                {
                                    break;
                                }
                                Overtime(ref i, 30000);
                            }
                        }
                    }
                }
                return;
            }

            for (int j = 0; j < p; j++)
            {
                if (Judge(DataJudgePonds.补油判定List[j]) && Judge(DataJudgePonds.补弹判定List[j]))
                {
                    continue;
                }
                else
                {
                    // 执行一键补给 // 2015年10月9日UI更新应对
                    i = 0;
                    while (true)
                    {
                        if (Judge(DataJudgePonds.非全舰补给) || Judge(DataJudgePonds.全舰补给))
                        {
                            Click(DataClickPonds.一括补给);
                            Delay(200);
                            goto 补给队伍;
                        }
                        Overtime(ref i, 30000);
                    }
                }
            }
        }
Ejemplo n.º 8
0
 internal void OnDataClick(object sender, ChartPoint point)
 {
     DataClick?.Invoke(sender, point);
 }