public void closeStats()
 {
     if (stats == null)
     {
         return;
     }
     stats.Close();
     stats = null;
 }
 private void closeButton_Click(object sender, EventArgs e)
 {
     if (stats != null)
     {
         stats.Close(); stats = null;
     }
     if (mapper != null)
     {
         mapper.stop(); mapper = null;
     }
     parent.removeMap(this);
 }
 private void statsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (stats == null)
     {
         stats = new MappingStats(this);
         stats.Show(this);
     }
     else
     {
         stats.Focus();
     }
 }
 public void Stop()
 {
     routingStatusLabel.Text = Properties.Resources.Stopped;
     appButton.Enabled       = false;
     if (mapper != null)
     {
         mapper.onStateMsgChanged -= Mapper_onStateMsgChanged; mapper.stop(); mapper = null;
     }
     if (stats != null)
     {
         stats.Close(); stats = null;
     }
 }