Ejemplo n.º 1
0
 private void QueueCommand(ViewModel.Command Command)
 {
     if (!this.CommandQueue.Contains(Command))
     {
         this.CommandQueue.Add(Command);
     }
 }
Ejemplo n.º 2
0
        internal void CacheCommand(ViewModel.Command Command)
        {
            lock (this.CommandCacheLock)
            {
                if (!this.CommandCache.ContainsKey(Command.ID))
                {
                    // Store Command in Cache
                    this.CommandCache[Command.ID] = Command;

                    // Queue Command
                    this.QueueCommand(Command);

                    // Link to Event for when CanExecute Changes
                    Command.CanExecuteChanged += Command_CanExecuteChanged;
                }
            }
        }
Ejemplo n.º 3
0
 public Command(ViewModel.Command Command)
 {
     this.ID         = ViewModel.Utilities.GuidToString(Command.ID);
     this.CanExecute = Command.CanExecute;
 }
Ejemplo n.º 4
0
 private void Command_CanExecuteChanged(object sender, EventArgs e)
 {
     ViewModel.Command command = (ViewModel.Command)sender;
     this.QueueCommand(command);
 }