func:添加选择文件功能并自动记录

This commit is contained in:
2024-05-17 22:46:33 +08:00
parent 0ca591c238
commit f9fd64d90f
34 changed files with 1220 additions and 127 deletions

View File

@@ -16,10 +16,18 @@ bool ConfigIni::set_work_exe(const std::string& dir)
if (!parse_ini()) {
return false;
}
return true;
}
void ConfigIni::set_xml_path(const std::string& path)
{
if (ini_.IsEmpty()) {
return ;
}
ini_.SetValue("Basic", "xml_path", path.c_str());
ini_.SaveFile(ini_path_.c_str());
}
OprBase ConfigIni::get_config()
{
return opr_base_;

View File

@@ -20,6 +20,7 @@ public:
public:
bool set_work_exe(const std::string& dir);
void set_xml_path(const std::string& path);
OprBase get_config();
private:
@@ -31,4 +32,4 @@ private:
OprBase opr_base_{};
};
#endif
#endif

View File

@@ -4,7 +4,6 @@
#include <string>
#include <tinyxml2.h>
#include <vector>
#include <map>
#include "../public_def.h"
struct SKeyValue {
@@ -43,4 +42,4 @@ private:
std::vector<std::string> keys_{};
};
#endif
#endif