Наследование: ICloneable
Пример #1
0
 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 );
 }