Ejemplo n.º 1
0
        public static void NewScene()
        {
            // delete all the objects in the scene
            ICommand delete = new Midget.Command.Object.Lifetime.DeleteCommand(SceneManager.Instance.ObjectList);
            delete.Execute();

            CommandManager.Instance.Clear();
        }
Ejemplo n.º 2
0
        public static void NewScene()
        {
            // delete all the objects in the scene
            ICommand delete = new Midget.Command.Object.Lifetime.DeleteCommand(SceneManager.Instance.ObjectList);

            delete.Execute();

            CommandManager.Instance.Clear();
        }
Ejemplo n.º 3
0
        public static void OpenScene(string fileName)
        {
            // delete all the objects in the scene
            ICommand delete = new Midget.Command.Object.Lifetime.DeleteCommand(SceneManager.Instance.ObjectList);
            delete.Execute();

            CommandManager.Instance.Clear();

            SceneManager.Instance.LoadScene(fileName);
            DeviceManager.Instance.UpdateViews();
            Midget.Events.EventFactory.Instance.GenerateOpenSceneEvent(null);
        }
Ejemplo n.º 4
0
        public static void OpenScene(string fileName)
        {
            // delete all the objects in the scene
            ICommand delete = new Midget.Command.Object.Lifetime.DeleteCommand(SceneManager.Instance.ObjectList);

            delete.Execute();

            CommandManager.Instance.Clear();

            SceneManager.Instance.LoadScene(fileName);
            DeviceManager.Instance.UpdateViews();
            Midget.Events.EventFactory.Instance.GenerateOpenSceneEvent(null);
        }
Ejemplo n.º 5
0
        public void Execute()
        {
            if (group == null)
            {
                throw new Exception("No selected objects");
            }

            if (!(group is GroupObject))
            {
                throw new Exception("No group objects selected");
            }

            ArrayList objects = SceneManager.Instance.UnGroup(group);

            Midget.Events.EventFactory.Instance.GenerateUngroupEvent(this, group);

            ICommand deselectAll = new DeselectAllObjectsCommand(SceneManager.Instance.SelectedObjects);

            deselectAll.Execute();

            // select all the objects
            foreach (IObject3D obj in objects)
            {
                ICommand select = new SelectAdditionalObjectCommand(obj);
                select.Execute();
            }


            ArrayList list = new ArrayList();

            list.Add(group);

            ICommand delete = new Midget.Command.Object.Lifetime.DeleteCommand(list);

            delete.Execute();
        }
Ejemplo n.º 6
0
        public void Execute()
        {
            if(group == null)
                throw new Exception ("No selected objects");

            if(!(group is GroupObject))
            {
                throw new Exception ("No group objects selected");
            }

            ArrayList objects = SceneManager.Instance.UnGroup(group);

            Midget.Events.EventFactory.Instance.GenerateUngroupEvent(this,group);

            ICommand deselectAll = new DeselectAllObjectsCommand(SceneManager.Instance.SelectedObjects);
            deselectAll.Execute();

            // select all the objects
            foreach(IObject3D obj in objects)
            {
                ICommand select = new SelectAdditionalObjectCommand(obj);
                select.Execute();
            }

            ArrayList list = new ArrayList();
            list.Add(group);

            ICommand delete = new Midget.Command.Object.Lifetime.DeleteCommand(list);
            delete.Execute();
        }