Exemple #1
0
 private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArgs args)
 {
     if (this.Visibility == Visibility.Visible)
     {
         GoogleLatency.Resume();
         ChatServerLatency.Resume();
         GameServerLatency.Resume();
         ApiServerLatency.Resume();
         Dispatcher.BeginInvoke(
             new Action(
                 () =>
         {
             LogBox.Document.Blocks.Clear();
             foreach (var l in LatestLogLines)
             {
                 LogBox.Document.Blocks.Add(new Paragraph(new Run(l)));
             }
             if (AutoScroll)
             {
                 LogBox.ScrollToEnd();
             }
         }));
     }
     else
     {
         GoogleLatency.Pause();
         ChatServerLatency.Pause();
         GameServerLatency.Pause();
         ApiServerLatency.Pause();
     }
 }
Exemple #2
0
 internal void logGameServerPing(int milliseconds)
 {
     if (GameServerLatency != null)
     {
         GameServerLatency.AddSample(milliseconds);
     }
 }