Exemplo n.º 1
0
 public void execute(MyStorage _storage, int _ind)
 {
     storage = _storage;
     index   = _ind;
     storage.getObject(index).select();
     storage.notifyEveryone();
 }
Exemplo n.º 2
0
 public void execute(string _readFile, MyStorage _storage)
 {
     storage  = _storage;
     copy     = _storage;
     readFile = _readFile;
     storage.loadFromFile(readFile);
 }
Exemplo n.º 3
0
 public void ungroup(MyStorage storage, int k)
 {
     for (int i = count - 1; i >= 0; i--)
     {
         storage.setObject(group[i]);
     }
     storage.deleteObject(k);
 }
Exemplo n.º 4
0
 public void execute(MyStorage _storage, int _ind)
 {
     storage = _storage;
     index   = _ind;
     obj     = new CStickyObject(storage.getObject(index));
     storage.deleteObject(index);
     index = storage.setObject(obj);
     Console.WriteLine(index);
 }
Exemplo n.º 5
0
 public void execute(string _classname, int _x, int _y, MyStorage _storage)
 {
     classname = _classname;
     x         = _x;
     y         = _y;
     storage   = _storage;
     p         = factory.createPoint(classname, x, y);
     i         = storage.setObject(p);
 }
Exemplo n.º 6
0
 public override void onSubjectChanged(CObject _storage)
 {
     if (myTree.Nodes["Objects"].Nodes != null)
     {
         myTree.Nodes["Objects"].Nodes.Clear();
     }
     storage = (MyStorage)_storage;
     for (int i = 0; i < storage.getCount(); i++) //{
     {
         processNode(myTree.Nodes["Objects"], storage.getObject(i), i);
     }
     myTree.Focus();
     myTree.ExpandAll();
 }
Exemplo n.º 7
0
        public void execute(MyStorage _storage)
        {
            storage = _storage;
            Count   = storage.getNumSelected();
            objects = new CPoint[Count];
            int k = 0;

            for (int i = storage.getCount() - 1; i >= 0; i--)
            {
                if (storage.getObject(i).IsObjectSelected() == true)
                {
                    objects[k] = storage.getObject(i);
                    storage.deleteObject(i);
                    k++;
                }
            }
        }
Exemplo n.º 8
0
        public void execute(MyStorage _storage, Color _mycolor)
        {
            storage = _storage;
            mycolor = _mycolor;
            count   = storage.getNumSelected();
            int k = 0;

            p = new Color[count];
            for (int i = 0; i < storage.getCount(); i++)
            {
                if (storage.getObject(i).IsObjectSelected() == true)
                {
                    p[k] = storage.getObject(i).getColor();
                    storage.getObject(i).setСolor(mycolor);
                    k++;
                }
            }
        }
Exemplo n.º 9
0
 public MyStorage(MyStorage x)
 {
     arr   = x.arr;
     Count = x.Count;
 }
Exemplo n.º 10
0
 public void execute(MyStorage _storage)
 {
     storage = _storage;
     storage.ungroupChoosen();
 }
Exemplo n.º 11
0
 override public void unexecute()
 {
     storage = copy;
 }
Exemplo n.º 12
0
 public LoadCommand()
 {
     storage  = new MyStorage();
     readFile = null;
 }