private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { StopThread(); if (_api != null) { _api.Dispose(); _api = null; } if (_sim != null) { _sim.Dispose(); _sim = null; } }
private void StartServer_Click(object sender, RoutedEventArgs e) { _api = new RestApiServer(_sim); }