public Control() { ControlOpen = false; System.AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); System.Environment.CurrentDirectory = AppDomain.CurrentDomain.BaseDirectory; bool isSandbox = STEM.Sys.IO.Path.GetFileName(STEM.Sys.IO.Path.GetDirectoryName(System.Environment.CurrentDirectory)).Equals("Sandboxes", StringComparison.InvariantCultureIgnoreCase); if (!isSandbox) { CloseChildren(); } STEM.Sys.Serialization.VersionManager.Initialize(new List <string>(), true, !isSandbox); ThreadPool.BeginAsync(new System.Threading.ThreadStart(CheckInstall), TimeSpan.FromSeconds(3)); }