-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.cpp
70 lines (68 loc) · 1.68 KB
/
main.cpp
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//必须在编译选项增加-std=c++11
#include <iostream>
#include <fstream>
#include <conio.h>
#include <stdlib.h>
#include <time.h>
#include "command.h"
using namespace std;
void print_main()
{
cout<<"#############################################"<<endl;
cout<<"# 欢迎使用抽号系统 v2.1.0 #"<<endl;
cout<<"# 请按[1]直接抽号 #"<<endl;
cout<<"# 按[2]加载名单 #"<<endl;
cout<<"# 按[3]新建名单 #"<<endl;
cout<<"# 按[4]查看版本信息 #"<<endl;
cout<<"# 按[5]打开工具栏 #"<<endl;
cout<<"# 按[6]检查更新 #"<<endl;
cout<<"# 按[7]退出 #"<<endl;
cout<<"#############################################"<<endl;
return;
}
int main()
{
//Read config
std::ifstream rcon ("basic.config", std::ifstream::binary);
bool ifcomm;
rcon>>ifcomm;
rcon.close();//fixed:记得close(wenge)
//Use command line mod
if(ifcomm == true)
{
system("comlm.exe");
}
else//Use graphical interface
{
char input;
int n;
bool ifread=false;
while(1)
{
print_main();
input=getch();
if(input=='1')
randm();
else if(input=='2')
{
cout<<"输入文件名:";
ifread=true;
if(listr()==1)
ifread=false;
}
else if(input=='3')
listc(ifcomm);
else if(input=='4')
info();
else if(input=='5')
{
system("tool.exe") ;
}
else if(input=='6')
return 0;
system("pause");
system("cls");
}
}
return 0;
}