The main entry point for the application.
()
| 84 | /// The main entry point for the application. |
| 85 | /// </summary> |
| 86 | [STAThread] |
| 87 | static void Main() |
| 88 | { |
| 89 | Application.EnableVisualStyles(); |
| 90 | Application.SetCompatibleTextRenderingDefault(false); |
| 91 | |
| 92 | string installDir = Program.Icinga2InstallDir; |
| 93 | |
| 94 | if (installDir == "") { |
| 95 | FatalError(null, "Icinga 2 does not seem to be installed properly."); |
| 96 | return; |
| 97 | } |
| 98 | |
| 99 | Form form; |
| 100 | |
| 101 | if (File.Exists(Program.Icinga2DataDir + "\\etc\\icinga2\\features-enabled\\api.conf")) |
| 102 | form = new ServiceStatus(); |
| 103 | else |
| 104 | form = new SetupWizard(); |
| 105 | |
| 106 | Application.Run(form); |
| 107 | } |
| 108 | } |
| 109 | } |