2 using System.Collections.Generic;
3 using System.ComponentModel;
7 using System.Windows.Forms;
8 using System.ServiceProcess;
9 using System.Diagnostics;
13 public partial class ServiceStatus : Form
15 public ServiceStatus()
17 InitializeComponent();
20 ServiceController sc = new ServiceController("icinga2");
22 txtStatus.Text = sc.Status.ToString();
23 } catch (InvalidOperationException) {
24 txtStatus.Text = "Not Available";
28 private void btnReconfigure_Click(object sender, EventArgs e)
30 new SetupWizard().ShowDialog(this);
33 private void btnOK_Click(object sender, EventArgs e)
38 private void btnOpenConfigDir_Click(object sender, EventArgs e) {
39 Process.Start("explorer.exe", Program.Icinga2DataDir);