private static IEnumerable<HistoryEntry> CreateEntriesForFile(ApplicationLogic appLogic, IFileWithHistory file)
 {
     foreach (var version in file.History) {
         yield return new HistoryEntry (appLogic, file, version);
     }
     yield break;
 }
        public HistoryDialog(ApplicationLogic logic, IFileWithHistory file)
        {
            this.Build ();
            RegisterEvents ();
            File = file;

            label.Text = file.PathInRepository;

            var entries = CreateEntriesForFile (logic, file).ToList ();

            entries.ForEach (e => e.OnVersionShown += logic.ShowVersionOfFile);

            DisplayEntries (entries);

            ShowAll ();
        }
Пример #3
0
        public HistoryEntry(ApplicationLogic appLogic, IFileWithHistory file, IFileVersion version)
        {
            Version = version;
            File = file;
            applicationLogic = appLogic;
            this.Build ();

            openButton.Clicked += HandleOpenButtonClicked;

            dateLabel.Text = Version.CreationAt.ToString ();

            commentTextview.Buffer.Text = Version.Commit.Comment;

            BorderWidth = 5;

            Show ();
        }
Пример #4
0
        public static void Main(string[] args)
        {
            Application.Init ();

            ChangeCurrentDirectoryToExePath ();

            Catalog.Init ("i18n", "locale");

            var git = new DirectoryHistory.History.Git.HistoryProvider ();
            var gitCreator = new DirectoryHistory.History.Git.TempFileCreator (git);
            var cache = new TempFileCache (gitCreator);

            var context = new ApplicationContext () {
                Provider = git,
                TempFileCache = cache,
                ExceptionHandling = new ExceptionHandling (new ExceptionOccuredDialog ())
            };

            var applLogic = new ApplicationLogic (context);

            MainWindow win = new MainWindow (applLogic);
            win.Show ();
            Application.Run ();
        }