📄 ld_face.cpp
字号:
cout << "\n◆输入选项 d:";
cin >> _FL_XuanXiang[3];
cout << "\n◆输入选项 e:";
cin >> _FL_XuanXiang[4];
cout << "\n◆输入选项 f:";
cin >> _FL_XuanXiang[5];
cout << "\n◆输入选项 g:";
cin >> _FL_XuanXiang[6];
setFL_XuanXiang(_FL_XuanXiang,7);
break;
}
cout << "\n◆输入答案:";
cin >> _FL_DaAn;
setFL_DaAn(_FL_DaAn);
cout << "\n◆输入试题分数:";
cin >> _FL_FenShu;
setFL_FenShu(_FL_FenShu);
setFL_TiHao(_FL_TiHao);
setFL_TaoTi(_FL_TaoTi);
nScore += getFenShu();
if ((_FL_TiHao)%10 ==0 && nScore != 100)
{
LD_Ex_Add Tmp;
cout <<"\n◆已经够十题,总分数与100分不符。请修改以上十题的分数。\n\n(按任意键继续)";
nScore = 0;
getch();
system("cls");
return 'c';
}
else if ((_FL_TiHao)%10==0 && nScore == 100)
{
cout<<"\n◆已经够十题,组成第 "<<_FL_TaoTi<<" 套试题\n"<<endl;
nScore = 0;
}
cout << "\n\n\t\t\t1 添加试题\tESC 返回\n" << endl;
while(1)
{
chIn = getch();
if(chIn == '1' || chIn == 27)
{
return chIn;
system("cls");
}
}
}
return -1;
}
/***********************************************************************/
/* 试题浏览界面 */
/***********************************************************************/
char LD_Face::LD_FC_ExamLook(LD_File* _Head,LD_File* &_Last)
{
if(_Head == _Last||_Last->getTaoTi()==0)
{
system("cls");
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
cout<<"\t\t\t\t"<<"试题预览"<<'\t'<< endl;
cout<<""<<'\t'<<endl;
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
cout<<"\t\t\t尚无试题,无法浏览。"<<endl;
cout<<"\n(按任意键返回)";
getch();
return 27;
}
int FcIn = 0;
int FcTaoTi = 0;
int FcBack = 0;
LD_EX_Look FcOne;
LD_Face FcTmp;
while(1)
{
system("cls");
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
cout<<"\t\t\t\t"<<"试题预览"<<'\t'<< endl;
cout<<""<<'\t'<<endl;
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
cout<<"\t\t\t◆您好,现在共有 "<<_Last->getTaoTi()<<" 试卷可供浏览"<<endl;
cout<<"\n\t\t\t◆您要浏览第几套试卷:";
cin >> FcIn;
while (FcIn>_Last->getTaoTi()||FcIn<_Head->getTaoTi())
{
cout << "\n\t\t\t◆对不起,没有这套试卷。请您重新输入:";
cin >>FcIn;
}
FcTaoTi = FcIn;
while(1)
{
system("cls");
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
cout<<"\t\t\t\t"<<"试题预览"<<'\t'<< endl;
cout<<""<<'\t'<<endl;
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
cout<<"\t\t\t您现在浏览的是:第 "<<FcTaoTi<<" 套试题"<<endl;
cout<<"\n\t\t1 开始浏览\t\t2 跳至末页\n\n\t\tDel 删除该试卷\t\tESC 返回\n"<<endl;
FcIn = getch();
while(FcIn!='1'&&FcIn!='2'&&FcIn!=27&&FcIn!=224)
{
FcIn = getch();
}
switch(FcIn)
{
case '1':
FcBack = FcOne.LD_EX_LookTi(_Head,_Last,FcTaoTi,1);
if(FcBack ==2||FcBack ==3)
{
break;
}
else if (FcBack == 27)
{
return FcBack;
}
case '2':
while(1)
{
system("cls");
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
cout<<"\t\t\t\t"<<"试题预览"<<'\t'<< endl;
cout<<""<<'\t'<<endl;
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
cout<<"\t\t\t第 "<<FcTaoTi<<" 套试题浏览结束\n"<<endl;
cout<<"\t\t1 上一页\t2 首页\t\t3 继续浏览\n\n\t\tDel 删除该试卷\t\t\tESC 返回\n"<<endl;
FcIn = getch();
while(FcIn!='1'&&FcIn!='2'&&FcIn!='3'&&FcIn!=27&&FcIn!=224)
{
FcIn = getch();
}
switch(FcIn)
{
case '1':
FcBack = FcOne.LD_EX_LookTi(_Head,_Last,FcTaoTi,10);
if(FcBack==4)
{
continue;
}
break;
case '2':
FcBack = 2;
break;
case '3':
FcBack = 3;
break;
case 224:
FcIn = getch();
if(FcIn == 83)
{
while (_Head->getTaoTi() != FcTaoTi||_Head->getTiHao()!=1)//找到该套题的第一题
{
_Head = _Head->getNextP();
}
FcTmp.LD_FC_ExamDelete(_Head,_Last,2);//删除该套题
return 0;
}
break;
case 27:
return FcIn;
default:
continue;
}
if(FcBack == 2)
{
break;
}
else if(FcBack == 3)
{
break;
}
}
if(FcBack == 2)
{
break;
}
else if(FcBack == 3)
{
break;
}
case 27:
return FcIn;
case 224:
FcIn = getch();
if(FcIn == 83)
{
while (_Head->getTaoTi() != FcTaoTi||_Head->getTiHao()!=1)
{
_Head = _Head->getNextP();
}
FcTmp.LD_FC_ExamDelete(_Head,_Last,2);//删除该套题
return 0;
break;
}
default:
continue;
}
if(FcBack == 3)
{
break;
}
}
}
return FcIn;
}
/************************************************************************/
/* 试题修改界面 */
/************************************************************************/
void LD_Face::LD_FC_ExamChange(LD_File* _ChangeOne)
{
LD_EX_Change Tmp;
char ChIn;
system("cls");
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
cout<<"\t\t\t\t"<<"修改试题"<<'\t'<< endl;
cout<<""<<'\t'<<endl;
cout<<"☆□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□☆"<<'\t'<<'\n'<<endl;
while(1)
{
cout<<"\t1 题目\t2 选项\t3 答案\tESC 返回"<<endl;
ChIn = getch();
while(ChIn!='1'&&ChIn!='2'&&ChIn!='3'&&ChIn!=27)
{
ChIn = getch();
}
cout << ChIn << endl;
switch(ChIn)
{
case '1':
Tmp.LD_EX_CH_TiMu(_ChangeOne);
break;
case '2':
Tmp.LD_EX_CH_XuanAXiang(_ChangeOne);
break;
case '3':
Tmp.LD_EX_CH_DaAn(_ChangeOne);
break;
case 27:
return;
default:
break;
}
}
return;
}
/************************************************************************/
/* 删除界面
1.代表删除试题
2.代表删除套题 */
/************************************************************************/
void LD_Face::LD_FC_ExamDelete(LD_File *_noceSpace,LD_File *&_Last,int _judgeN)
{
system("cls");
if (_judgeN==1)
{
string topName="删除试题";
LD_FC_Local(topName);
cout<<"\t\t\t您确认要删除该试题吗?(Y/N)\n"<<endl;
cout<<"◆Y-YES 删除该试题(注意:该操作会导致此卷缺少一题,请确认随后立即补录一题)。。\n"<<endl;
cout<<"◆N-NO 取消删除操作,并返回浏览界面。\n"<<endl;
}else if(_judgeN==2)
{
string topName = "删除套题";
LD_FC_Local(topName);
cout<<"\t\t\t您确认要删除该套试卷吗?(Y/N)\n"<<endl;
cout<<"◆Y-YES 删除该试卷(注意:该操作会导致此卷永久删除)。\n"<<endl;
cout<<"◆N-NO 取消删除操作,并返回浏览界面。\n"<<endl;
}
char judgeWord=getch();
while(judgeWord !='y'&&judgeWord!='Y'&&judgeWord!='n'&&judgeWord!='N')
{
judgeWord = getch();
}
cout << judgeWord << endl;
if (judgeWord=='y'||judgeWord=='Y')
{
LD_EX_Delete *del=new LD_EX_Delete();
if (_judgeN==1)
{
del->LD_DEL_One(_noceSpace);
}else if(_judgeN==2)
{
del->LD_DEL_All(_noceSpace,_Last);
cout<<"\n◆删除成功!" << endl;
cout<<"\n◆(按任意键返回)";
getch();
}
//***********************88保存****************
LD_File* Ad_Save = _noceSpace;
LD_Control conTem;
while (Ad_Save->getPreviousP()!=NULL)
{
Ad_Save=Ad_Save->getNextP();
}
conTem.LD_CTR_SaveExam(Ad_Save,0);
//***********************88保存****************
}
}
/************************************************************************/
/* 试题补录界面 */
/************************************************************************/
int LD_Face::LD_FC_ExamDelAdd(LD_File *_noceSpace)
{
string topName="试题补录";
LD_FC_Local(topName);
string chTemp="";
string arrChTem[7]={""};
int nTemp=0;
while (1)
{
cout<<">>输入题干 :";
cin>>chTemp;
_noceSpace->setFL_TiGan(chTemp);
chTemp="\0";
for (int i=0;i<7;i++)
{
cout<<">>输入选项 "<<(char)(i+49);
cin>>chTemp;
if(chTemp.length()==0)
{
break;
}else
{
arrChTem[i]=chTemp;
chTemp="\0";
}
}
cout<<">>输入答案:";
cin>>chTemp;
_noceSpace->setFL_DaAn(chTemp);
cout<<"\t1 重新输入\tESC 返回浏览界面"<<endl;
char judCh='\0';
while (judCh!=27&&judCh!='1') //只有输入1或者ESC才回有反应
{
judCh=getch();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -