void BindCommands() { commandBindingManager.RegisterCommand(viewModel.RepairPathCommand, buttonRepair); commandBindingManager.RegisterCommand(viewModel.FillAllCommand, radioButton1); commandBindingManager.RegisterCommand(viewModel.FillDuplicatedCommand, radioButton2); commandBindingManager.RegisterCommand(viewModel.FillNotExistCommand, radioButton3); }
void BindCommands() { var commands = new Dictionary<object, Action<object>> { {addNewEntryToolStripMenuItem,o=> tabControl1.SelectedTab = tabPage2} , {AddToolStripButton, o => tabControl1.SelectedTab = tabPage2} , {exitToolStripMenuItem, o=>Application.Exit()}, {TextViewToolStripButton ,o=> tabControl1.SelectedTab = tabPage4} , {RemoveToolStripButton, o=>tabControl1.SelectedTab = tabPage3}, {ListViewToolStripButton, o=>tabControl1.SelectedTab = tabPage1}, {RefreshToolStripButton, o=>_pathManager.Refresh()}, {ExportToolStripButton,o=>_pathManager.ExportToFile()}, {exportPathToFileToolStripMenuItem,o=>_pathManager.ExportToFile()} }; foreach (var command in commands) { commandBindingManager.RegisterCommand(command.Key, command.Value); } // commandBindingManager.AddCommand(ViewModel .PathTextCommand , TextViewToolStripButton); }
void BindCommands() { _commandBindingManager.RegisterCommand(MoveUpCommand, buttonUp); _commandBindingManager.RegisterCommand(MoveDownCommand, buttonDown); _commandBindingManager.RegisterCommand(MoveTopCommand, buttonTop); _commandBindingManager.RegisterCommand(MoveBottomCommand, buttonBottom); _commandBindingManager.RegisterCommand(SortListCommand, buttonSort); _commandBindingManager.RegisterCommand(ResetListCommand, buttonReset); _commandBindingManager.RegisterCommand(SaveCommand, buttonSave); }
private void BindCommands() { // AddCommand(ViewModel.BrowseCommand, buttonBrowse); commandBindingManager.RegisterCommand(ViewModel.BrowseCommand, buttonBrowse); commandBindingManager.RegisterCommand(ViewModel.AddEntryCommand, button2); }