当前位置: 首页>>代码示例>>C#>>正文


C# Configuration.GetApplicationMapTabRows方法代码示例

本文整理汇总了C#中Configuration.GetApplicationMapTabRows方法的典型用法代码示例。如果您正苦于以下问题:C# Configuration.GetApplicationMapTabRows方法的具体用法?C# Configuration.GetApplicationMapTabRows怎么用?C# Configuration.GetApplicationMapTabRows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Configuration的用法示例。


在下文中一共展示了Configuration.GetApplicationMapTabRows方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateMapThemes

  private void CreateMapThemes(Configuration.ApplicationRow application)
  {
    // add map tabs

    foreach (Configuration.ApplicationMapTabRow appMapTabRow in application.GetApplicationMapTabRows())
    {
      HtmlGenericControl li = new HtmlGenericControl("li");
      phlMapTheme.Controls.Add(li);
      li.InnerHtml = appMapTabRow.MapTabRow.DisplayName.Replace(" ", " ");
      li.Attributes["data-maptab"] = appMapTabRow.MapTabID;

      if (_appState.MapTab == appMapTabRow.MapTabID)
      {
        selectedTheme.InnerHtml = appMapTabRow.MapTabRow.DisplayName.Replace(" ", " ");
      }
    }
  }
开发者ID:ClaireBrill,项目名称:GPV,代码行数:17,代码来源:Viewer.aspx.cs

示例2: Initialize

  public void Initialize(Configuration config, AppState appState, Configuration.ApplicationRow application)
  {
    foreach (Configuration.ApplicationMapTabRow appMapTabRow in application.GetApplicationMapTabRows())
    {
      Configuration.MapTabRow mapTabRow = appMapTabRow.MapTabRow;
      CommonDataFrame dataFrame = AppContext.GetDataFrame(mapTabRow);

      bool isInteractive = !mapTabRow.IsInteractiveLegendNull() && mapTabRow.InteractiveLegend == 1;
      CheckMode checkMode = CheckMode.None;

      List<CommonLayer> configuredLayers = new List<CommonLayer>();
      List<LayerProperties> layerProperties = new List<LayerProperties>();
      List<String> mapTabLayerIds = new List<String>();

      string name = null;
      string metaDataUrl = null;

      StringCollection visibleLayers = isInteractive ? appState.VisibleLayers[mapTabRow.MapTabID] : null;

      // find layers attached via MapTabLayer

      foreach (Configuration.MapTabLayerRow mapTabLayerRow in mapTabRow.GetMapTabLayerRows())
      {
        if (!mapTabLayerRow.IsShowInLegendNull() && mapTabLayerRow.ShowInLegend == 1)
        {
          CommonLayer layer = dataFrame.Layers.FirstOrDefault(lyr => String.Compare(lyr.Name, mapTabLayerRow.LayerRow.LayerName, true) == 0);

          name = mapTabLayerRow.LayerRow.IsDisplayNameNull() ? mapTabLayerRow.LayerRow.LayerName : mapTabLayerRow.LayerRow.DisplayName;
          metaDataUrl = mapTabLayerRow.LayerRow.IsMetaDataURLNull() ? null : mapTabLayerRow.LayerRow.MetaDataURL;
          bool isExclusive = mapTabLayerRow.IsIsExclusiveNull() ? false : mapTabLayerRow.IsExclusive == 1;

          string tag = mapTabLayerRow.LayerID;
          mapTabLayerIds.Add(tag);

          if (isInteractive)
          {
            bool layerVisible = visibleLayers != null && visibleLayers.Contains(mapTabLayerRow.LayerID);
            checkMode = mapTabLayerRow.IsCheckInLegendNull() || mapTabLayerRow.CheckInLegend < 0 ? CheckMode.Empty :
                layerVisible ? CheckMode.Checked : CheckMode.Unchecked;
          }

          configuredLayers.Add(layer);
          layerProperties.Add(new LayerProperties(name, tag, checkMode, isExclusive, metaDataUrl));
        }
      }

      // find layers attached via BaseMapID

      if (!mapTabRow.IsBaseMapIDNull() && !mapTabRow.IsShowBaseMapInLegendNull() && mapTabRow.ShowBaseMapInLegend == 1)
      {
        if (checkMode != CheckMode.None)
        {
          checkMode = CheckMode.Empty;
        }

        foreach (DataRow row in config.Layer.Select("BaseMapID = '" + mapTabRow.BaseMapID + "'"))
        {
          Configuration.LayerRow layerRow = (Configuration.LayerRow)row;

          if (!mapTabLayerIds.Contains(layerRow.LayerID))
          {
            CommonLayer layer = dataFrame.Layers.FirstOrDefault(lyr => String.Compare(lyr.Name, layerRow.LayerName, true) == 0);
            metaDataUrl = layerRow.IsMetaDataURLNull() ? null : layerRow.MetaDataURL;

            configuredLayers.Add(layer);
            layerProperties.Add(new LayerProperties(layerRow.Name, null, checkMode, false, metaDataUrl));
          }
        }
      }

      // add group layers as necessary

      for (int i = 0; i < configuredLayers.Count; ++i)
      {
        checkMode = !isInteractive ? CheckMode.None : layerProperties[i].CheckMode == CheckMode.Checked ? CheckMode.Checked : CheckMode.Unchecked;
        CommonLayer parent = configuredLayers[i].Parent;

        while (parent != null)
        {
          int index = configuredLayers.IndexOf(parent);

          if (index < 0)
          {
            configuredLayers.Add(parent);
            layerProperties.Add(new LayerProperties(parent.Name, null, checkMode, false, null));
          }
          else
          {
            if (checkMode == CheckMode.Checked && layerProperties[index].CheckMode == CheckMode.Unchecked)
            {
              layerProperties[index].CheckMode = CheckMode.Checked;
            }
          }

          parent = parent.Parent;
        }
      }

      // create the top level legend control for this map tab

//.........这里部分代码省略.........
开发者ID:ClaireBrill,项目名称:GPV,代码行数:101,代码来源:LegendPanel.ascx.cs

示例3: Initialize

  public void Initialize(Configuration.ApplicationRow application)
  {
    // find all searches for this application

    List<Configuration.SearchRow> searches = new List<Configuration.SearchRow>();

    foreach (Configuration.ApplicationMapTabRow appMapTabRow in application.GetApplicationMapTabRows())
    {
      Configuration.MapTabRow mapTabRow = appMapTabRow.MapTabRow;

      foreach (Configuration.MapTabLayerRow mapTabLayerRow in mapTabRow.GetMapTabLayerRows().Where(o => !o.IsAllowTargetNull() && o.AllowTarget > 0))
      {
        Configuration.LayerRow layerRow = mapTabLayerRow.LayerRow;

        foreach (Configuration.SearchRow searchRow in layerRow.GetSearchRows())
        {
          if (!searches.Any(o => o.SearchID == searchRow.SearchID))
          {
            searches.Add(searchRow);
          }
        }
      }
    }

    // generate the search interfaces

    foreach (Configuration.SearchRow searchRow in searches)
    {
      // create the panel for this search

      HtmlGenericControl search = new HtmlGenericControl("div");
      search.Attributes["data-search"] = searchRow.SearchID;
      search.Attributes["class"] = "Search";
      search.Style["display"] = "none";

      foreach (Configuration.SearchInputFieldRow searchInputFieldRow in searchRow.GetSearchInputFieldRows().OrderBy(o => o.SequenceNo))
      {
        // add UI elements for this criterion

        HtmlGenericControl searchInputField = new HtmlGenericControl("div");
        search.Controls.Add(searchInputField);
        searchInputField.Attributes["data-criteria"] = searchInputFieldRow.FieldID;
        searchInputField.Attributes["class"] = "SearchInputField";

        HtmlGenericControl searchLabel = new HtmlGenericControl("span");
        searchInputField.Controls.Add(searchLabel);
        searchLabel.InnerText = searchInputFieldRow.DisplayName;
        searchLabel.Attributes["class"] = "Label";

        HtmlGenericControl betweenText;

        switch (searchInputFieldRow.FieldType)
        {
          case "autocomplete":
            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "Autocomplete", "Enter some text");
            break;

          case "date":
            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "Date", "Enter a date");
            break;

          case "daterange":
            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "DateRange 1", "Enter a date");

            betweenText = new HtmlGenericControl("span");
            searchInputField.Controls.Add(betweenText);
            betweenText.InnerText = " - ";

            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "DateRange 2", "Enter a date");
            break;

          case "list":
            HtmlSelect select = CreateSelect(searchInputFieldRow);
            AddInputControl(searchInputField, select, searchInputFieldRow, "List", "Select from a list");
            break;

          case "number":
            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "Number", "Enter a number");
            break;

          case "numberrange":
            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "NumberRange 1", "Enter a number");

            betweenText = new HtmlGenericControl("span");
            searchInputField.Controls.Add(betweenText);
            betweenText.InnerText = " - ";

            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "NumberRange 2", "Enter a number");
            break;

          case "text":
            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "Text", "Enter some text");
            break;

          case "textcontains":
            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "Text", "Enter some text (contains)");
            break;

          case "textstarts":
            AddInputControl(searchInputField, new HtmlInputText("text"), searchInputFieldRow, "Text", "Enter some text (starts with)");
//.........这里部分代码省略.........
开发者ID:ClaireBrill,项目名称:GPV,代码行数:101,代码来源:SearchPanel.ascx.cs


注:本文中的Configuration.GetApplicationMapTabRows方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。