Exemplo n.º 1
0
 private void RemoveFakeItems(IGraphBuilder <Revision> builder)
 {
     if (_showStatusItems)
     {
         if (_stagedItem != null)
         {
             _stagedItem.Remove();
             if (_currentIndex != -1)
             {
                 --_currentIndex;
             }
         }
         if (_unstagedItem != null)
         {
             _unstagedItem.Remove();
             if (_currentIndex != -1)
             {
                 --_currentIndex;
             }
         }
         if (_currentRevisionItem != null)
         {
             if (_currentIndex == 0)
             {
                 builder.CleanGraph(_currentRevisionItem.Graph);
             }
             else
             {
                 var prev = ((RevisionListItem)Items[_currentIndex - 1]).Graph;
                 var next = ((RevisionListItem)Items[_currentIndex]).Graph;
                 builder.CleanGraph(prev, next);
             }
         }
     }
 }
Exemplo n.º 2
0
 private void RemoveFakeItems(IGraphBuilder<Revision> builder)
 {
     if(_showStatusItems)
     {
         if(_stagedItem != null)
         {
             _stagedItem.Remove();
             if(_currentIndex != -1)
             {
                 --_currentIndex;
             }
         }
         if(_unstagedItem != null)
         {
             _unstagedItem.Remove();
             if(_currentIndex != -1)
             {
                 --_currentIndex;
             }
         }
         if(_currentRevisionItem != null)
         {
             if(_currentIndex == 0)
             {
                 builder.CleanGraph(_currentRevisionItem.Graph);
             }
             else
             {
                 var prev = ((RevisionListItem)Items[_currentIndex - 1]).Graph;
                 var next = ((RevisionListItem)Items[_currentIndex]).Graph;
                 builder.CleanGraph(prev, next);
             }
         }
     }
 }