Exemple #1
0
 private void LinkSendLogToDev_Click(object sender, EventArgs e)
 {
     try
     {
         string subject = InputBox.Input("Any comment? (optional)", settings.StyleColor);
         if (subject != null)
         {
             WaitingOverlay waitingOverlay = new WaitingOverlay(this, "Please wait...", settings.StyleColor).Show();
             Task.Factory.StartNew(() =>
             {
                 try
                 {
                     Log2.UploadLog(subject);
                 }
                 catch (Exception ex)
                 {
                     log.Error("Can't send log: " + ex.Message);
                     this.TaskDialog("Can't send log", ex.Message, NotifyUserType.Error);
                 }
                 finally
                 {
                     BeginInvoke(new Action(waitingOverlay.Close));
                 }
             });
         }
     }
     catch (Exception ex)
     {
         log.Info("Can't send log file: " + ex.Message);
         this.TaskDialog("Log file sending error", ex.Message, NotifyUserType.Error);
     }
 }
Exemple #2
0
 private static void SendLogToDeveloper()
 {
     if (Settings2.Instance.SendLogToDeveloperOnShutdown && log.HaveErrors && Utils.InternetAvailable && File.Exists(Globals.LogFileName))
     {
         try
         {
             Log2.UploadLog(null);
         }
         catch (Exception ex)
         {
             TaskDialog.Show("Log file sending error", ex.Message);
         }
     }
 }