Example #1
0
        /// <summary>
        /// Check for updates in updateBackgroundWorker
        /// </summary>
        private async void updateBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            InvisibleManCore invisibleManCore = new InvisibleManCore();
            string           result           = await invisibleManCore.CheckForUpdatesVPN();

            // Show update menu
            await Dispatcher.BeginInvoke(new Action(delegate
            {
                if (result == "NewUpdate")
                {
                    GridNewUpdate.Visibility = System.Windows.Visibility.Visible;
                }
            }));
        }
        /// <summary>
        /// Check for updates in updateBackgroundWorker
        /// </summary>
        private async void updateBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            // Show waiting
            await Dispatcher.BeginInvoke(new Action(delegate
            {
                ShowUpdateMenu("Waiting");
            }));

            InvisibleManCore invisibleManCore = new InvisibleManCore();
            string           result           = await invisibleManCore.CheckForUpdatesVPN();

            // Show update menu
            await Dispatcher.BeginInvoke(new Action(delegate
            {
                ShowUpdateMenu(result);
            }));
        }