Example #1
0
        public Commands()
        {
            AddModel = new Extensions.Models.Commands.AddModel();
            Handler  = new Extensions.Commands.CommandHandler();

            SetCommands();
        }
Example #2
0
 /// <summary>
 /// Init Commands
 /// </summary>
 private void SetCommands()
 {
     AddCommand      = new Internal.RelayCommand(add => AddCommandToList(), add => !String.IsNullOrEmpty(AddModel.Command) && !String.IsNullOrEmpty(AddModel.Text));
     ResetAddCommand = new Internal.RelayCommand(reset => AddModel = new Extensions.Models.Commands.AddModel(), add => true);
     DeleteCommand   = new Internal.RelayCommand(d => Delete(), delete => Handler.SelectedCommand != null);
 }