protected override void OnStart(string[] args) { try { ProtokollerConfiguration.Load(); myInstance = new ProtokollerInstance(ProtokollerConfiguration.ActualConfigInstance); myInstance.Start(true); } catch (Exception ex) { Logging.LogText("Exception occured! ",ex, Logging.LogLevel.Error); } }
protected override void OnStart(string[] args) { try { TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; ProtokollerConfiguration.Load(); myInstance = new ProtokollerInstance(ProtokollerConfiguration.ActualConfigInstance); myInstance.Start(true); } catch (Exception ex) { Logging.LogText("Exception occured! ",ex, Logging.LogLevel.Error); } }
private void cmdTestService_Click(object sender, RoutedEventArgs e) { lblError.Text = ""; if (testinstance != null) testinstance.Dispose(); string err = ProtokollerConfiguration.ActualConfigInstance.CheckConfiguration(false); if (err != null) { lblError.Text = err; return; } try { testinstance = new ProtokollerInstance(ProtokollerConfiguration.ActualConfigInstance); testinstance.ThreadExceptionOccured += new ThreadExceptionEventHandler(testinstance_ThreadExceptionOccured); testinstance.Start(false); cmdTestService.Background = Brushes.LightGreen; cmdTest.IsEnabled = false; cmdTestTriggers.IsEnabled = false; cmdTestWithStorrage.IsEnabled = false; cmbTriggerConnection.IsEnabled = false; } catch (Exception ex) { lblError.Text = ex.Message; } }