Beispiel #1
0
 public CStickyObject(CPoint _point)
 {
     point          = _point;
     x              = point.getX();
     y              = point.getY();
     selected       = true;
     countObservers = 0;
     observers      = new Dictionary <int, CPoint>();
 }
Beispiel #2
0
 public void addPoint(CPoint point, MouseEventArgs e)
 {
     points.Add(count, point);
     x = e.X;
     y = e.Y;
     historyX.Push(point.getX());
     historyY.Push(point.getY());
     count++;
 }
Beispiel #3
0
 public void processNode(TreeNode tree, CPoint point, int k)
 {
     if (tree == null || tree.Nodes[point.classname()] == null)
     {
         tree.Nodes.Add(point.classname(), point.classname());
     }
     if (point.IsA("CGroup") == true)
     {
         tree.Nodes[point.classname()].Nodes.Add(k.ToString(), "group");
         CGroup g = (CGroup)point;
         for (int i = 0; i < g.getCount(); i++)
         {
             processNode(tree.Nodes["CGroup"].Nodes[k.ToString()], g.getObj(i), i);
         }
     }
     else
     {
         tree.Nodes[point.classname()].Nodes.Add(k.ToString(), $"({point.getX()}, {point.getY()})");
     }
     if (point.IsObjectSelected() == true)
     {
         myTree.SelectedNode = tree.Nodes[point.classname()].LastNode;
     }
 }