Esempio n. 1
0
        void IPropertyValueAggregate.SetValue(object value)
        {
            // Snag the Undo/Redo system off of the first associated property, so we can put all of these Set values into a macro.
            WUndoStack undoStack = null;

            if (m_associatedProperties.Count > 0)
            {
                IUndoable undoableValue = m_associatedProperties[0] as IUndoable;
                undoStack = undoableValue.GetUndoStack();
            }

            if (undoStack != null)
            {
                undoStack.BeginMacro(string.Format("Set {0}", Name));
            }

            foreach (var property in m_associatedProperties)
            {
                property.SetValue(value);
            }

            if (undoStack != null)
            {
                undoStack.EndMacro();
            }
        }
Esempio n. 2
0
        public WWorld()
        {
            m_dtStopwatch     = new System.Diagnostics.Stopwatch();
            m_persistentLines = new WLineBatcher();
            m_undoStack       = new WUndoStack();
            m_actorEditor     = new WActorEditor(this);

            m_sceneViews = new List <WSceneView>();

            WSceneView perspectiveView = new WSceneView();

            m_sceneViews.AddRange(new[] { perspectiveView });
        }
Esempio n. 3
0
        public WWorld()
        {
            m_dtStopwatch     = new System.Diagnostics.Stopwatch();
            m_persistentLines = new WLineBatcher();
            m_persistentQuads = new WQuadBatcher();

            m_undoStack = new WUndoStack();

            m_ActorMode     = new ActorMode(this);
            m_CollisionMode = new CollisionMode(this);
            m_EventMode     = new EventMode(this);

            CurrentMode = m_ActorMode;

            m_sceneViews = new List <WSceneView>();

            WSceneView perspectiveView = new WSceneView();

            m_sceneViews.AddRange(new[] { perspectiveView });
        }
Esempio n. 4
0
 public PropertyValue(string propertyName, T defaultValue, WUndoStack undoStack)
 {
     m_propertyName = propertyName;
     m_value        = defaultValue;
     m_undoStack    = undoStack;
 }
Esempio n. 5
0
 public void SetUndoStack(WUndoStack undoStack)
 {
     m_undoStack = undoStack;
 }