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

            _pinnedLocations.Insert(0, _pinnedLocation);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Undoes the action.
 /// </summary>
 public void ExecuteUndo()
 {
     if (_existingIndex.HasValue)
     {
         _pinnedLocations.Insert(_existingIndex.Value, _pinnedLocation);
     }
 }