Ejemplo n.º 1
0
 void BindCommands()
 {
     commandBindingManager.RegisterCommand(viewModel.RepairPathCommand, buttonRepair);
     commandBindingManager.RegisterCommand(viewModel.FillAllCommand, radioButton1);
     commandBindingManager.RegisterCommand(viewModel.FillDuplicatedCommand, radioButton2);
     commandBindingManager.RegisterCommand(viewModel.FillNotExistCommand, radioButton3);
 }
Ejemplo n.º 2
0
        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);


        }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 private void BindCommands()
 {
     //    AddCommand(ViewModel.BrowseCommand, buttonBrowse);
     commandBindingManager.RegisterCommand(ViewModel.BrowseCommand, buttonBrowse);
     commandBindingManager.RegisterCommand(ViewModel.AddEntryCommand, button2);
 }