Exemplo n.º 1
0
 public dmCollection()
     : base(null)
 {
     Disabled         = new dmGroup(this);
     Disabled.Name    = "Disabled";
     Disabled.Comment = "Disabled Groups and Rulesets";
 }
Exemplo n.º 2
0
        protected int ParseGroup(string[] strArray, int nLineStart, dmContainer Parent)
        {
            int     nReturn  = nLineStart;
            dmGroup newGroup = new dmGroup(this);
            Dictionary <string, string> itemParameters = GetParameters(strArray[nReturn]);

            foreach (KeyValuePair <string, string> item in itemParameters)
            {
                switch (item.Key)
                {
                case "FILTERSANDDEFAULTS":
                    newGroup.FiltersAndDefaults.Parse(item.Value);
                    break;

                case "GROUP":
                    newGroup.Name = item.Value;
                    break;

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

            //parses until it reaches the end of the group and returns the line number after the end of the group
            while (nReturn < strArray.Length && IdentifyLineType(strArray[nReturn]) != LineParseType.GroupEndLine)
            {
                string[] tmpVariable = new string[0];
                switch (IdentifyLineType(strArray[nReturn]))
                {
                case LineParseType.GroupStartLine:
                    nReturn = ParseGroup(strArray, nReturn, newGroup);
                    break;

                case LineParseType.RulesetLine:
                case LineParseType.RulesetNameLine:
                    nReturn = ParseRuleset(strArray, nReturn, newGroup);
                    break;

                default:
                    nReturn++;
                    break;
                }
            }
            nReturn++;
            Parent.AddGroup(newGroup);

            return(nReturn);
        }
Exemplo n.º 3
0
 public dmCollection(dmGroup rsGroup)
     : this()
 {
     this.Groups.Add(rsGroup.Clone(this));
 }
Exemplo n.º 4
0
 public int IndexOfGroup(dmGroup item)
 {
     return(Groups.IndexOf(item));
 }
Exemplo n.º 5
0
 public bool ContainsGroup(dmGroup item)
 {
     return(Groups.Contains(item));
 }
Exemplo n.º 6
0
 public void InsertGroup(int index, dmGroup item)
 {
     Groups.Insert(index, item);
 }
Exemplo n.º 7
0
 public bool RemoveGroup(dmGroup item)
 {
     return(Groups.Remove(item));
 }
Exemplo n.º 8
0
 public bool Contains(dmGroup item)
 {
     return(ContainsGroup(item));
 }
Exemplo n.º 9
0
 public void AddGroup(dmGroup rsgGroup)
 {
     this.Groups.Add(rsgGroup);
 }