public void InitLayerSettings(string xml) { try { XmlDocument document = new XmlDocument(); document.LoadXml(xml); XmlElement documentElement = document.DocumentElement; OverviewWindowsLayerSettingsSectionHandler handler = new OverviewWindowsLayerSettingsSectionHandler(); this.m_layersettings = (OverviewLayerSettings)handler.Create(null, null, documentElement.ChildNodes[0]); if (this.m_layersettings.LayerSettings.Count == 0) { this.m_bUseScale = false; this.m_OverwindowsLayersType = OverwindowsLayersType.BottomPolygonLayer; } else { this.m_bUseScale = true; if (this.m_OverwindowsLayersType != OverwindowsLayersType.LayerSettings) { this.m_OverwindowsLayersType = OverwindowsLayersType.LayerSettings; } } } catch { this.m_OverwindowsLayersType = OverwindowsLayersType.BottomPolygonLayer; this.m_bUseScale = false; } }
public void InitLayerSettings() { try { this.m_layersettings = (OverviewLayerSettings)ConfigurationManager.GetSection("LayerSettings"); if (this.m_layersettings.LayerSettings.Count == 0) { this.m_bUseScale = false; this.m_OverwindowsLayersType = OverwindowsLayersType.BottomPolygonLayer; } else { this.m_bUseScale = true; if (this.m_OverwindowsLayersType != OverwindowsLayersType.LayerSettings) { this.m_OverwindowsLayersType = OverwindowsLayersType.LayerSettings; } } } catch (Exception) { this.m_OverwindowsLayersType = OverwindowsLayersType.BottomPolygonLayer; this.m_bUseScale = false; } }
public void InitLayerSettings(string xml) { try { XmlDocument document = new XmlDocument(); document.LoadXml(xml); XmlElement documentElement = document.DocumentElement; OverviewWindowsLayerSettingsSectionHandler handler = new OverviewWindowsLayerSettingsSectionHandler(); this.m_layersettings = (OverviewLayerSettings)handler.Create(null, null, documentElement.ChildNodes[0]); } catch { this.m_bUseScale = false; this.m_OverwindowsLayersType = OverwindowsLayersType.BottomPolygonLayer; } if (this.m_OverwindowsLayersType != OverwindowsLayersType.LayerSettings) { this.barManager1.SetPopupContextMenu(this.axMapControl1, this.popupMenu1); } }
public void InitLayerSettings() { try { this.m_layersettings = (OverviewLayerSettings)ConfigurationManager.GetSection("LayerSettings"); if (this.m_layersettings.LayerSettings.Count == 0) { this.m_bUseScale = false; this.m_OverwindowsLayersType = OverwindowsLayersType.BottomPolygonLayer; } } catch (Exception) { this.m_bUseScale = false; this.m_OverwindowsLayersType = OverwindowsLayersType.BottomPolygonLayer; } if (this.m_OverwindowsLayersType != OverwindowsLayersType.LayerSettings) { this.barManager1.SetPopupContextMenu(this.axMapControl1, this.popupMenu1); } }