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); } }
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); } }
public int setObject(CPoint x) { if (Count == arr.Length) { Array.Resize(ref arr, Count + 1); } arr[Count] = x; Count++; notifyEveryone(); return(Count - 1); }
public bool addToGroup(CPoint p) { if (count != size) { group[count] = p; count++; } else { return(false); } return(true); }
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; } }
override public void execute() { p = factory.createPoint(classname, x, y); i = storage.setObject(p); }
virtual public void execute(CPoint p, int MAXx, int MAXy) { }
public CreateCommand() { factory = new CMyPointFactory(); p = null; }
public ResizeCommand(int _change, Keys _e) { change = _change; e = _e; p = null; }
virtual public void addObserver(CPoint observer) { observers.Add(countObservers, observer); countObservers++; }