private void btnSxGeoInfo_Click(object sender, EventArgs e) { SxGeoDB tmpSxDB = new SxGeoDB(SxPath); if (!tmpSxDB.OpenDB()) { lblMessage.ForeColor = Color.Red; lblMessage.Text = tmpSxDB.ErrorMessage; lblSxGeoStatus.Text = "Ошибка."; lblSxGeoStatus.ForeColor = Color.Brown; return; } frmInfo fInfo = new frmInfo(); fInfo.Header = tmpSxDB.GetHeader(); fInfo.DBPath = SxPath; fInfo.ShowDialog(); tmpSxDB.CloseDB(); }
public bool IsValidSxGeoFile() { if (!File.Exists(DatabasePath)) { ErrorMessage = "Файл данных SxGeo не найден."; return(false); } SxGeoDB tmpDB = new SxGeoDB(DatabasePath); tmpDB.DatabaseMode = SxGeoMode.FileMode; if (!tmpDB.OpenDB()) { ErrorMessage = tmpDB.ErrorMessage; return(false); } tmpDB.CloseDB(); return(true); }
public void Close() { db.CloseDB(); }