Defines a KeyProgram event argument : Index represents the index of the command concerned by the event, in the command list
상속: KeyboardContextEventArgs
예제 #1
0
        void OnKeyDownCommands_CommandUpdated( object sender, KeyProgramCommandsEventArgs e )
        {
            if( Commands[e.Index] == null ) throw new IndexOutOfRangeException( String.Format( vmCollectionOutOfRangeErrorMessage, "updated" ) );
            if( _model.OnKeyDownCommands.Commands[e.Index] == null ) throw new IndexOutOfRangeException( String.Format( ownCollectionOutOfRangeErrorMessage, "updated" ) );

            Commands[e.Index] = e.KeyProgram.Commands[e.Index];
        }
예제 #2
0
 void OnKeyDownCommands_CommandDeleted( object sender, KeyProgramCommandsEventArgs e )
 {
     if( Commands[e.Index] == null ) throw new IndexOutOfRangeException( String.Format( vmCollectionOutOfRangeErrorMessage, "deleted" ) );
     Commands.RemoveAt( e.Index );
 }
예제 #3
0
 void OnKeyDownCommands_CommandsCleared( object sender, KeyProgramCommandsEventArgs e )
 {
     Commands.Clear();
 }
예제 #4
0
 void OnKeyDownCommands_CommandInserted( object sender, KeyProgramCommandsEventArgs e )
 {
     if( Model.OnKeyDownCommands.Commands[e.Index] == null ) throw new IndexOutOfRangeException( String.Format( ownCollectionOutOfRangeErrorMessage, "inserted" ) );
     Commands.Insert( e.Index, e.KeyProgram.Commands[e.Index] );
 }