public static void LoadFileSystem() { db = new FileManager(); isOnline = false; }
public static bool LoadDatabase() { if (db == null || !isOnline) { LoadingDatabase loadingScreen = new LoadingDatabase(); try { //throw new Exception(); db = new DBManager(loadingScreen); loadingScreen.Close(); isOnline = true; } catch (Exception e) { loadingScreen.Close(); db = new FileManager(); isOnline = false; MessageBox.Show("Could not connect to database\n\n" + e.Message + "\n\n" + "Offline mode set", "Error"); } } return isOnline; }