상속: System.EventArgs
예제 #1
0
파일: Shape.cs 프로젝트: vCipher/NClass
 protected virtual void OnResize(ResizeEventArgs e)
 {
     if (Resize != null)
     {
         Resize(this, e);
     }
 }
예제 #2
0
파일: Shape.cs 프로젝트: vCipher/NClass
        private void PerformResize(SizeF mouseOffset)
        {
            SizeF sizeChange     = SizeF.Empty;
            SizeF positionChange = SizeF.Empty;

            if ((resizeMode & ResizeMode.Right) != 0)
            {
                sizeChange.Width += mouseOffset.Width;
            }
            else if ((resizeMode & ResizeMode.Left) != 0)
            {
                positionChange.Width += mouseOffset.Width;
                sizeChange.Width     -= mouseOffset.Width;
            }

            if ((resizeMode & ResizeMode.Bottom) != 0)
            {
                sizeChange.Height += mouseOffset.Height;
            }
            else if ((resizeMode & ResizeMode.Top) != 0)
            {
                positionChange.Height += mouseOffset.Height;
                sizeChange.Height     -= mouseOffset.Height;
            }

            ResizeEventArgs e = new ResizeEventArgs(positionChange, sizeChange);

            OnResizing(e);
            Size     += e.SizeChange.ToSize();
            Location += e.PositionChange.ToSize();
        }
예제 #3
0
        protected void ChildResized(object sender, ResizeEventArgs e)
        {
            var shape = (Shape)sender;

            if (shape.ParentShape != this)
            {
                return;
            }
            UpdateSize();
            UpdateMinSize();
        }
예제 #4
0
 protected override void OnResize(ResizeEventArgs e)
 {
     base.OnResize(e);
     if (editorShowed)
     {
         editor.Relocate(this);
         if (!editor.Focused)
         {
             editor.Focus();
         }
     }
 }
예제 #5
0
		protected override void OnResize(ResizeEventArgs e)
		{
			base.OnResize(e);
			if (editorShowed)
			{
				editor.Relocate(this);
				if (!editor.Focused)
					editor.Focus();
			}
		}
예제 #6
0
파일: Shape.cs 프로젝트: gbaychev/NClass
		protected virtual void OnResize(ResizeEventArgs e)
		{
			if (Resize != null)
				Resize(this, e);
		}
예제 #7
0
파일: Shape.cs 프로젝트: gbaychev/NClass
		private void PerformResize(PointF mouseLocation)
		{
			Size change = Size.Empty;

			if ((resizeMode & ResizeMode.Right) != 0)
			{
				int offset = (int) (mouseLocation.X - mouseDownLocation.X);
				change.Width += offset;
			}
			if ((resizeMode & ResizeMode.Bottom) != 0)
			{
				int offset = (int) (mouseLocation.Y - mouseDownLocation.Y);
				change.Height += offset;
			}

			ResizeEventArgs e = new ResizeEventArgs(change);
			OnResizing(e);
			Size += e.Change;
		}
예제 #8
0
		private void EndShapeResizing(object sender, ResizeEventArgs e)
		{
			foreach (BendPoint bendPoint in bendPoints.GetReversedList())
			{
				if (bendPoint.RelativeToStartShape)
					break;
				bendPoint.ShapeResized(e.Change);
			}
			
			Reroute();
			OnRouteChanged(EventArgs.Empty);
			OnModified(EventArgs.Empty);
		}
예제 #9
0
 protected virtual void OnResize(ResizeEventArgs e)
 {
     Resize?.Invoke(this, e);
 }