예제 #1
0
        private void DisplayPatches(IReadOnlyList <PatchFile> patchFiles)
        {
            PatchFiles         = patchFiles;
            Patches.DataSource = patchFiles;

            if (patchFiles.Any())
            {
                int rowsInView            = Patches.DisplayedRowCount(false);
                int currentPatchFileIndex = patchFiles.TakeWhile(pf => !pf.IsNext).Count() - 1;
                Patches.FirstDisplayedScrollingRowIndex = Math.Max(0, currentPatchFileIndex - (rowsInView / 2));
            }

            SelectCurrentlyApplyingPatch();
        }
예제 #2
0
        public void Initialize()
        {
            var patchFiles = Module.InTheMiddleOfInteractiveRebase()
                ? Module.GetInteractiveRebasePatchFiles()
                : Module.GetRebasePatchFiles();

            Patches.DataSource = patchFiles;

            if (patchFiles.Any())
            {
                int rowsInView = Patches.DisplayedRowCount(false);
                Patches.FirstDisplayedScrollingRowIndex = Math.Max(0, patchFiles.TakeWhile(pf => !pf.IsNext).Count() - (rowsInView / 2));
            }
        }