Пример #1
0
        public static UVMCommand AsyncCommand(Action <object> Execute, Func <object, bool> CanExecute, Action <bool> NotifyState = null)
        {
            var c = new UVMCommand();

            c.NotifyStateAction = NotifyState;
            c.Exec = p => {
                c.Finished = false;
                Execute.BeginInvoke(null, pp => c.Finished = true, null);
            };
            c.CanExec = CanExecute;
            return(c);
        }
Пример #2
0
 public void Add(UVMCommand Command)
 {
     list.Add(Command);
 }