Esempio n. 1
0
        /// <summary>
        /// Stores the last RecentCommitMessageCount commit messages.
        /// </summary>
        private void LoadRecentCommitMessages()
        {
            RecentCommitMessages.Clear();

            foreach (Commit commit in Commits.Take(RecentCommitMessageCount))
            {
                RecentCommitMessages.Add(new RecentCommitMessage(commit.ShortDescription));
            }
        }
        /// <summary>
        /// Stores the last RecentCommitMessageCount commit messages.
        /// </summary>
        private void LoadRecentCommitMessages()
        {
            // A small performance boost.
            RecentCommitMessages.DisableNotifications();

            RecentCommitMessages.Clear();

            foreach (var commit in Commits.Take(RecentCommitMessageCount))
            {
                RecentCommitMessages.Add(new RecentCommitMessage(commit.ShortDescription));
            }

            // Fire notifications for the collection on the UI thread.
            Application.Current.Dispatcher.Invoke(
                DispatcherPriority.Normal,
                (Action)(() => RecentCommitMessages.EnableNotifications(true))
                );
        }