Beispiel #1
0
 public static void SetParameter( this XElement Root, string WIdentifier, XKey key )
 {
     XElement tag = Root.FindParameter( WIdentifier );
     if ( tag != null )
     {
         tag.SetKey( key );
     }
     else
     {
         Root.Add( new XElement( XRegistry.WTAG, new XAttribute[] { new XAttribute( XRegistry.XID, WIdentifier ), key } ) );
     }
 }
Beispiel #2
0
 public static void SetParameter( this XElement Root, string WIdentifier, XKey[] keys, XParameter[] Params = null )
 {
     XElement tag = Root.FindParameter( WIdentifier );
     if ( tag != null )
     {
         foreach ( XKey k in keys ) tag.SetKey( k );
         if ( Params != null ) foreach ( XParameter P in Params ) tag.SetParameter( P );
     }
     else
     {
         Root.Add( new XElement(
             XRegistry.WTAG
             , new XAttribute[] {
                 new XAttribute( XRegistry.XID, WIdentifier ) }
                 .Concat( keys ), Params )
         );
     }
 }
Beispiel #3
0
 public void SetParameter( string WIdentifier, XKey[] keys ) { Root.SetParameter( WIdentifier, keys ); }
Beispiel #4
0
 public void SetValue( XKey key ) { this.SetXValue( key ); }
Beispiel #5
0
 public static void SetXValue( this XElement XRef, XKey key )
 {
     XAttribute xa = XRef.Attribute( key.KeyName );
     if ( xa != null )
     {
         xa.Value = key.KeyValue;
     }
     else
     {
         XRef.Add( key );
     }
 }
Beispiel #6
0
 private static void SetKey( this XElement tag, XKey key )
 {
     XAttribute xa = tag.Attribute( key.KeyName );
     if ( xa != null )
     {
         xa.Value = key.KeyValue;
     }
     else
     {
         tag.Add( key );
     }
 }