Example #1
0
 private void InitializeSupportedCommands(ICommandRouter router)
 {
     bindings = new CommandBinding[]
     {
         new CommandBinding(){ Command=DefinedCommands.NewConfig, CanExecute=()=>true, Execute=()=>{if(null!=NewConfig) NewConfig(this,EventArgs.Empty);}}
         ,new CommandBinding(){ Command=DefinedCommands.NewHql, CanExecute=()=>true, Execute=()=>{if(null!=NewHql) NewHql(this,EventArgs.Empty);}}
         ,new CommandBinding(){ Command=DefinedCommands.NewMapping, CanExecute=()=>true, Execute=()=>{if(null!=NewMapping) NewMapping(this,EventArgs.Empty);}}
         ,new CommandBinding(){ Command=DefinedCommands.OpenFile, CanExecute=()=>true, Execute=()=>{if(null!=OpenFile) OpenFile(this,EventArgs.Empty);}}
     };
     router.Register(this);
 }