本文整理汇总了C#中DashboardHelper.PopulateDataSet方法的典型用法代码示例。如果您正苦于以下问题:C# DashboardHelper.PopulateDataSet方法的具体用法?C# DashboardHelper.PopulateDataSet怎么用?C# DashboardHelper.PopulateDataSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DashboardHelper
的用法示例。
在下文中一共展示了DashboardHelper.PopulateDataSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OpenMap
public void OpenMap(string filePath)
{
ClearGraphics();
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.Load(filePath);
Stack<System.Xml.XmlElement> elementStack = new Stack<System.Xml.XmlElement>();
foreach (System.Xml.XmlElement element in doc.DocumentElement.ChildNodes)
{
elementStack.Push(element);
}
while (elementStack.Count > 0)
{
System.Xml.XmlElement element = elementStack.Pop();
if (element.Name.Equals("referenceLayer"))
{
ILayerProperties layerProperties = (ILayerProperties)Activator.CreateInstance(Type.GetType(element.Attributes["layerType"].Value), new object[] { myMap });
layerProperties.MakeReadOnly();
layerProperties.CreateFromXml(element);
layerList.AddListItem(layerProperties, 0);
}
if (element.Name.Equals("graphicsLayer"))
{
ILayerProperties layerProperties = (ILayerProperties)Activator.CreateInstance(Type.GetType(element.Attributes["layerType"].Value), new object[] { myMap, new MapPoint(double.Parse(element.Attributes["locationX"].Value), double.Parse(element.Attributes["locationY"].Value)) });
layerProperties.MakeReadOnly();
layerProperties.CreateFromXml(element);
layerList.AddListItem(layerProperties, 0);
}
if (element.Name.Equals("dataLayer"))
{
DashboardHelper helper = new DashboardHelper();
string dataLayerConn = string.Empty;
string dataLayerTable = string.Empty;
foreach (System.Xml.XmlElement child in element.ChildNodes)
{
if (child.Name.Equals("dashboardHelper"))
{
helper.CreateFromXml(child);
helper.PopulateDataSet();
}
}
ILayerProperties layerProperties = (ILayerProperties)Activator.CreateInstance(Type.GetType(element.Attributes["layerType"].Value), new object[] { myMap, helper, this });
layerProperties.MakeReadOnly();
layerProperties.FilterRequested += new EventHandler(ILayerProperties_FilterRequested);
layerProperties.MapGenerated += new EventHandler(ILayerProperties_MapGenerated);
layerProperties.CreateFromXml(element);
layerList.AddListItem(layerProperties, 0);
}
}
if (doc.DocumentElement.Attributes.Count > 0)
{
string baseMapType = doc.DocumentElement.Attributes["baseMapType"].Value;
if (baseMapType.Equals("street"))
{
ToggleStreet();
}
else if (baseMapType.Equals("satellite"))
{
ToggleSatellite();
}
else
{
ToggleBlank();
}
}
}