Beispiel #1
0
        //launch a form showing the user what is new since the last version(s)
        private void ShowWhatsNew()
        {
            Settings set = BLLocalDatabase.Setting.Settings;

            if (set.LastVersion != null && (new Version(set.LastVersion) < new Version(IOVariables.RemindMeVersion)))
            {
                BLIO.Log("[VERSION CHECK] New version! last version: " + set.LastVersion + "  New version: " + IOVariables.RemindMeVersion);
                //User has a new RemindMe version!
                string releaseNotesString = "";

                foreach (KeyValuePair <string, string> entry in UpdateInformation.ReleaseNotes)
                {
                    if (new Version(entry.Key) > new Version(set.LastVersion))
                    {
                        releaseNotesString += "Version " + entry.Key + "\r\n" + entry.Value + "\r\n\r\n\r\n";
                    }
                }
                if (releaseNotesString.Length > 0)
                {
                    MaterialWhatsNew wn = new MaterialWhatsNew(set.LastVersion, releaseNotesString);
                    materialSkinManager.AddFormToManage(wn);
                    wn.Location = this.Location;
                    wn.Show();
                }

                //Update the lastVersion
                set.LastVersion = IOVariables.RemindMeVersion;
                BLLocalDatabase.Setting.UpdateSettings(set);
            }
            else
            {
                BLIO.Log("[VERSION CHECK] No new version! lastVersion: " + set.LastVersion + "  New version: " + IOVariables.RemindMeVersion);
            }
        }
Beispiel #2
0
        private void lblPreviousVersions_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string releaseNotesString = "";

            foreach (KeyValuePair <string, string> entry in UpdateInformation.ReleaseNotes)
            {
                releaseNotesString += "Version " + entry.Key + "\r\n" + entry.Value + "\r\n\r\n\r\n";
            }
            MaterialWhatsNew wn = new MaterialWhatsNew("2.4.15", releaseNotesString);

            MaterialForm1.Instance.SkinManager.AddFormToManage(wn);
            wn.Location = this.Location;
            wn.Show();
        }