private static void DeleteHideableAndClose(Window window) { window.DeleteHideable(); window.Close(); }