blob: f4e66490f0536bad1c7e897de84ae3011440f40b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "BaseManageTab.hpp"
#define ADD_INFO(text) {informations->WriteText(text);informations->WriteText("\n");}
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();
}
|