Beispiel #1
0
        private bool PerformSync(Dictionary <string, object> parameters)
        {
            // rework for sync.
            CheckForUpdatesWindow checkingForUpdatesWindow = new CheckForUpdatesWindow();

            checkingForUpdatesWindow.Show();
            Task.Factory.StartNew(() =>
            {
                try
                {
                    bool updateAvailable = updater.CheckForUpdatesAndNotify();

                    Current.Dispatcher.BeginInvoke((Action)(() =>
                    {
                        checkingForUpdatesWindow.Close();

                        if (!updateAvailable)
                        {
                            NoUpdateAvailable();
                        }
                    }));
                }
                catch (Exception e)
                {
                    logger.Error(e.Message);
                }
            });
            return(true);
        }