コード例 #1
0
 public dmGroup(dmContainer dmcParent)
     : base(dmcParent)
 {
     this.FiltersAndDefaults = new dmRuleset(this);
     this.Rulesets           = new SortableBindingList <dmRuleset>();
     this.Groups             = new SortableBindingList <dmGroup>();
 }
コード例 #2
0
        public int MergeRuleset(string[] strArray, int nLineStart, dmContainer dmcParent)
        {
            int nReturn = nLineStart;
            //parses until it reaches the end of the group and returns the line number after the end of the group
            dmRuleset newRS = new dmRuleset(this);


            string        tmpString = strArray[nReturn];
            LineParseType tmpLPT    = IdentifyLineType(tmpString);

            if (tmpLPT == LineParseType.RulesetNameLine)
            {
                Dictionary <string, string> itemParameters = GetParameters(strArray[nReturn]);
                foreach (KeyValuePair <string, string> item in itemParameters)
                {
                    switch (item.Key)
                    {
                    case "NAME":
                        newRS.Name = item.Value;
                        break;

                    case "COMMENT":
                        newRS.Comment = item.Value;
                        break;
                    }
                }
                nReturn++;
            }

            newRS.Parse(strArray[nReturn]);

            if (!dmcParent.Rulesets.Contains(newRS))
            {
                dmcParent.AddRuleset(newRS);
            }
            nReturn++;

            return(nReturn);
        }
コード例 #3
0
 public override void Clear()
 {
     base.Clear();
     this.FiltersAndDefaults = new dmRuleset(this);
 }
コード例 #4
0
 public override void FromXML(XElement xParameters)
 {
     base.FromXML(xParameters);
     this.FiltersAndDefaults = new dmRuleset(this, xParameters.Element("filtersanddefaults"));
 }
コード例 #5
0
 public void AddRuleset(dmRuleset rsRuleset)
 {
     Rulesets.Add(rsRuleset);
 }
コード例 #6
0
 public int IndexOfRuleset(dmRuleset item)
 {
     return(Rulesets.IndexOf(item));
 }
コード例 #7
0
 public void InsertRuleset(int index, dmRuleset item)
 {
     Rulesets.Insert(index, item);
 }
コード例 #8
0
 public bool RemoveRuleset(dmRuleset item)
 {
     return(Rulesets.Remove(item));
 }
コード例 #9
0
 public bool ContainsRuleset(dmRuleset item)
 {
     return(Rulesets.Contains(item));
 }