상속: ICloneable
예제 #1
0
파일: Criterion.cs 프로젝트: fragmer/fCraft
 public Criterion( Criterion other ) {
     if( other == null ) throw new ArgumentNullException( "other" );
     Type = other.Type;
     FromRank = other.FromRank;
     ToRank = other.ToRank;
     Condition = other.Condition;
 }
예제 #2
0
 private void bOK_Click( object sender, EventArgs e )
 {
     XDocument doc = new XDocument();
     XElement root = new XElement( AutoRankManager.TagName );
     foreach( TreeNode node in treeData.Nodes ) {
         ActionNode anode = (ActionNode)node;
         if( anode.FromRank == null || anode.ToRank == null ) continue;
         Criterion crit = new Criterion {
             FromRank = anode.FromRank,
             ToRank = anode.ToRank,
             Condition = ExportConditions( anode )
         };
         root.Add( crit.Serialize() );
     }
     doc.Add( root );
     doc.Save( Paths.AutoRankFileName );
     Application.Exit();
 }
예제 #3
0
 public static void Add( Criterion criterion ) {
     if( criterion == null ) throw new ArgumentNullException( "criterion" );
     Criteria.Add( criterion );
 }