Example #1
0
        private void CheckForUpdate()
        {
            Thread.Sleep(10);
            Tuple <Version, DateTime, string> result = null;

#if WINDOWS || MONOMAC
            // Tries to check for updates 10 times; stops if any attempt succeeds
            for (int i = 0; i < 1 && result == null; i++)
            {
                result = UpdateChecker.check_for_update();
                if (result == null)
                {
                    Thread.Sleep(10);
                }
            }
#if DEBUG
            Debug.Assert(result != null, "Update check failed after 1 attempt(s).");
#endif
#endif
            Global.update_found(result);
        }