Ejemplo n.º 1
0
 public App()
 {
     try
     {
         Main BCA = new hub_client.Main();
     }
     catch (Exception ex)
     {
         logger.Error(ex.ToString());
         FormExecution.Client_PopMessageBox("Une erreur s'est produite." + ex.ToString(), "Problème");
         Application.Current.Dispatcher.Invoke(Application.Current.Shutdown);
     }
 }
Ejemplo n.º 2
0
        private static void UpdateCardsStuff(string[] updatefilelines)
        {
            _windowload = new UpdateCardsStuffWindow(false);
            _windowload.Show();
            Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => _windowload.Activate()));
            FormExecution.Client_PopMessageBox("Un mise à jour mineure est disponible !", "Mise à jour");

            List <string> updatesToDo = new List <string>();

            int i = 0;

            while (updatefilelines[i] != FormExecution.ClientConfig.CardsStuffVersion.ToString() && i < updatefilelines.Length - 1)
            {
                updatesToDo.Add(updatefilelines[i]);
                i++;
            }

            CardsUpdateDownloader.LoadingProgress += CardsUpdateDownloader_LoadingProgress;
            CardsUpdateDownloader.UpdateCompleted += CardsUpdateDownloader_UpdateCompleted;
            Task.Run(() => CardsUpdateDownloader.DownloadUpdates(updatesToDo.ToArray()));
        }