Exemplo n.º 1
0
        /// <summary>
        /// Returns whether the action can be executed.
        /// </summary>
        /// <returns>
        /// A boolean representing whether the action can be executed.
        /// </returns>
        public bool CanExecute()
        {
            if (!_pinnedLocations.Contains(_pinnedLocation))
            {
                return(true);
            }

            if (_pinnedLocations.IndexOf(_pinnedLocation) == 0)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Executes the action.
 /// </summary>
 public void ExecuteDo()
 {
     _existingIndex = _pinnedLocations.IndexOf(_pinnedLocation);
     _pinnedLocations.Remove(_pinnedLocation);
 }