protected override void OnCommandSent( object sender, CommandSentEventArgs e ) { CommandParser p = new CommandParser(e.Command); string str; if( p.IsIdentifier( out str ) && !e.Canceled && str == CMDSendKey ) { if( str == CMDSendKey ) SendKey( p.StringValue ); } }
protected override void OnCommandSent( object sender, CommandSentEventArgs e ) { string cmd; string m; CommandParser p = new CommandParser( e.Command ); if( !e.Canceled && p.IsIdentifier( out cmd ) && cmd == CMD ) { if( p.Match( CommandParser.Token.OpenPar ) ) if( p.IsString( out m ) ) if( p.Match( CommandParser.Token.ClosePar ) ) if( cmd == CMD ) Exec( m ); } }
protected override void OnCommandSent( object sender, CommandSentEventArgs e ) { string cmd; string sub; string m; CommandParser p = new CommandParser( e.Command ); if( !e.Canceled && p.IsIdentifier( out cmd ) && cmd == CMDChangeMode ) { if( p.MatchIsolatedChar( '.' ) ) { p.IsIdentifier( out sub ); sub = sub.ToLower(); if( p.Match( CommandParser.Token.OpenPar ) ) if( p.IsString( out m ) ) if( p.Match( CommandParser.Token.ClosePar ) ) { if( cmd == CMDChangeMode ) { switch( sub ) { case "add": Add( m ); return; case "remove": Remove( m ); return; case "set": ChangeMode( m ); return; case "toggle": Toggle( m ); return; } } } } } }
protected override void OnCommandSent( object sender, CommandSentEventArgs e ) { if( !e.Canceled ) { CommandParser p = new CommandParser( e.Command ); if( p.MatchIdentifier( CMD ) ) { string eventKey; string eventName; if( p.MatchIsolatedChar( '.' ) ) { if( p.IsIdentifier( out eventName ) ) { if( p.Match( CommandParser.Token.OpenPar ) ) { if( p.IsString( out eventKey ) ) { if( p.Match( CommandParser.Token.ClosePar ) ) { if( p.MatchIsolatedChar( ':' ) ) { Parse( eventKey, eventName, e.Command.Split( ':' )[1] ); } } } } } } } } }