private void CreateTwoDPoints()
 {
     TwoDPoints = new List<Representation>();
     Dictionary<int, string> graphInfo = new Dictionary<int, string>();
     IDictionary<int, string> modelInfo = Model.GetModelIDs();
     for (int i = 0; i < modelInfo.Count(); i++)
     {
         Representation point = new Representation(i);
         point.AttributeChanged += new AttributeChangedHandler(PointListener.Point_AttributeChanged);
         TwoDPoints.Add(point);
         graphInfo.Add(i, modelInfo[i]);
     }
     if (OnNewGraph != null)
         OnNewGraph(this, new NewGraphArgs(graphInfo));
 }
Exemplo n.º 2
0
 public int DistanceTo(Representation point)
 {
     return (int)Math.Sqrt(Math.Pow((this.X - point.X), 2) +
         Math.Pow((this.Y - point.Y), 2));
 }