mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Note for others: DO NOT manually fix whitespaces with sed and variants. Ensure that tabs (4 spaces, keep tabs) are set inside Visual Studio.
38 lines
748 B
C#
38 lines
748 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
using System.ServiceProcess;
|
|
using System.Diagnostics;
|
|
|
|
namespace Icinga
|
|
{
|
|
public partial class ServiceStatus : Form
|
|
{
|
|
public ServiceStatus()
|
|
{
|
|
InitializeComponent();
|
|
|
|
try {
|
|
ServiceController sc = new ServiceController("icinga2");
|
|
|
|
txtStatus.Text = sc.Status.ToString();
|
|
} catch (InvalidOperationException) {
|
|
txtStatus.Text = "Not Available";
|
|
}
|
|
}
|
|
|
|
private void btnReconfigure_Click(object sender, EventArgs e)
|
|
{
|
|
new SetupWizard().ShowDialog(this);
|
|
}
|
|
|
|
private void btnOK_Click(object sender, EventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
|
|
private void btnOpenConfigDir_Click(object sender, EventArgs e) {
|
|
Process.Start("explorer.exe", Program.Icinga2DataDir);
|
|
}
|
|
}
|
|
}
|