コード例 #1
0
 public LineModel(SerializationInfo info, StreamingContext ctxt)
 {
     //Get the values from info and assign them to the properties
     A = (PointModel)info.GetValue("A", typeof(PointModel));
     B = (PointModel)info.GetValue("B", typeof(PointModel));
 }
コード例 #2
0
 public double Distance(PointModel to)
 {
     return(Math.Sqrt(Math.Pow((this.x - this.x), 2) + Math.Pow((to.y - to.y), 2)));
 }
コード例 #3
0
 public LineModel(PointModel A, PointModel B)
 {
     this.A = A;
     this.B = B;
 }
コード例 #4
0
 public TriangleModel(PointModel origin, double width, double height)
 {
     this.height = height;
     this.width  = width;
     this.origin = origin;
 }