3 using System.Windows.Forms;
11 public static string Icinga2InstallDir
15 RegistryKey rk = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Icinga Development Team\\ICINGA2");
20 return (string)rk.GetValue("");
24 public static void FatalError(Form owner, string message)
26 MessageBox.Show(owner, message, "Icinga 2 Setup Wizard", MessageBoxButtons.OK, MessageBoxIcon.Error);
31 /// The main entry point for the application.
36 Application.EnableVisualStyles();
37 Application.SetCompatibleTextRenderingDefault(false);
39 string installDir = Program.Icinga2InstallDir;
42 FatalError(null, "Icinga 2 does not seem to be installed properly.");
46 if (File.Exists(installDir + "\\etc\\icinga2\\features-enabled\\api.conf"))
47 form = new ServiceStatus();
49 form = new SetupWizard();
51 Application.Run(form);