Code Search for Developers
 
 
  

ControlPoint.cs from MASE: Agile Software Engineering at Krugle


Show ControlPoint.cs syntax highlighted

using System;
using System.Drawing;
using System.Collections;
using Tao.Platform.Windows;
using Tao.OpenGl;


namespace New_Study_Project
{
	public class ControlPoint 
	{
		/* Definitions of the Program */

		public enum State{OnlyCircle, CornerDownLeft, CornerDownRight, CornerUpLeft, CornerUpRight, LineDown, LineRight, LineUp, LineLeft};

		/* position and some stuff */

		private PointF controlPoint;
		private PointF lastLocation;
		private PointF location;
		
		private State state;
		private Spline spline;
		private float width = 20.0f;
		private float heigth = 20.0f;

		/* End of Definitions of the Program */

		public ControlPoint(PointF point, Spline suzan, State st)
		{
			this.controlPoint = point;
			this.location = controlPoint;
			this.lastLocation = controlPoint;
			this.state = st;
			this.spline = suzan;
			
		}
		
		/*******************************************************************/
		/*                functions for moving and setting                 */
		/*******************************************************************/

		
		public void setControlPoint(PointF spoint)
		{
			this.controlPoint = spoint;
			this.location = controlPoint;
			this.lastLocation = controlPoint;
		}
		
		public PointF getControlPoint()
		{
			return this.controlPoint;
		}

		
		public Spline getSpline
		{
			get
			{
				return this.spline;
			}
			set
			{
				this.spline = value;
			}
		}

		public void moveControlPoint(PointF mpoint)
		{
			this.controlPoint = new PointF((this.controlPoint.X+mpoint.X), (this.controlPoint.Y+mpoint.Y));
			this.location = controlPoint;
			this.lastLocation = controlPoint;
		}



		/*******************************************************************/
		/*               some function for returning values                */
		/*******************************************************************/


		public float getX
		{
			get
			{
				return this.controlPoint.X;
			}
			set
			{
				this.controlPoint.X = value;
				this.location.X = controlPoint.X;
				this.lastLocation.X = controlPoint.X;
			}
		}

		public float getY
		{
			get
			{
				return this.controlPoint.Y;
			}
			set
			{
				this.controlPoint.Y = value;
				this.location.Y = controlPoint.Y;
				this.lastLocation.Y = controlPoint.Y;
			}
		}

		public PointF Location
		{
			get
			{
				return this.controlPoint;
			}
			set
			{
				this.controlPoint = value;
			}
		}

		public PointF LastLocation
		{
			get
			{
				return this.lastLocation;
			}
			set
			{
				this.lastLocation = value;
			}
		}

		public float Width
		{
			get
			{
				return this.width;
			}
			set
			{
				this.width = value;
			}
		}

		public float Heigth
		{
			get 
			{ 
				return this.heigth;
			}
			set
			{
				this.heigth = value;
			}
		}

		public State getState()
		{
			return this.state;
		}


		/*******************************************************************/
		/*   -----------------------------------------------------------   */
		/*******************************************************************/


	}
}




See more files for this project here

MASE: Agile Software Engineering

The MASE project investigates methods to support the coordination and executable acceptance testing of software projects. Keywords: Agile methods, distributed teams, Extreme Programming. See http://ebe.cpsc.ucalgary.ca/ebe for more information.

Project homepage: http://sourceforge.net/projects/mase
Programming language(s): Java,XML
License: other

  ControlPoint.cs
  CustomTreeNode.cs
  CustomTreeView.cs
  Dashboard.cs
  Dashboard.resx
  EStoryForm.cs
  EStoryForm.resx
  IOSelectObject.cs
  InterfaceGrid.cs
  InterfaceObject.cs
  List.cs
  ListNode.cs
  LogFile.cs
  MenuForm.cs
  MenuForm.resx
  MoveAbleSpline.cs
  NonMoveAbleSpline.cs
  ObjectButton.cs
  Old_MoveAbleSpline.cs
  PenCalibration.cs
  PenCalibration.resx
  RNTObject.cs
  Spline.cs
  StartupScreen.cs
  StartupScreen.resx
  StorageButton.cs
  Study_Project.cs
  Study_Project.resx
  TabletUI.cs
  TabletUI.resx
  Workspace.cs
  Workspace.resx
  testCalibration.cs
  testCalibration.resx