/// <summary>Close the resources used by this library</summary> public static void Close() { if (isInitialized) { Stubbs.Close(); #if NO_HALO4 Halo4.Close(); #endif #if NO_HALO_REACH HaloReach.Close(); #endif #if NO_HALO_ODST HaloOdst.Close(); #endif #if NO_HALO3 Halo3.Close(); #endif #if !NO_HALO2 Halo2.Close(); #endif Halo1.Close(); Debug.Exceptions.Dispose(); Debug.Trace.Close(); Debug.LogFile.CloseLog(); isInitialized = false; } }
public static void Initialize() { if (!isInitialized) { //if(System.Diagnostics.Debugger.IsAttached) /*{ // HACK: to make the LoaderLock message appear as soon as possible. * // This is only needed during VS debugging. Won't get it during non-debug runtime. * // SlimDX doesn't have these issues. * var t = typeof(Microsoft.DirectX.UnsafeNativeMethods); * t = typeof(Microsoft.DirectX.Direct3D.Device); * t = null; * }*/ Debug.Exceptions.Initialize(); System.Windows.Forms.Application.ApplicationExit += new EventHandler(Application_ApplicationExit); Halo1.Initialize(); #if !NO_HALO2 Halo2.Initialize(); #endif #if NO_HALO3 Halo3.Initialize(); #endif #if NO_HALO_ODST HaloOdst.Initialize(); #endif #if NO_HALO_REACH HaloReach.Initialize(); #endif #if NO_HALO4 Halo4.Initialize(); #endif Stubbs.Initialize(); TagInterface.DefinitionStatePool.PostProcess(); isInitialized = true; } }