Beispiel #1
0
 public int this[string name]
 {
     get
     {
         foreach (RTFAttribute a in this)
         {
             if (a.Name == name)
             {
                 return(a.Value);
             }
         }
         return(int.MinValue);
     }
     set
     {
         foreach (RTFAttribute a in this)
         {
             if (a.Name == name)
             {
                 a.Value = value;
                 return;
             }
         }
         var item = new RTFAttribute();
         item.Name  = name;
         item.Value = value;
         List.Add(item);
     }
 }
Beispiel #2
0
        public int Add(string name, int v)
        {
            var item = new RTFAttribute();

            item.Name  = name;
            item.Value = v;
            return(List.Add(item));
        }
Beispiel #3
0
 public void Remove(string name)
 {
     for (int iCount = this.Count - 1; iCount >= 0; iCount--)
     {
         RTFAttribute item = (RTFAttribute)this.List[iCount];
         if (item.Name == name)
         {
             this.List.RemoveAt(iCount);
         }
     }
 }
Beispiel #4
0
        public RTFAttributeList Clone()
        {
            var list = new RTFAttributeList();

            foreach (RTFAttribute item in this)
            {
                var newItem = new RTFAttribute();
                newItem.Name  = item.Name;
                newItem.Value = item.Value;
                list.List.Add(newItem);
            }
            return(list);
        }
 public void Remove(RTFAttribute item)
 {
     this.List.Remove(item);
 }
 public bool Contains(RTFAttribute item)
 {
     return this.List.Contains(item);
 }
 public RTFAttributeList Clone()
 {
     RTFAttributeList list = new RTFAttributeList();
     foreach (RTFAttribute item in this)
     {
         RTFAttribute newItem = new RTFAttribute();
         newItem.Name = item.Name;
         newItem.Value = item.Value;
         list.List.Add(newItem);
     }
     return list;
 }
 public int Add(string name, int v)
 {
     RTFAttribute item = new RTFAttribute();
     item.Name = name;
     item.Value = v;
     return this.List.Add(item);
 }
 public int Add(RTFAttribute item)
 {
     return this.List.Add(item);
 }
 public int this[string name]
 {
     get
     {
         foreach (RTFAttribute a in this)
         {
             if (a.Name == name)
                 return a.Value;
         }
         return int.MinValue;
     }
     set
     {
         foreach (RTFAttribute a in this)
         {
             if (a.Name == name)
             {
                 a.Value = value;
                 return;
             }
         }
         RTFAttribute item = new RTFAttribute();
         item.Name = name;
         item.Value = value;
         this.List.Add(item);
     }
 }
Beispiel #11
0
 public bool Contains(RTFAttribute item)
 {
     return(List.Contains(item));
 }
Beispiel #12
0
 public void Remove(RTFAttribute item)
 {
     List.Remove(item);
 }
Beispiel #13
0
 public int Add(RTFAttribute item)
 {
     return(List.Add(item));
 }