IsUpdateAvailable() public static method

Downloads the data from an online text file Compares text file data to product version to see if there's an update available
public static IsUpdateAvailable ( ) : bool
return bool
Example #1
0
        /// <summary>
        /// Class constructor
        /// </summary>
        /// <param name="settings"></param>
        public Session(Config.Settings settings)
        {
            mSettings = settings;

            if (settings.CheckForUpdates && Update.IsUpdateAvailable())
            {
                Console.WriteLine("There's an update available. Check out https://github.com/Ezzpify/HourBoostr/releases/latest");
            }

            mBwg.DoWork += MBwg_DoWork;
            mBwg.RunWorkerAsync();
        }
Example #2
0
        /// <summary>
        /// Class constructor
        /// </summary>
        /// <param name="settings"></param>
        public Session(Config.Settings settings)
        {
            mSettings = settings;

            if (settings.CheckForUpdates && Update.IsUpdateAvailable())
            {
                var diagResult = MessageBox.Show("There seems to be an update available.\nCheck it out?", "Update", MessageBoxButtons.YesNo);
                if (diagResult == DialogResult.Yes)
                {
                    Process.Start("https://github.com/Ezzpify/HourBoostr/releases/latest");
                }
            }

            mBwg.DoWork += MBwg_DoWork;
            mBwg.RunWorkerAsync();
        }