public BaseData() { _Connection = null; _DBPath = String.Empty; _ConnectionString = String.Empty; _fileHelpers = new FileHelpers(); }
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(); }
public BaseData(String DBPath) { _Connection = null; _DBPath = DBPath; _ConnectionString = String.Format("Data Source={0};Version=3;", DBPath); _fileHelpers = new FileHelpers(); //Connection _Connection = new SQLiteConnection(_ConnectionString); _Connection.Open(); }
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; }