Пример #1
0
 override public void execute(CPoint x, int _MAXx, int _MAXy)
 {
     p    = x;
     MAXx = _MAXx;
     MAXy = _MAXy;
     if (p.IsObjectInForm(e, MAXx, MAXy) == true)
     {
         p.resize(change);
     }
 }
Пример #2
0
 override public void execute(CPoint x, int _MAXx, int _MAXy)
 {
     p    = x;
     MAXx = _MAXx;
     MAXy = _MAXy;
     if (p.IsObjectInForm(e, MAXx, MAXy) == true)
     {
         p.move(dx, dy);
     }
 }
Пример #3
0
 public int setObject(CPoint x)
 {
     if (Count == arr.Length)
     {
         Array.Resize(ref arr, Count + 1);
     }
     arr[Count] = x;
     Count++;
     notifyEveryone();
     return(Count - 1);
 }
Пример #4
0
 public bool addToGroup(CPoint p)
 {
     if (count != size)
     {
         group[count] = p;
         count++;
     }
     else
     {
         return(false);
     }
     return(true);
 }
Пример #5
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;
     }
 }
Пример #6
0
 override public void execute()
 {
     p = factory.createPoint(classname, x, y);
     i = storage.setObject(p);
 }
Пример #7
0
 virtual public void execute(CPoint p, int MAXx, int MAXy)
 {
 }
Пример #8
0
 public CreateCommand()
 {
     factory = new CMyPointFactory();
     p       = null;
 }
Пример #9
0
 public ResizeCommand(int _change, Keys _e)
 {
     change = _change;
     e      = _e;
     p      = null;
 }
Пример #10
0
 virtual public void addObserver(CPoint observer)
 {
     observers.Add(countObservers, observer);
     countObservers++;
 }