Esempio n. 1
0
        public void Execute()
        {
            if( obj == null)
            {
                throw new System.Exception("No object selected");
            }

            // check to make sure dynamic is not already applied
            foreach(IDynamic dyn in obj.DynamicsList)
            {
                if(dyn.GetType() == dynamic.GetType())
                {
                    ICommand command = new RemoveDynamicCommand(obj,dyn);
                    command.Execute();
                    break;
                }
            }

            obj.DynamicsList.Add(dynamic);
            obj.Rigidity = Rigidity.Active;

            Midget.Events.EventFactory.Instance.GenerateAddDyanmicEvent(this,obj,dynamic);
        }
Esempio n. 2
0
        public void Execute()
        {
            if (obj == null)
            {
                throw new System.Exception("No object selected");
            }

            // check to make sure dynamic is not already applied
            foreach (IDynamic dyn in obj.DynamicsList)
            {
                if (dyn.GetType() == dynamic.GetType())
                {
                    ICommand command = new RemoveDynamicCommand(obj, dyn);
                    command.Execute();
                    break;
                }
            }

            obj.DynamicsList.Add(dynamic);
            obj.Rigidity = Rigidity.Active;

            Midget.Events.EventFactory.Instance.GenerateAddDyanmicEvent(this, obj, dynamic);
        }
Esempio n. 3
0
 public void UnExecute()
 {
     ICommand command = new RemoveDynamicCommand(obj,dynamic);
     command.Execute();
 }
Esempio n. 4
0
        public void UnExecute()
        {
            ICommand command = new RemoveDynamicCommand(obj, dynamic);

            command.Execute();
        }