⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.c

📁 在linux平台下模拟超市的收银系统即POS机
💻 C
字号:
	while(1)
	{
account_input:
		while(1)
		{
			ch=GetString(account_input_box,0,0,id,14);
			switch(ch)
			{
				case KEY_DOWN:
				case '\n':
					goto passwork_input;
					break;
			}			
		}

		
		while(1)
		{
passwork_input:
			ch=GetString(account_input_box,0,0,id,14);
			switch(ch)
			{
				case KEY_UP:
					goto account_input;
					break;
				case KEY_DOWN:
				case '\n'://转到ok_button下面
					goto ok_button;
					break;
			}
		
		}
		while(1)
		{
			
ok_button:	
			ch=GetChar(ok_button,0,0)
			switch(tempchar)
			{
				case KEY_UP://转上面
					goto passwork_input;
					break;
				case KEY_RIGHT:
				case KEY_DOWN:
					goto exit_button;
					break;
				case '\n':
					DestroyWindow(login_win_top);
					DestroyWindow(login_win_shadow);
					DestroyWindow(login_win_mid);
					DestroyWindow(account_input_box);
					DestroyWindow(password_input_box);
					DestroyWindow(ok_button);
					DestroyWindow(ok_button_shadow);
					DestroyWindow(exit_button);
					DestroyWindow(exit_button_shadow);
					DestroyWindow(login_win_bottom);
					//清除一下stdscr这个标准虚窗口									
					wclear(stdscr);
					return 0;		
			}
		
		}
		while(1)
		{			
exit_button:
			ch=GetChar(exit_button);
			switch(ch)
			{
				case KEY_UP:
				case KEY_LEFT://转上面
					goto ok_button;
					break;
				case '\n':
					return 1;//返回1为退出	
			}		
		}		
	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -