Ejemplo n.º 1
0
        public static UVMCommand Async(Action <object> Execute, Func <object, bool> CanExecute)
        {
            var c = new UVMCommand();

            c.Exec = p => {
                Execute.BeginInvoke(null, ar => { c.Finished = true; }, null);
            };
            c.CanExec  = CanExecute;
            c.Finished = false;

            return(c);
        }
Ejemplo n.º 2
0
        public static UVMCommand Async(string Name, Action <object> Execute)
        {
            var c = new UVMCommand();

            c.Name = Name;
            c.Exec = p => {
                Execute.BeginInvoke(null, ar => { c.Finished = true; }, null);
            };
            c.CanExec  = c.StaticCanExecute;
            c.Finished = false;

            return(c);
        }
 public void Add(UVMCommand Command)
 {
     list.Add(Command);
 }