Beispiel #1
0
        void AddStagedList(LibGit2Sharp.StatusEntry filestatus, SelectionRecover backup_selection)
        {
            FileStatus status = new FileStatus();
            status.Status = filestatus.State.ToString();
            status.FilePath = filestatus.FilePath;
            status.Display = status.FilePath;
            if ((filestatus.State == LibGit2Sharp.FileStatus.RenamedInIndex) |
                (filestatus.State == (LibGit2Sharp.FileStatus.RenamedInIndex | LibGit2Sharp.FileStatus.Staged)))
            {
                status.Display = string.Format(" {0} -> {1} [{2}%]",
                    filestatus.HeadToIndexRenameDetails.OldFilePath,
                    filestatus.HeadToIndexRenameDetails.NewFilePath,
                    filestatus.HeadToIndexRenameDetails.Similarity);
            }
            status.IsSelected = backup_selection.WasSelected(filestatus.FilePath);

            StagedList.Add(status);
            PropertyChanged(this, new PropertyChangedEventArgs("StagedList"));
        }
Beispiel #2
0
        void AddModifiedList(LibGit2Sharp.StatusEntry filestatus, SelectionRecover backup_selection)
        {
            FileStatus status = new FileStatus();
            status.Status = filestatus.State.ToString();
            status.FilePath = filestatus.FilePath;
            status.Display = status.FilePath;
            status.IsSelected = backup_selection.WasSelected(filestatus.FilePath);

            ModifiedList.Add(status);
            PropertyChanged(this, new PropertyChangedEventArgs("ModifiedList"));
        }