Beispiel #1
0
 //.........................................
 public void add(int lawnum,string lawContent)
 {
     try
     {
         LawsNode thisNode=null;
         LawsNode temp=first;
         if(first==null)
         {
             first=new LawsNode(lawnum,this);
             thisNode=first;
         }
         else
         {
             while(temp.next!=null)
                 temp=temp.next;
             temp.next=new LawsNode(lawnum,this);
             thisNode=temp.next;
         }
         string []contents=lawContent.Split(' ');
         bool isFirst=true;
         foreach(string s in contents)
         {
             if(isFirst)
             {
                 isFirst=false;
                 continue;
             }
             if(s.Length==0)
                 continue;
             if(s[0]=='#')
                 thisNode.parts.add(s.Substring(1,s.Length-1),false);
             else
                 thisNode.parts.add(s,true);
         }
         lawsCount++;
     }
     catch(Exception e1)
     {
         MessageBox.Show("in laws.add : "+e1.Message);
     }
 }
Beispiel #2
0
 //...............................
 public Laws(nonTerminalNode parentNonTerm)
 {
     first=null;
     lawsCount=0;
     this.parent=parentNonTerm;
 }
Beispiel #3
0
 public LawsNode(int lawnum,Laws law)
 {
     this.parts=new Parts(law);
       this.item.lawNum = lawnum;
       next=null;
 }