void update_AvailableComplete(bool isAvailable, Update.UpdateInfo updateInfo, object state, Exception e)
        {
            if (Dispatcher.Thread != Thread.CurrentThread)
            {
                Dispatcher.BeginInvoke(new Update.AvailableComplete(update_AvailableComplete), new object[] { isAvailable, updateInfo, state, e });
                return;
            }

            ButtonUpdate.IsEnabled = true;

            if (isAvailable)
            {
                ButtonUpdate.Content        = "Install new version";
                isAboutToDownloadNewVersion = true;
                newVersionInfo = updateInfo;
            }
            else
            {
                ButtonUpdate.Content = "Check for updates";
            }
        }
        void update_AvailableComplete(bool isAvailable, Update.UpdateInfo updateInfo, object state, Exception e)
        {
            if (Dispatcher.Thread != Thread.CurrentThread)
            {
                Dispatcher.BeginInvoke(new Update.AvailableComplete(update_AvailableComplete), new object[] { isAvailable, updateInfo, state, e });
                return;
            }

            ButtonUpdate.IsEnabled = true;

            if (isAvailable)
            {
                ButtonUpdate.Content = "Install new version";
                isAboutToDownloadNewVersion = true;
                newVersionInfo = updateInfo;
            }
            else
            {
                ButtonUpdate.Content = "Check for updates";
            }
        }