コード例 #1
0
ファイル: frmAppForm.cs プロジェクト: Ryuukenju/LemonWay
        /// <summary>
        /// Appel web service d'une manière Asynchronne
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void but_AsynCompute_Fibonancci_Click(object sender, EventArgs e)
        {
            try
            {
                log.Info("---------------------------------------");
                log.Info("- Execution Traitement Asynchronne... -");
                log.Info("---------------------------------------");
                BusyForm progressForm = new BusyForm(null);

                var progressFormTask = progressForm.ShowDialogAsync();
                await RunFibonancciAsync();

                progressForm.Close();
                await progressFormTask;
                log.Info("----------------------------------");
                log.Info("- Fin Traitement Asynchronne... -");
                log.Info("---------------------------------");
            }
            catch (Exception ex)
            {
                #region AddLogs
                log.Error("Exception méthode CreateSOAPWebRequest : ");
                log.Error("Technical Error : " + ex.Message);
                log.Error("Description : " + ex.InnerException);
                #endregion
            }
        }
コード例 #2
0
ファイル: frmAppForm.cs プロジェクト: Ryuukenju/LemonWay
 /// <summary>
 /// Appel web service d'une manière normal Synchronne
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void but_SynCompute_Fibonancci_Click(object sender, EventArgs e)
 {
     log.Info("--------------------------------------");
     log.Info("- Execution Traitement Synchronne... -");
     log.Info("--------------------------------------");
     try
     {
         using (BusyForm busy = new BusyForm(RunFibonancciSync))
         {
             busy.ShowDialog(this);
         }
         log.Info("---------------------------------");
         log.Info(" - Fin Traitement Synchronne... -");
         log.Info("---------------------------------");
     }
     catch (Exception ex)
     {
         #region AddLogs
         log.Error("Exception méthode but_SynCompute_Fibonancci_Click : ");
         log.Error("Technical Error : " + ex.Message);
         log.Error("Description : " + ex.InnerException);
         #endregion
     }
 }