Example #1
0
 private void QueueCommand(ViewModel.Command Command)
 {
     if (!this.CommandQueue.Contains(Command))
     {
         this.CommandQueue.Add(Command);
     }
 }
Example #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;
                }
            }
        }
Example #3
0
 public Command(ViewModel.Command Command)
 {
     this.ID         = ViewModel.Utilities.GuidToString(Command.ID);
     this.CanExecute = Command.CanExecute;
 }
Example #4
0
 private void Command_CanExecuteChanged(object sender, EventArgs e)
 {
     ViewModel.Command command = (ViewModel.Command)sender;
     this.QueueCommand(command);
 }