コード例 #1
0
ファイル: Form2.cs プロジェクト: jeldis/CSharp
        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
            RefreshLineSelection(e.Location);

            if (this.SelectedLine != null && Moving == null)
            {
                //this.Capture = true;
                Moving = new MoveInfo
                {
                    Line = this.SelectedLine,
                    StartLinePoint = SelectedLine.StartPoint,
                    EndLinePoint = SelectedLine.EndPoint,
                    StartMoveMousePoint = e.Location
                };
            }

            RefreshLineSelection(e.Location);

            pictureBox1.Refresh();
        }
コード例 #2
0
ファイル: Form2.cs プロジェクト: jeldis/CSharp
        private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
        {
            if (Moving != null)
            {
                this.Capture = false;
                Moving = null;
            }

            RefreshLineSelection(e.Location);

            pictureBox1.Refresh();
        }