public static SettingsDatabase Initialize(string filename) { if (instance != null) { instance.dbConn.GetConnection().Dispose(); } instance = new SettingsDatabase(filename); return(instance); }
public App() { InitializeComponent(); SettingsDB = SettingsDatabase.Initialize(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "SettingsSQLite.db3")); //MainPage = new MainPage(); MainPage = new NavigationPage(new MainPage()) { BarBackgroundColor = Color.Indigo, BarTextColor = Color.White }; }