Show ObjectButton.cs syntax highlighted
using System;
using System.Drawing;
using System.Collections;
using Tao.Platform.Windows;
using Tao.OpenGl;
namespace New_Study_Project
{
/// <summary>
/// Summary description for ControlPoint.
/// </summary>
public class ObjectButton
{
/* Definitions of the Program */
public enum State{InterfaceObjectResize, StoreResize, StoreMove , StoreReshape};
public Spline storage_area;
private PointF button;
private PointF lastLocation;
private PointF location;
private State state;
private InterfaceObject ownObject;
/* End of Definitions of the Program */
public ObjectButton(InterfaceObject parent, PointF point, State status)
{
this.ownObject = parent;
storage_area = null;
this.button = point;
this.location = this.button;
this.lastLocation = this.button;
this.state = status;
}
public ObjectButton(Spline sta, PointF point, State status)
{
this.ownObject = null;
storage_area = sta;
this.button = point;
this.location = this.button;
this.lastLocation = this.button;
this.state = status;
}
/*******************************************************************/
/* End of the head of this Object - now the user code stuff begins */
/*******************************************************************/
public void moveObjectButton(PointF MoveObjectpoint)
{
this.location = new PointF((this.location.X+MoveObjectpoint.X), (this.location.Y+MoveObjectpoint.Y));
this.lastLocation = this.location;
}
public void setObjectButton(PointF MoveObjectpoint)
{
this.location = MoveObjectpoint;
this.lastLocation = this.location;
}
/*******************************************************************/
/* some function for returning values */
/*******************************************************************/
public float X
{
get
{
return this.button.X;
}
set
{
this.button.X = value;
}
}
public float Y
{
get
{
return this.button.Y;
}
set
{
this.button.Y = value;
}
}
public InterfaceObject OwnObject
{
get
{
return this.ownObject;
}
}
public PointF Location
{
get
{
return this.location;
}
set
{
this.location = value;
}
}
public State getState
{
get
{
return this.state;
}
set
{
this.state = value;
}
}
public PointF LastLocation
{
get
{
return this.lastLocation;
}
set
{
this.lastLocation = value;
}
}
/*******************************************************************/
/* ----------------------------------------------------------- */
/*******************************************************************/
}
}
See more files for this project here