2015-05-12 13:49:52 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using System.ServiceProcess;
|
2016-04-13 13:43:38 +02:00
|
|
|
|
using System.Diagnostics;
|
2015-05-12 13:49:52 +02:00
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
}
|
2016-04-13 13:43:38 +02:00
|
|
|
|
|
2016-04-19 16:09:27 +02:00
|
|
|
|
private void btnOpenConfigDir_Click(object sender, EventArgs e) {
|
|
|
|
|
Process.Start("explorer.exe", Program.Icinga2DataDir);
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-05-12 13:49:52 +02:00
|
|
|
|
}
|