protected CoordinateTargetView(Target target, RenderTarget canvas, D2DFactory factory, CoordinateSystem coordinateSystem) : base(target) { if (target == null) { return; } this.canvas = canvas; this.factory = factory; CoordinateSystem = coordinateSystem; position = coordinateSystem.CoordinateToPoint(target.CurrentCoordinate); //计算显示坐标 activeRect = new Rect { Left = (int)position.X - activeRectRadius, Top = (int)position.Y - activeRectRadius, Right = (int)position.X + activeRectRadius, Bottom = (int)position.Y + activeRectRadius }; targetController = TargetManagerFactory.CreateTargetManagerController(); targetViewBrush = canvas.CreateSolidColorBrush(Tools.GetColorFFromRgb(255, 128, 0)); //橘黄 }
protected TargetManagerCommand() { targetController = TargetManagerFactory.CreateTargetManagerController(); }