public static void ShowReleaseNotes()
        {
            var oldVersionString = Properties.Settings.Default.CurrentVersion;
            var newVersionString = Properties.Settings.Default.Version;

            if (oldVersionString == newVersionString)
            {
                return;
            }

            Properties.Settings.Default.CurrentVersion = newVersionString;

            Properties.Settings.Default.Save();

            Version oldVersion;

            if (!Version.TryParse(oldVersionString, out oldVersion))
            {
                oldVersion = new Version(1, 0, 0, 0);
            }

            var newVersion = Version.Parse(newVersionString);

            var releaseNotes = JsonConvert.DeserializeObject <List <ReleaseNote> >(IOUtils.GetReleaseNotesJson());

            var list = releaseNotes.ToList();

            if (list.Any())
            {
                new ReleaseNotesWindow(list, $"Release notes (new version: {newVersion}, old version: {oldVersion})").ShowDialog();
            }
        }
示例#2
0
        public static void ShowReleaseNotes(string title = "Release Notes")
        {
            var releaseNotes = JsonConvert.DeserializeObject <List <ReleaseNote> >(IOUtils.GetReleaseNotesJson());

            var list = releaseNotes.ToList();

            if (list.Any())
            {
                new Views.Popups.ReleaseNotesWindow(list, title).ShowDialog();
            }
        }