示例#1
0
        /// <summary>
        /// Returns flag that indicates existing new version
        /// </summary>
        /// <returns></returns>
        public bool HaveNewVersion()
        {
            var currentVersion = Version.Parse(_controller.GetLocalVersion().Version);

            try
            {
                var serverVersion = RequestLastVersion();

                if (serverVersion > currentVersion)
                {
                    _controller.SetLocalVersionObsoluted(serverVersion);
                    return(true);
                }
            }
            catch (Exception e)
            {
                //TODO: Connection troubles
            }

            return(false);
        }