コード例 #1
0
ファイル: Flow.xaml.cs プロジェクト: jcs-okn/jobarg_manager
        /// <summary>ジョブを移動する時、フローの処理</summary>
        /// <param name="sender">源</param>
        /// <param name="e">マウスイベント</param>
        private void OnItemMove(CommonItem a, MouseEventArgs e)
        {
            if (a != EndItem && a != BeginItem)
            {
                return;
            }

            // 一旦削除(連接点の変更用)
            //if (this._MoveType == LineMoveType.Begin || this._MoveType == LineMoveType.End)
            //    return;

            List <Point> connPoints = CommonUtil.GetConnectPoints(_beginItem, _endItem);

            if (connPoints != null && connPoints.Count == 2)
            {
                this.BeginPosition = connPoints[0];
                this.EndPosition   = connPoints[1];
            }

            // 一旦削除(連接点が固定)

            //if (BeginItem == a)
            //{
            //    if (beginConType == ConnectType.LEFT)
            //    {
            //        this.BeginPosition = a.LeftConnectPosition;
            //    }
            //    else if (beginConType == ConnectType.RIGHT)
            //    {
            //        this.BeginPosition = a.RightConnectPosition;
            //    }
            //    else if (beginConType == ConnectType.TOP)
            //    {
            //        this.BeginPosition = a.TopConnectPosition;
            //    }
            //    else if (beginConType == ConnectType.BOTTOM)
            //    {
            //        this.BeginPosition = a.BottomConnectPosition;

            //    }

            //}
            //else if (EndItem == a)
            //{
            //    if (endConType == ConnectType.LEFT)
            //    {
            //        this.EndPosition = a.LeftConnectPosition;

            //    }
            //    else if (endConType == ConnectType.RIGHT)
            //    {
            //        this.EndPosition = a.RightConnectPosition;
            //    }
            //    else if (endConType == ConnectType.TOP)
            //    {
            //        this.EndPosition = a.TopConnectPosition;
            //    }
            //    else if (endConType == ConnectType.BOTTOM)
            //    {
            //        this.EndPosition = a.BottomConnectPosition;
            //    }
            //}
        }