Beispiel #1
0
 public void execute(MyStorage _storage, int _ind)
 {
     storage = _storage;
     index   = _ind;
     storage.getObject(index).select();
     storage.notifyEveryone();
 }
Beispiel #2
0
 public void execute(string _readFile, MyStorage _storage)
 {
     storage  = _storage;
     copy     = _storage;
     readFile = _readFile;
     storage.loadFromFile(readFile);
 }
Beispiel #3
0
 public void ungroup(MyStorage storage, int k)
 {
     for (int i = count - 1; i >= 0; i--)
     {
         storage.setObject(group[i]);
     }
     storage.deleteObject(k);
 }
Beispiel #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);
 }
Beispiel #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);
 }
Beispiel #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();
 }
Beispiel #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++;
                }
            }
        }
Beispiel #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++;
                }
            }
        }
Beispiel #9
0
 public MyStorage(MyStorage x)
 {
     arr   = x.arr;
     Count = x.Count;
 }
Beispiel #10
0
 public void execute(MyStorage _storage)
 {
     storage = _storage;
     storage.ungroupChoosen();
 }
Beispiel #11
0
 override public void unexecute()
 {
     storage = copy;
 }
Beispiel #12
0
 public LoadCommand()
 {
     storage  = new MyStorage();
     readFile = null;
 }