//Constructors public Model() : base() { Suspend(); UndoList = new UndoList(); Runtime = new Runtime(); RenderDesign.DrawSelections = true; RenderDesign.DrawGrid = true; RenderDesign.DrawPageLines = false; Resume(); }
public Model(Model prototype): base(prototype) { Suspend(); UndoList = new UndoList(); Runtime = new Runtime(); RenderDesign.DrawSelections = prototype.DrawSelections; RenderDesign.DrawGrid = prototype.DrawGrid; RenderDesign.DrawPageLines = prototype.DrawPageLines; Resume(); }
protected override void OnDeserializeComplete(object graph, IFormatter formatter, SurrogateSelector selector) { ModelSerialize surrogate = (ModelSerialize) Serialization.Serialize.GetSurrogate(graph,selector); Model model = (Model) graph; //Apply surrogate settings SuspendEvents = true; Suspend(); Runtime = surrogate.Runtime; Runtime.ActiveContainer = this; AlignGrid= model.AlignGrid; DragScroll = model.DragScroll; DrawGrid = model.DrawGrid; DrawPageLines = model.DrawPageLines; DrawSelections = model.DrawSelections; GridColor = model.GridColor; GridSize = model.GridSize; GridStyle = model.GridStyle; PageLineSize = model.PageLineSize; Margin = model.Margin; Resume(); SuspendEvents = false; base.OnDeserializeComplete (graph, formatter, selector); }