<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using EDEngineer.Models;
using Newtonsoft.Json;

namespace EDEngineer.Utils.System
{
    public static class ReleaseNotesManager
    {
        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);
            }
            else if (oldVersion < new Version(1, 0, 27))
            {
                Properties.Settings.Default.ResetUI = true;
            }

            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();
            }
        }
    }
}<commit_msg>don't reset the window for 1.0.27, but for 1.0.0.27 instead!<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using EDEngineer.Models;
using Newtonsoft.Json;

namespace EDEngineer.Utils.System
{
    public static class ReleaseNotesManager
    {
        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);
            }
            else if (oldVersion < new Version(1, 0, 0, 27))
            {
                Properties.Settings.Default.ResetUI = true;
            }

            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();
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09331955922865014, 'fraction_numerical': 0.008953168044077135, 'mean_word_length': 2.00103305785124, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3739944', 'n_tokens_mistral': 769, 'n_tokens_neox': 721, 'n_words': 160}