没有合适的资源?快使用搜索试试~ 我知道了~
管理系统的源码.docx
需积分: 5 0 下载量 122 浏览量
2023-11-25
11:16:44
上传
评论
收藏 221KB DOCX 举报
温馨提示
试读
23页
*注册主要逻辑*/ QString id = ui->line_id->text(); QString password = ui->line_password->text(); QString password2 = ui->line_password2->text(); if (id == nullptr) { QMessageBox::warning(this, " ", "您的用户名为空!"); } else if (id.length() < 6) { QMessageBox::warning(this, " ", "您的用户名小于六位!"); } else if (password == nullptr) { QMessageBox::warning(this, " ", "您的密码为空!"); } else if (password.length() < 6) { QMessageBox::warning(this, " ", "您的密码小于六位!")
资源推荐
资源详情
资源评论
系统的数据结构为单链表(和数据结构书上写的差不多)
所有页面都是基于可视化工具实现(第一个也是我最后一个使用可视化
工具实现的项目)
ps:我的开发平台是 mac,所以 windows 的运行情况不太清楚(应该
没什么大问题)
01:22
注册窗口,功能见下图
/*
注册主要逻辑
*/
QString id = ui->line_id->text();
QString password = ui->line_password->text();
QString password2 = ui->line_password2->text();
if (id == nullptr) {
QMessageBox::warning(this, " ", "您的用户名为空!");
} else if (id.length() < 6) {
QMessageBox::warning(this, " ", "您的用户名小于六位!");
} else if (password == nullptr) {
QMessageBox::warning(this, " ", "您的密码为空!");
} else if (password.length() < 6) {
QMessageBox::warning(this, " ", "您的密码小于六位!");
} else if (password != password2) {
QMessageBox::warning(this, " ", "两次密码不一致!");
} else {
LinkList *P = R;
while (P->next != nullptr) {
if (P->next->Id == id) {
QMessageBox::warning(this, " ", "存在当前用户名");
return;
}
P = P->next;
}
if (!ui->Btn_Student->isChecked()
&& !ui->Btn_Teacher->isChecked()) {
QMessageBox::warning(this, " ", "请选择您的用户类型");
} else if (ui->Btn_Student->isChecked()) {
LinkList *L = new LinkList;
L->Id = id;
L->Password = password;
L->IsTeacher = false;
L->next = R->next;
R->next = L;
if (QMessageBox::Ok ==
QMessageBox::information(this, " ", "学生用户注册成
功", QMessageBox::Ok | QMessageBox::Cancel)) {
Register::close();
} else {
Register::close();
}
} else if (ui->Btn_Teacher->isChecked()) {
LinkList *L = new LinkList;
L->Id = id;
剩余22页未读,继续阅读
资源评论
cqtianxingkeji
- 粉丝: 2351
- 资源: 1397
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功