Example #1
0
 public static void LoadFileSystem()
 {
     db = new FileManager();
     isOnline = false;
 }
Example #2
0
        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;
        }