protected SlidePanel(LoadInfo info) { ReflectedSaver.RestoreObject(this, info); if (info.Version < CurrentVersion) { if (info.Version < 1) { BorderLayoutLocations location = BorderLayoutLocations.Left; switch (info.GetValue("viewLocation", ViewLocations.Left)) { case ViewLocations.Left: location = BorderLayoutLocations.Left; break; case ViewLocations.Right: location = BorderLayoutLocations.Right; break; case ViewLocations.Top: location = BorderLayoutLocations.Top; break; case ViewLocations.Bottom: location = BorderLayoutLocations.Bottom; break; } ElementName = new BorderLayoutElementName(GUILocationNames.ContentArea, location); } } }
protected View(LoadInfo info) : base(info) { if (info.Version < CurrentVersion) { if (info.Version < 1) { if (info.hasValue("<ViewLocation>k__BackingField")) { switch (info.GetValue <ViewLocations>("<ViewLocation>k__BackingField", ViewLocations.Left)) { case ViewLocations.Left: ElementName = new BorderLayoutElementName(GUILocationNames.ContentArea, BorderLayoutLocations.Left); break; case ViewLocations.Right: ElementName = new BorderLayoutElementName(GUILocationNames.ContentArea, BorderLayoutLocations.Right); break; case ViewLocations.Top: ElementName = new BorderLayoutElementName(GUILocationNames.ContentArea, BorderLayoutLocations.Top); break; case ViewLocations.Bottom: ElementName = new BorderLayoutElementName(GUILocationNames.ContentArea, BorderLayoutLocations.Bottom); break; case ViewLocations.Floating: ElementName = new LayoutElementName(GUILocationNames.FullscreenPopup); break; } } } } }
private ViewHostPanelInfo findPanel(LayoutElementName elementName) { if (elementName.ViewType == ViewType.Window || elementName.LocationHint == ViewLocations.Floating) { ViewHostPanelInfo panel = new ViewHostPanelInfo() { ElementName = elementName }; openPanels.Add(panel); return(panel); } //Try to find an existing panel foreach (var panel in openPanels) { if (panel.ElementName == elementName) { return(panel); } } ViewHostPanelInfo newPanel = new ViewHostPanelInfo() { ElementName = elementName }; openPanels.Add(newPanel); return(newPanel); }
public SlidePanel getPanel(LayoutElementName name) { SlidePanel ret = null; if (panels.TryGetValue(name, out ret)) { return(ret); } return(null); }
public SlidePanel() { elementName = new BorderLayoutElementName(GUILocationNames.ContentArea, BorderLayoutLocations.Left); }