void timer_Tick(object sender, EventArgs e)
        {
            DispatcherTimer timer = sender as DispatcherTimer;

            if (!((UpdateServer.ServerThread != null) &&
                  UpdateServer.ServerThread.IsAlive))
            {
                timer.Stop();
                UpdateServer.Start();
            }
        }
 void UpdateServer_Stopped(object sender, EventArgs e)
 {
     UpdateServer.Stopped -= UpdateServer_Stopped;
     UpdateServer.Start();
 }
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     UpdateServer.Started += new EventHandler(UpdateServer_Started);
     UpdateServer.Start();
 }
 private void buttonStart_Click(object sender, RoutedEventArgs e)
 {
     UpdateServer.Start();
 }