예제 #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();
 }
예제 #2
0
 public BehavioursPanel(TranslationsHelpers Translator, Settings AppSettings, SettingsManager SettingsDB, string PanelName)
     : base(Translator, AppSettings, PanelName)
 {
     _flgInitiation = true;
     InitializeComponent();
     _helpers = new SettingsHelpers();
     _dialogsHelpers = new DialogsHelpers();
     _SettingsDB = SettingsDB;
     CompileUI(_AppSettings);
     _flgInitiation = false;
 }
예제 #3
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;
        }