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


C# PFSSection.GetKeywordsNo方法代码示例

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


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

示例1: DeepClone

    /// <summary>
    /// Returns a deep clone of the section. Does not clone any parents;
    /// </summary>
    /// <param name="SectionToClone"></param>
    /// <returns></returns>
    public static PFSSection DeepClone(PFSSection SectionToClone)
    {
      PFSSection ps = new PFSSection(SectionToClone.Name);

      int NumberOfKeywords = SectionToClone.GetKeywordsNo();
      for (int i = 1; i <= NumberOfKeywords; i++)
        ps.AddKeyword(PFSMapper.DeepClone(SectionToClone.GetKeyword(i)));

      int NumberOfSections = SectionToClone.GetSectionsNo();
      for (int i = 1; i <= NumberOfSections; i++)
        ps.AddSection(PFSMapper.DeepClone(SectionToClone.GetSection(i)));

      return ps;
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:19,代码来源:PFSMapper.cs

示例2: POINTS

    internal POINTS(PFSSection Section)
    {
      _pfsHandle = Section;

      points = new List<point>();
      int knumber =Section.GetKeywordsNo("point");


      var sectionstring = Section.ToString().Split(new string[]{"\n"}, StringSplitOptions.RemoveEmptyEntries);

     

      for (int i = 1; i < sectionstring.Count()-1; i++)
      {
        var pdata = sectionstring[i].Split(new string[] { "=", "," }, StringSplitOptions.RemoveEmptyEntries);
       var pp =  new point("point");
       pp.Par1 = (int) double.Parse(pdata[1]);
       pp.Par2 = double.Parse(pdata[2]);
       pp.Par3 = double.Parse(pdata[3]);
       pp.Par4 = (int)double.Parse(pdata[4]);

       if (pdata.Count() > 5)
       {
         pp.Par5 = double.Parse(pdata[5]);
         pp.Par6 = (int)double.Parse(pdata[6]);
       }
       points.Add(pp);
      }


      //for (int i = 1; i <= knumber; i++)
      //{
      //  points.Add(new point(Section.GetKeyword("point", i)));
      //}
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:46,代码来源:POINTS.cs

示例3: Nodes

    internal Nodes(PFSSection Section)
    {
      _pfsHandle = Section;

      Event_definitions = new List<Event_definition>();
      for (int i = 1; i <= Section.GetKeywordsNo("Event_definition"); i++)
        Event_definitions.Add(new Event_definition(Section.GetKeyword("Event_definition",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:19,代码来源:Nodes.cs

示例4: MIKESHECOUPLING1

    internal MIKESHECOUPLING1(PFSSection Section)
    {
      _pfsHandle = Section;

      MikeSheCouplings = new List<MikeSheCoupling>();
      for (int i = 1; i <= Section.GetKeywordsNo("MikeSheCoupling"); i++)
        MikeSheCouplings.Add(new MikeSheCoupling(Section.GetKeyword("MikeSheCoupling",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:19,代码来源:MIKESHECOUPLING1.cs

示例5: MOUSE_PASSIVE_CONTROL

    internal MOUSE_PASSIVE_CONTROL(PFSSection Section)
    {
      _pfsHandle = Section;

      Passive_Controls = new List<Passive_Control>();
      for (int i = 1; i <= Section.GetKeywordsNo("Passive_Control"); i++)
        Passive_Controls.Add(new Passive_Control(Section.GetKeyword("Passive_Control",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:19,代码来源:MOUSE_PASSIVE_CONTROL.cs

示例6: Cross_Section

    internal Cross_Section(PFSSection Section)
    {
      _pfsHandle = Section;

      Datas = new List<Data>();
      for (int i = 1; i <= Section.GetKeywordsNo("Data"); i++)
        Datas.Add(new Data(Section.GetKeyword("Data",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:19,代码来源:Cross_Section.cs

示例7: Metadata

    internal Metadata(PFSSection Section)
    {
      _pfsHandle = Section;

      Fields = new List<Field>();
      for (int i = 1; i <= Section.GetKeywordsNo("Field"); i++)
        Fields.Add(new Field(Section.GetKeyword("Field",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:19,代码来源:Metadata.cs

示例8: MOUSE_MATERIAL_PARAMETERS

    internal MOUSE_MATERIAL_PARAMETERS(PFSSection Section)
    {
      _pfsHandle = Section;

      MATERIALs = new List<MATERIAL>();
      for (int i = 1; i <= Section.GetKeywordsNo("MATERIAL"); i++)
        MATERIALs.Add(new MATERIAL(Section.GetKeyword("MATERIAL",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      MATERIALHeader = new MATERIALHeader(_pfsHandle.GetKeyword("MATERIALHeader", 1));
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:20,代码来源:MOUSE_MATERIAL_PARAMETERS.cs

示例9: MOUSE_Catchments

    internal MOUSE_Catchments(PFSSection Section)
    {
      _pfsHandle = Section;

      Lines = new List<Line>();
      for (int i = 1; i <= Section.GetKeywordsNo("Line"); i++)
        Lines.Add(new Line(Section.GetKeyword("Line",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      LineHeader = new LineHeader(_pfsHandle.GetKeyword("LineHeader", 1));
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:20,代码来源:MOUSE_Catchments.cs

示例10: MOUSE_PUMPS

    internal MOUSE_PUMPS(PFSSection Section)
    {
      _pfsHandle = Section;

      Pumps = new List<Pump>();
      for (int i = 1; i <= Section.GetKeywordsNo("Pump"); i++)
        Pumps.Add(new Pump(Section.GetKeyword("Pump",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      PumpHeader = new PumpHeader(_pfsHandle.GetKeyword("PumpHeader", 1));
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:20,代码来源:MOUSE_PUMPS.cs

示例11: MOUSE_HEADLOSS_PARAMETERS

    internal MOUSE_HEADLOSS_PARAMETERS(PFSSection Section)
    {
      _pfsHandle = Section;

      HEADLOSSs = new List<HEADLOSS>();
      for (int i = 1; i <= Section.GetKeywordsNo("HEADLOSS"); i++)
        HEADLOSSs.Add(new HEADLOSS(Section.GetKeyword("HEADLOSS",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      HEADLOSSHeader = new HEADLOSSHeader(_pfsHandle.GetKeyword("HEADLOSSHeader", 1));
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:20,代码来源:MOUSE_HEADLOSS_PARAMETERS.cs

示例12: MOUSE_RTC_SENSORS

    internal MOUSE_RTC_SENSORS(PFSSection Section)
    {
      _pfsHandle = Section;

      Sensors = new List<Sensor>();
      for (int i = 1; i <= Section.GetKeywordsNo("Sensor"); i++)
        Sensors.Add(new Sensor(Section.GetKeyword("Sensor",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      SensorHeader = new SensorHeader(_pfsHandle.GetKeyword("SensorHeader", 1));
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:20,代码来源:MOUSE_RTC_SENSORS.cs

示例13: MSM_BITEM

    internal MSM_BITEM(PFSSection Section)
    {
      _pfsHandle = Section;

      BITEMs = new List<BITEM>();
      for (int i = 1; i <= Section.GetKeywordsNo("BITEM"); i++)
        BITEMs.Add(new BITEM(Section.GetKeyword("BITEM",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      BITEMHeader = new BITEMHeader(_pfsHandle.GetKeyword("BITEMHeader", 1));
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:20,代码来源:MSM_BITEM.cs

示例14: MOUSE_WEIRS

    internal MOUSE_WEIRS(PFSSection Section)
    {
      _pfsHandle = Section;

      Weirs = new List<Weir>();
      for (int i = 1; i <= Section.GetKeywordsNo("Weir"); i++)
        Weirs.Add(new Weir(Section.GetKeyword("Weir",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      WeirHeader = new WeirHeader(_pfsHandle.GetKeyword("WeirHeader", 1));
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:20,代码来源:MOUSE_WEIRS.cs

示例15: Rows1

    internal Rows1(PFSSection Section)
    {
      _pfsHandle = Section;

      rs = new List<r>();
      for (int i = 1; i <= Section.GetKeywordsNo("r"); i++)
        rs.Add(new r(Section.GetKeyword("r",i)));
      for (int i = 1; i <= Section.GetSectionsNo(); i++)
      {
        PFSSection sub = Section.GetSection(i);
        switch (sub.Name)
        {
          default:
            _unMappedSections.Add(sub.Name);
          break;
        }
      }

      rHeader = new rHeader(_pfsHandle.GetKeyword("rHeader", 1));
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:20,代码来源:Rows1.cs


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