private void ThisAddIn_Shutdown(object sender, EventArgs e) { Properties.Settings.Default.LookupPaneVisible = taskPaneVisible; Properties.Settings.Default.InstantLookupEnabled = instantLookupEnabled; Properties.Settings.Default.LookupPaneWidth = paneWidth; Properties.Settings.Default.Save(); db.CloseDatabase(); }
private void LoadDatabase(string fileName) { updateDatabase = false; if (db != null) { db.CloseDatabase(); } if (fileName == null) { db = LemmaDatabase.CreateDefaultInstance(); } else { db = new LemmaDatabase(fileName); } db.OpenChangeSet(); nounRepo = new NounRepository(db); prepRepo = new PrepositionRepository(db); RefreshGridView(); updateDatabase = true; }