public void ChangeDBPath(String DBFilePath) { bool wasOpen = _DB.isOpen(); if (_DB.isOpen()) _DB.Close(); _DB = new SkypeDB(DBFilePath); if (wasOpen) _DB.Open(); }
public SkypeListener(String DBFilePath, String Username) { UpdateSkypeTimer = new Timer(1000); UpdateSkypeTimer.AutoReset = true; UpdateSkypeTimer.Elapsed += new ElapsedEventHandler(UpdateSkypeTimer_Elapsed); this.Username = Username; _DB = new SkypeDB(DBFilePath); }
public void ChangeDBPath(String DBFilePath) { bool wasOpen = _DB.isOpen(); if (_DB.isOpen()) { _DB.Close(); } _DB = new SkypeDB(DBFilePath); if (wasOpen) { _DB.Open(); } }
public SkypeDB(String DBFile) { try { _conn = new SQLiteConnection("Data Source=" + DBFile + ";Version=3;Read Only=True;"); if (Instance == null) { Instance = this; } } catch (SQLiteException sex) { Console.WriteLine(sex.Message); } }