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


C# ElementCollection类代码示例

本文整理汇总了C#中ElementCollection的典型用法代码示例。如果您正苦于以下问题:C# ElementCollection类的具体用法?C# ElementCollection怎么用?C# ElementCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Tag

 public Tag(int line, int col, string name)
     : base(line, col)
 {
     this.name = name;
     this.attribs = new TagAttributeCollection();
     this.innerElements = new ElementCollection();
 }
开发者ID:htawab,项目名称:wiscms,代码行数:7,代码来源:Tag.cs

示例2: ReadMesh

    /// <summary>
    /// Reads in Mesh information from a stream. Does not look back in the stream
    /// </summary>
    /// <param name="StreamWithMeshInfo"></param>
    private void ReadMesh()
    {

      elements = new ElementCollection();
      connections = new List<Connection>();

      using (StreamReader StreamWithMeshInfo = new StreamReader(FileName))
      {
        while (!StreamWithMeshInfo.EndOfStream)
        {
          string word = StreamWithMeshInfo.ReadLine().Trim().ToUpper();

          if (word.StartsWith("ELEME"))
          {
            word = StreamWithMeshInfo.ReadLine().Trim();
            while (word != string.Empty)
            {
              Elements.Add(new Element(word));
              word = StreamWithMeshInfo.ReadLine().Trim();
            }
          }
          else if (word.StartsWith("CONNE"))
          {
            word = StreamWithMeshInfo.ReadLine().Trim();
            while (word != string.Empty & word != "+++")
            {
              Connection C = new Connection(word, Elements);
              Connections.Add(C);
              word = StreamWithMeshInfo.ReadLine().Trim();
            }
          }
        }
      }
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:38,代码来源:Mesh.cs

示例3: testCount

 public void testCount()
 {
     driver.Navigate().GoToUrl("http://www.google.com");
     var elements = new ElementCollection(driver.FindElements(By.Name("q")));
     driver.Navigate().GoToUrl("http://www.google.com");
     Assert.Count(1, elements.Where(x => x.IsStale()));
 }
开发者ID:sakthijas,项目名称:ProtoTest.Golem,代码行数:7,代码来源:TestElements.cs

示例4: CreateHierarchy

        public ElementCollection CreateHierarchy()
        {
            ElementCollection result = new ElementCollection();

            for (int index = 0; index < elements.Count; index++)
            {
                Element element = elements[index];

                if (element is Entity.Text)
                    result.Add(element);
                else if (element is Expression)
                    result.Add(element);
                else if (element is Tag)
                {
                    result.Add(CollectForTag((Tag) element, ref index));
                }
                else if (element is TagClose)
                {
                    throw new ParseException("Close tag for " + ((TagClose) element).Name + " doesn't have matching start tag.", element.Line, element.Col);
                }
                else
                    throw new ParseException("Invalid element: " + element.GetType().ToString(), element.Line, element.Col);
            }

            return result;
        }
开发者ID:htawab,项目名称:wiscms,代码行数:26,代码来源:TagParser.cs

示例5: Element

		/// <summary>
		/// Initializes an instance of a browser element.
		/// </summary>
		/// <param name="element">The browser element this is for.</param>
		/// <param name="browser">The browser this element is associated with.</param>
		/// <param name="collection">The collection this element is associated with.</param>
		public Element(JToken element, Browser browser, ElementCollection collection)
		{
			_element = element;
			_browser = browser;
			_collection = collection;
			_orginalColor = GetStyleAttributeValue("backgroundColor") ?? "";
			_highlightColor = "yellow";
		}
开发者ID:colonij21,项目名称:TestR,代码行数:14,代码来源:Element.cs

示例6: TemplateEntity

        public TemplateEntity(string name, ElementCollection elements, TemplateEntity parent)
        {
            this.name = name;
            this.elements = elements;
            this.parent = parent;

            InitTemplates();
        }
开发者ID:htawab,项目名称:wiscms,代码行数:8,代码来源:TemplateEntity.cs

示例7: TestBy

 public void TestBy()
 {
     var elements = new ElementCollection(By.Name("q"));
     driver.Navigate().GoToUrl("http://www.google.com");
     elements.ForEach(x => x.Click());
     driver.Navigate().GoToUrl("http://www.google.com");
     elements.ForEach(x => x.SendKeys("test"));
 }
开发者ID:sakthijas,项目名称:ProtoTest.Golem,代码行数:8,代码来源:TestElements.cs

示例8: Browser

 /// <summary>
 /// Initializes a new instance of the Browser class.
 /// </summary>
 protected Browser(Application application)
 {
     Application = application;
     AutoClose = false;
     AutoRefresh = true;
     Elements = new ElementCollection();
     JavascriptLibraries = new JavaScriptLibrary[0];
     Timeout = TimeSpan.FromSeconds(10);
 }
开发者ID:MichaelBergerman,项目名称:TestR,代码行数:12,代码来源:Browser.cs

示例9: Connection

    public Connection(string FromString, ElementCollection ElemeCollection)
    {
      First = ElemeCollection[FromString.Substring(0, 5)];
      Second = ElemeCollection[FromString.Substring(5, 5)];
      PermeabilityDirection = int.Parse(FromString.Substring(29, 1));
      Distance1 = double.Parse(FromString.Substring(30, 10));
      Distance2 = double.Parse(FromString.Substring(40, 10));
      Area = double.Parse(FromString.Substring(50, 10));

      if (FromString.Length > 60)
      {
        string temp = FromString.Substring(60, FromString.Length -60).Trim();
        if (temp != string.Empty)
          CosineAngle = double.Parse(temp);
      }
    }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:16,代码来源:Connection.cs

示例10: OnClick

        protected override void OnClick()
        {
            IMap map = ArcMap.Document.ActiveView as IMap;
            IGeoFeatureLayer geoFeatureLayer = map.get_Layer(0) as IGeoFeatureLayer;
            IAnnotateLayerPropertiesCollection annotateLayerPropertiesCollection = geoFeatureLayer.AnnotationProperties;

            LabelEngineLayerProperties labelEngineLayerProperties = new LabelEngineLayerProperties();
            IAnnotateLayerProperties annotateLayerProperties = labelEngineLayerProperties as IAnnotateLayerProperties;

            IElementCollection placedElements = new ElementCollection();
            IElementCollection unplacedElements = new ElementCollection();

            annotateLayerPropertiesCollection.QueryItem(1, out annotateLayerProperties, out placedElements, out unplacedElements); // 0 = default, 1 = 1st Class

            string className = annotateLayerProperties.Class;
            System.Diagnostics.Debug.WriteLine("Class Name: " + className);

            ArcMap.Application.CurrentTool = null;
        }
开发者ID:ApexGIS,项目名称:developer-support,代码行数:19,代码来源:LabelClasses_2010.cs

示例11: RaisesCollectionChangedEvent

            public void RaisesCollectionChangedEvent()
            {
                var collection = new ElementCollection<Axis>(new PlotModel());

                ElementCollectionChangedEventArgs<Axis> eventArgs = null;
                var raisedCount = 0;

                collection.CollectionChanged += (sender, e) =>
                {
                    eventArgs = e;
                    raisedCount++;
                };

                var axis = new LinearAxis();
                collection.Add(axis);

                Assert.AreEqual(1, raisedCount);
                Assert.AreEqual(1, eventArgs.AddedItems.Count);
                Assert.IsTrue(ReferenceEquals(axis, eventArgs.AddedItems[0]));
            }
开发者ID:huoxudong125,项目名称:oxyplot,代码行数:20,代码来源:ElementCollectionTests.cs

示例12: EliminateUselessGroupNesting

 private static void EliminateUselessGroupNesting(ElementCollection elements)
 {
     for (var i = 0; i < elements.Count; i++)
     {
         var group = elements[i] as Group;
         if (group == null)
         {
             continue;
         }
         EliminateUselessGroupNesting(group.Children);
         if (IsUselessGroup(group))
         {
             elements.RemoveAt(i);
             var count = group.Children.Count;
             while (group.Children.Count > 0)
             {
                 elements.MoveTo(i, group.Children[group.Children.Count - 1]);
             }
             i += count - 1;
         }
     }
 }
开发者ID:90dend,项目名称:SvgToVectorDrawableConverter,代码行数:22,代码来源:VectorOptimizer.cs

示例13: Abbreviation

 /// <summary>
 /// Initializes an instance of a browser element.
 /// </summary>
 /// <param name="element"> The browser element this is for. </param>
 /// <param name="browser"> The browser this element is associated with. </param>
 /// <param name="collection"> The collection this element is associated with. </param>
 public Abbreviation(JToken element, Browser browser, ElementCollection collection)
     : base(element, browser, collection)
 {
 }
开发者ID:MichaelBergerman,项目名称:TestR,代码行数:10,代码来源:Abbreviation.cs

示例14: StrikeThrough

 /// <summary>
 /// Initializes an instance of a browser element.
 /// </summary>
 /// <param name="element"> The browser element this is for. </param>
 /// <param name="browser"> The browser this element is associated with. </param>
 /// <param name="collection"> The collection this element is associated with. </param>
 public StrikeThrough(JToken element, Browser browser, ElementCollection collection)
     : base(element, browser, collection)
 {
 }
开发者ID:MichaelBergerman,项目名称:TestR,代码行数:10,代码来源:StrikeThrough.cs

示例15: Legend

 /// <summary>
 /// Initializes an instance of a browser element.
 /// </summary>
 /// <param name="element"> The browser element this is for. </param>
 /// <param name="browser"> The browser this element is associated with. </param>
 /// <param name="collection"> The collection this element is associated with. </param>
 public Legend(JToken element, Browser browser, ElementCollection collection)
     : base(element, browser, collection)
 {
 }
开发者ID:MichaelBergerman,项目名称:TestR,代码行数:10,代码来源:Legend.cs


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