2024-10-04 16:03:58 +08:00
|
|
|
|
#include <iostream>
|
2024-10-04 16:26:37 +08:00
|
|
|
|
#include<string>
|
|
|
|
|
#include<windows.h>
|
|
|
|
|
#include<cstdlib>
|
2024-10-04 16:03:58 +08:00
|
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
void handleUserInput() {
|
|
|
|
|
std::cout << "欢迎使用CSSO与CS起源切换程序" << std::endl;
|
|
|
|
|
std::cout << "1.CSSO 2.CS起源 3.exit" << std::endl;
|
|
|
|
|
int in;
|
|
|
|
|
std::cin >> in;
|
|
|
|
|
|
2024-10-04 16:26:37 +08:00
|
|
|
|
|
2024-10-04 16:03:58 +08:00
|
|
|
|
//CSSO为1,CS起源为2
|
|
|
|
|
if (in == 1) {
|
|
|
|
|
|
|
|
|
|
} else if (in == 2) {
|
|
|
|
|
ini.load("config.ini");
|
|
|
|
|
std::string name = ini.get("User", "name", "unknown");
|
|
|
|
|
std::string age = ini.get("User", "age", "0");
|
|
|
|
|
std::string fullscreen = ini.get("Settings", "fullscreen", "false");
|
|
|
|
|
|
|
|
|
|
std::cout << "Name: " << name << std::endl;
|
|
|
|
|
std::cout << "Age: " << age << std::endl;
|
|
|
|
|
std::cout << "Fullscreen: " << fullscreen << std::endl;
|
|
|
|
|
|
|
|
|
|
} else if (in == 3) {
|
|
|
|
|
std::cout << "退出中" << std::endl;
|
|
|
|
|
Sleep(1000); // 暂停 1 秒
|
|
|
|
|
exit(0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
handleUserInput();
|
|
|
|
|
return 0;
|
|
|
|
|
}
|