コード例 #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();
            }
        }
コード例 #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 });
        }
コード例 #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 });
        }
コード例 #4
0
 public PropertyValue(string propertyName, T defaultValue, WUndoStack undoStack)
 {
     m_propertyName = propertyName;
     m_value        = defaultValue;
     m_undoStack    = undoStack;
 }
コード例 #5
0
ファイル: BasePropertyValue.cs プロジェクト: magcius/Winditor
 public void SetUndoStack(WUndoStack undoStack)
 {
     m_undoStack = undoStack;
 }