public static void DestroyApplication (IntPtr plugin) { if (Application.Current != null) Application.Current.Terminate (); } }