Exemplo n.º 1
0
        /// <summary>Fills the release notes.</summary>
        internal void FillReleaseNotes()
        {
            ReleaseNotes.Clear();

            var releaseNotesXmlContent = Resources.ReleaseNotes;
            var xmlDocument            = new XmlDocument();

            xmlDocument.LoadXml(releaseNotesXmlContent);

            foreach (XmlElement noteNode in xmlDocument.DocumentElement.GetElementsByTagName("Note"))
            {
                var note = new ReleaseNote {
                    Version = noteNode.GetAttribute("Version"), Description = CleanWhiteSpace(noteNode.FirstChild.InnerText)
                };
                ReleaseNotes.Add(note);
            }
        }
        public async Task <bool> CheckForUpdatesAsync()
        {
            System.Diagnostics.Debug.WriteLine("Checking for updates");
            try
            {
                ReleaseNotes.Clear();
                BetaNotes.Clear();
                await Task.Run(Beta_GetJSON);

                await Task.Run(Release_GetJSON);

                CompareUpdate();
                return(true);
            }
            catch (Exception err)
            {
                System.Diagnostics.Debug.WriteLine("Check for updates failed\nError:" + err.Message);
                return(false);
            }
        }