Example #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);
        }
Example #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);
        }
Example #3
0
 public void UnExecute()
 {
     ICommand command = new RemoveDynamicCommand(obj,dynamic);
     command.Execute();
 }
Example #4
0
        public void UnExecute()
        {
            ICommand command = new RemoveDynamicCommand(obj, dynamic);

            command.Execute();
        }