aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/BaseManageTab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base_tab/BaseManageTab.cpp')
-rw-r--r--src/base_tab/BaseManageTab.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/base_tab/BaseManageTab.cpp b/src/base_tab/BaseManageTab.cpp
index db42b8b..f4e6649 100644
--- a/src/base_tab/BaseManageTab.cpp
+++ b/src/base_tab/BaseManageTab.cpp
@@ -1,9 +1,25 @@
#include "BaseManageTab.hpp"
+#define ADD_INFO(text) {informations->WriteText(text);informations->WriteText("\n");}
-BaseManageTab::BaseManageTab(wxFrame *parent):
-TabBase_TabManage(parent)
+
+BaseManageTab::BaseManageTab(wxFrame *parent, std::shared_ptr<GameBase> db, std::shared_ptr<GameListManager> 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<GameBase> db) {
+ this->base=db;
+ RefreshInformations();
+}