daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Aug 18th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SANS LES LAMBDAS :
  2.  
  3. public ICommand StartCommand { get; internal set; }
  4.  
  5. private initStartCommand()
  6. {
  7.     this.StartCommand = new RelayCommand<string>(execStartCommand, canExecuteStartCommand);
  8. }
  9.  
  10. private void execStartCommand(string param)
  11. {
  12.     MessageBox.Show("Start");
  13. }
  14.  
  15. private bool canExecuteStartCommand(string param)
  16. {
  17.     return true;
  18. }
  19.  
  20.  
  21. AVEC LES LAMBDAS :
  22.  
  23. public ICommand StartCommand { get; internal set; }
  24.  
  25. private initStartCommand()
  26. {
  27.     this.StartCommand = new RelayCommand<string>((param) => { MessageBox.Show("Start"); }, (param) => { return true; });
  28. }
RAW Paste Data
Top