Example #1
0
 public AppManager()
 {
     _SettingsDB = new SettingsManager("settings.dbm");
     _translator = new TranslationsHelpers(_SettingsDB.LoadMessagesTranslations(), _SettingsDB.LoadComponentsTranslations());
     _AppSettings = _SettingsDB.LoadSettings();
     _recentDBs = _SettingsDB.LoadRecentDatabases();
     _DB = new Database();
     _DosBoxHelper = new DOSBoxHelpers();
     _fileHelper = new FileHelpers();
 }
Example #2
0
        public void Dispose()
        {
            _recentDBs = null;
            _translator = null;
            _AppSettings = null;
            _DosBoxHelper = null;
            _fileHelper = null;

            if(_DB != null && _DB.ConnectionStatus == System.Data.ConnectionState.Open)
                _DB.Disconnect();
            _DB = null;

            if (_SettingsDB != null && _SettingsDB.ConnectionStatus == System.Data.ConnectionState.Open)
                _SettingsDB.Disconnect();
            _SettingsDB = null;
        }