public void InitializeWithShadowTreeRebuilt(OrdersShadowTreeDerived ordersShadowTree) { //this.PopulateDataSnapshotInitializeSplittersAfterDockContentIsDone(); this.ordersShadowTree = ordersShadowTree; //moved to PopulateDataSnapshotInitializeSplittersAfterDockContentIsDone() this.RebuildAllTreeFocusOnTopmost(); this.DataSnapshotSerializer = new Serializer <ExecutionTreeDataSnapshot>(Assembler.InstanceInitialized.StatusReporter); bool createdNewFile = this.DataSnapshotSerializer.Initialize(Assembler.InstanceInitialized.AppDataPath, "Sq1.Widgets.ExecutionTreeDataSnapshot.json", "Workspaces", Assembler.InstanceInitialized.AssemblerDataSnapshot.CurrentWorkspaceName); this.DataSnapshot = this.DataSnapshotSerializer.Deserialize(); if (createdNewFile) { this.DataSnapshot.ToggleMessagePaneSplittedHorizontally = (this.splitContainerMessagePane.Orientation == Orientation.Horizontal) ? true : false; this.DataSnapshot.MessagePaneSplitDistanceHorizontal = this.splitContainerMessagePane.SplitterDistance; int newDistance = this.splitContainerMessagePane.SplitterDistance - this.splitContainerMessagePane.SplitterWidth; this.DataSnapshot.MessagePaneSplitDistanceVertical = newDistance; this.DataSnapshotSerializer.Serialize(); } }
public void InitializeWithShadowTreeRebuilt(OrdersShadowTreeDerived ordersShadowTree) { //this.PopulateDataSnapshotInitializeSplittersAfterDockContentIsDone(); this.ordersShadowTree = ordersShadowTree; //moved to PopulateDataSnapshotInitializeSplittersAfterDockContentIsDone() this.RebuildAllTreeFocusOnTopmost(); this.DataSnapshotSerializer = new Serializer<ExecutionTreeDataSnapshot>(Assembler.InstanceInitialized.StatusReporter); bool createdNewFile = this.DataSnapshotSerializer.Initialize(Assembler.InstanceInitialized.AppDataPath, "Sq1.Widgets.ExecutionTreeDataSnapshot.json", "Workspaces" , Assembler.InstanceInitialized.AssemblerDataSnapshot.CurrentWorkspaceName); this.DataSnapshot = this.DataSnapshotSerializer.Deserialize(); if (createdNewFile) { this.DataSnapshot.ToggleMessagePaneSplittedHorizontally = (this.splitContainerMessagePane.Orientation == Orientation.Horizontal) ? true : false; this.DataSnapshot.MessagePaneSplitDistanceHorizontal = this.splitContainerMessagePane.SplitterDistance; int newDistance = this.splitContainerMessagePane.SplitterDistance - this.splitContainerMessagePane.SplitterWidth; this.DataSnapshot.MessagePaneSplitDistanceVertical = newDistance; this.DataSnapshotSerializer.Serialize(); } }