コード例 #1
0
ファイル: ToolPolygon.cs プロジェクト: gitter-badger/UROCare
 /// <summary>
 ///   Left nouse button is pressed
 /// </summary>
 /// <param name="drawArea"> </param>
 /// <param name="e"> </param>
 public override void OnMouseDown(TransparentCanvas drawArea, MouseEventArgs e)
 {
     // Create new polygon, add it to the list
     // and keep reference to it
     _newPolygon = new DrawPolygon(e.X, e.Y, e.X + 1, e.Y + 1);
     AddNewObject(drawArea, _newPolygon);
     _lastX = e.X;
     _lastY = e.Y;
 }
コード例 #2
0
 /// <summary>
 ///   Left nouse button is pressed
 /// </summary>
 /// <param name="drawArea"> </param>
 /// <param name="e"> </param>
 public override void OnMouseDown(TransparentCanvas drawArea, MouseEventArgs e)
 {
     // Create new polygon, add it to the list
     // and keep reference to it
     _newPolygon = new DrawPolygon(e.X, e.Y, e.X + 1, e.Y + 1);
     AddNewObject(drawArea, _newPolygon);
     _lastX = e.X;
     _lastY = e.Y;
 }
コード例 #3
0
ファイル: DrawPolygon.cs プロジェクト: gitter-badger/UROCare
        /// <summary>
        ///   Clone this instance
        /// </summary>
        public override DrawObject Clone()
        {
            var drawPolygon = new DrawPolygon();

            foreach (Point p in _pointArray)
            {
                drawPolygon._pointArray.Add(p);
            }

            FillDrawObjectFields(drawPolygon);
            return drawPolygon;
        }
コード例 #4
0
ファイル: DrawPolygon.cs プロジェクト: gitter-badger/UROCare
        /// <summary>
        ///   Clone this instance
        /// </summary>
        public override DrawObject Clone()
        {
            var drawPolygon = new DrawPolygon();

            foreach (Point p in _pointArray)
            {
                drawPolygon._pointArray.Add(p);
            }

            FillDrawObjectFields(drawPolygon);
            return(drawPolygon);
        }
コード例 #5
0
ファイル: ToolPolygon.cs プロジェクト: gitter-badger/UROCare
        public override void OnMouseUp(TransparentCanvas drawArea, MouseEventArgs e)
        {
            _newPolygon = null;

            base.OnMouseUp(drawArea, e);
        }
コード例 #6
0
        public override void OnMouseUp(TransparentCanvas drawArea, MouseEventArgs e)
        {
            _newPolygon = null;

            base.OnMouseUp(drawArea, e);
        }