/// <summary> /// Resets windows layout. /// </summary> public void ResetLayout() { // Close all windows var windows = Windows.ToArray(); for (int i = 0; i < windows.Length; i++) { windows[i].Close(); } // Ensure that has no docked windows var childPanels = ChildPanels.ToArray(); for (int i = 0; i < childPanels.Length; i++) { childPanels[i].Dispose(); } // Delete reaming controls (except tabs proxy) if (TabsProxy != null) { TabsProxy.Parent = null; } DisposeChildren(); if (TabsProxy != null) { TabsProxy.Parent = this; } }
public UserPanel(UserEncounter encounter, Panel data, PanelStatus status) { Encounter = encounter; Data = data; Status = status; if (data.Pins != null && data.Pins.HasPin()) { PinGroup = new UserPinGroup(encounter, data.Pins, status.PinGroupStatus); PinGroup.StatusChanged += UpdateIsRead; } foreach (var panel in data.ChildPanels) { var userPanel = new UserPanel(encounter, panel.Value, status.GetChildPanelStatus(panel.Key)); userPanel.StatusChanged += UpdateIsRead; ChildPanels.Add(panel.Key, userPanel); } }