#include "BaseManageTab.hpp" #define ADD_INFO(text) {informations->WriteText(text);informations->WriteText("\n");} BaseManageTab::BaseManageTab(wxFrame *parent, std::shared_ptr db, std::shared_ptr glm): TabBase_TabManage(parent), glm(glm), base(db) { RefreshInformations(); } void BaseManageTab::RefreshInformations(){ informations->Clear(); wxFileName base_path(base->GetFilePath()); ADD_INFO("Database Path: "+base_path.GetFullPath()); ADD_INFO("File Size: "+base_path.GetHumanReadableSize()); ADD_INFO("Last Modified: "+base_path.GetModificationTime().Format()); ADD_INFO("Database Format: "+base->GetFormat()); ADD_INFO("Total Number of Games: "+std::to_string(glm->rows.size())); } void BaseManageTab::Reset(std::shared_ptr db) { this->base=db; RefreshInformations(); }