private void SkippedMessage(int obj)
 {
     Application.Current.Dispatcher.Invoke(() =>
     {
         if (!SkippedCountByDelay.ContainsKey(obj))
         {
             SkippedCountByDelay.Add(obj, new MissedMessageViewModel());
         }
         SkippedCountByDelay[obj].MissedCount++;
     });
 }
 private void SentMessage(int obj)
 {
     SentMessages++;
     Application.Current.Dispatcher.Invoke(() =>
     {
         if (!SkippedCountByDelay.ContainsKey(obj))
         {
             SkippedCountByDelay.Add(obj, new MissedMessageViewModel());
         }
         SkippedCountByDelay[obj].ReceivedCount++;
         if (AutoIncrement && (SentMessages % IncrementMessagesCount == 0))
         {
             Delay += 1;
         }
     });
 }