static void Main(string[] args) { try { AppDomain.CurrentDomain.ProcessExit += CurrentDomain_ProcessExit; CGCCSystem = new Boot(); CGCCSystem.Start(); } catch (Exception ex) { Console.Error.WriteLine(ex.Message); CGCCSystem.Exit(); Thread.Sleep(300); Process.Start(Process.GetCurrentProcess().ProcessName); } }