public VpnForm() { InitializeComponent(); L2tpKeyLabel.Hide(); L2tpKeyTxtBox.Hide(); vpnDao = DAOFactory.Instance.GetVpnDAO(); LoadDataview(); }
private DAOFactory() { string DataBasePath = string.Empty; #if DEBUG DataBasePath = FileUtils.GetAppDataFolder() + Path.DirectorySeparatorChar + Constants.DEBUG_DB_FILE; #else DataBasePath = FileUtils.GetAppDataFolder() + Path.DirectorySeparatorChar + Constants.DB_FILE; #endif //File.Delete(DataBasePath); if (!File.Exists(DataBasePath)) { SQLiteConnection.CreateFile(DataBasePath); SQLiteDBHelper.EncryptDatabase(DataBasePath, Constants.DB_PASSWORD); } dbHelper = new SQLiteDBHelper(DataBasePath, Constants.DB_PASSWORD); keywordDAO = new KeywordDAO(dbHelper); vpnDAO = new VpnDAO(dbHelper); inquiryDAO = new InquiryDAO(dbHelper); profileDAO = new ProfileDAO(dbHelper); }