Пример #1
0
 /// <summary>
 /// Logowanie błędów i komunikatów
 /// </summary>
 private void ShowErrors1(List <string> errors)
 {
     if (errors != null && errors.Count > 0)
     {
         CrossThreadingHelper.InvokeIfRequired(tbErrors1, () =>
         {
             foreach (var e in errors)
             {
                 tbErrors1.Text          += DateTime.Now.ToString() + "\t" + e;
                 tbErrors1.Text          += Environment.NewLine;
                 tbErrors1.SelectionStart = tbErrors1.Text.Length;
                 tbErrors1.ScrollToCaret();
             }
         });
     }
 }
Пример #2
0
 private void adProviderControl1_AdPrividerStarted(object sender, EventArgs e)
 {
     try
     {
         CrossThreadingHelper.InvokeIfRequired(nudAd1Freq, () =>
         {
             adProviderControl1.RequestFrequency = (int)nudAd1Freq.Value;
         });
         CrossThreadingHelper.InvokeIfRequired(nudAd1Freq, () =>
         {
             adProviderControl1.ID = (int)tbDevice.Value;
         });
     }
     catch (Exception ex)
     {
         adProviderControl1_ErrorsOccured(null, new List <string> {
             ex.Message
         });
     }
 }