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

📄 cmux_old.cpp

📁 辽阳本地网传输监测系统 Ver1.0
💻 CPP
📖 第 1 页 / 共 5 页
字号:
/* ┌───────────────────────┐
** │   AMC  V 3.0  多级弹出菜单自动生成工具    │
** └───────────────────────┘
** 变量和使用说明:
**    wflag  菜单重写状态, 为 0 则重写, 为 1 则不重写
*/

#include <conio.h>
#include <graphics.h>
#include <stdlib.h>
#include "tcutil.h"
#define Maxx 639
#define Maxy 479
#define OUT 255

MENUSTRU menu00  = {0, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0x71, 0x74, 4, 0, 80, 0};
MENUSTRU menu11  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 5, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu21  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu22  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu23  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu24  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu25  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu26  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu27  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu28  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu29  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu2a  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu2b  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu2c  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu2d  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu2e  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0x71, 0x24, 0,14, 80, 0};
MENUSTRU menu12  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0x71, 0x24, 0, 2, 80, 0};
MENUSTRU menu13  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0x71, 0x24, 0, 6, 80, 0};
MENUSTRU menu14  = {1, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0x71, 0x24, 0, 1, 80, 0};

void	SZX_cmux_init();
void	SZX_cmux_init()
{
}

main()
{
  setmode(0);     /*   设显视方式  */
  cursor(0);      /*   隐藏光标    */
  fpoly(0,0,Maxx,Maxy-47,9,0x7f);


  sub_menu_00();  /*    主菜单      */

  cursor(1);      /*    显示光标    */
  closegraph();
  return 0;
}

/*=======================================*/
int sub_menu_00()
{
  char *pp[4] =
       {
	  "端 口 选 择       ",
	  "监 控 系 统       ",
	  "系 统 设 定       ",
	  "初 始 配 置       "
       };
  char *pps[4] =
       {
	  " Select:→ ← ↑ ↓ Enter Esc                                           选择站点",
	  " Select:→ ← ↑ ↓ Enter Esc                                           设备操作",
	  " Select:→ ← ↑ ↓ Enter Esc                                   控制系统硬件设定",
	  " Select:→ ← ↑ ↓ Enter Esc                                     端口网络表设定"
//Right→
//Left←
//Up↑
//Down↓
//	  "选择站点:西关、曙光、北门、东四、青年街、宏伟、光华、东京陵、弓长岭、首山、灯塔",
//	  "设备操作",
//	  "控制系统硬件设定",
//	  "端口网络表设定"
       };
  int c = 0,wflag = 0;
  int x[4] = {  1, 20, 39, 58 };
  int y[4] = {  1,  1,  1,  1 };

  WINDOWSTRU winp  = {  1,  1, 80,  3, 0x7f,  6,  0,  1, NULL };
  WINDOWSTRU winps = {  1, 24, 80, 25, 0x74,  1,  0,  0, NULL };
  menu00.win = &winp;  menu00.winp = &winps;  menu00.pp = pp;
  menu00.x = x;        menu00.y = y;  menu00.pps = pps;
  save_win(&winp);  save_win(&winps);
  for(;;)
  {   if(c == OUT)
      {	fpoly(0,0,Maxx,Maxy-47,9,0x7f);
	wflag = 0;
	menu00.status = 0;
      }
      window(40,19,80,19);
      printf("辽阳本地网传输监测系统 Ver1.0");
      window(50,21,80,21);
      printf("辽阳市电信局 P.C.M.");

      c = menu_run(&menu00,c,wflag);
      wflag = 1;
      if(c == Esc && menu00.status == 0){
	rest_win(&winp);  rest_win(&winps);
	return c;
      }
      switch(menu00.ch){
	  case  0  :  /*端 口 选 择       */
		      c = sub_menu_11();
		      break;
	  case  1  :  /*监 控 系 统       */
		      c = sub_menu_12();
		      break;
	  case  2  :  /*系 统 设 定       */
		      c = sub_menu_13();
		      break;
	  case  3  :  /*初 始 配 置       */
		      c = sub_menu_14();
		      break;
	}
      if(c == Esc)  menu00.status = 0;
  }
}

/*=======================================*/
int sub_menu_11()
{
  char *pp[14] =
       {
	  " 1) 西关局",
	  " 2) 曙光局",
	  " 3) 北门局",
	  " 4) 东四局",
	  " 5) 青年街",
	  " 6) 宏伟区",
	  " 7) 光华局",
	  " 8) 东京陵",
	  " 9) 弓长岭",
	  "10) 首山县",
	  "11) 灯塔县",
	  "12) 辽化厂",
	  "13) 长途局",
	  "14) 移动局",
       };
  char *pps[14] =
       {
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  西关局  (SELECT LOCAL STATION:212)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  曙光局  (SELECT LOCAL STATION:412)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  北门局  (SELECT LOCAL STATION:313)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  东四局  (SELECT LOCAL STATION:314)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  青年街  (SELECT LOCAL STATION:230)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  宏伟区  (SELECT LOCAL STATION:516)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  光华局  (SELECT LOCAL STATION:530)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  东京陵  (SELECT LOCAL STATION:316)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  弓长岭  (SELECT LOCAL STATION:511)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  首山县  (SELECT LOCAL STATION:717)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  灯塔县  (SELECT LOCAL STATION:818)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  辽化厂  (SELECT LOCAL STATION:515)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  长途局  (SELECT LOCAL STATION:ATS)",
	  " Select:→ ← ↑ ↓ Enter Esc  选择本地局-->  移动局  (SELECT LOCAL STATION:MOV)",
       };
  int c = 0,wflag = 0;
  int x[14] = {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 };
  int y[14] = {  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14 };

  WINDOWSTRU winp  = {  1,  3, 12, 18, 0x7f,  6,  0,  1, NULL };
  WINDOWSTRU winps = {  1, 24, 80, 25, 0x74,  1,  0,  0, NULL };
  menu11.win = &winp;  menu11.winp = &winps;  menu11.pp = pp;
  menu11.x = x;        menu11.y = y;  menu11.pps = pps;
  save_win(&winp);  save_win(&winps);
  do{
      c = menu_run(&menu11,c,wflag);
      wflag = 1;
      if(c == LEFT || c == RIGHT || c == Esc){
	rest_win(&winp);  rest_win(&winps);
	return c;
      }
      switch(menu11.ch){
	  case  0  :  /*西关站    */
		      c = sub_menu_21();
		      break;
	  case  1  :  /*曙光站    */
		      c = sub_menu_22();
		      break;
	  case  2  :  /*北门站    */
		      c = sub_menu_23();
		      break;
	  case  3  :  /*东四站    */
		      c = sub_menu_24();
		      break;
	  case  4  :  /*201站  */
		      c = sub_menu_25();
		      break;
	  case  5  :  /*宏 伟 站  */
		      c = sub_menu_26();
		      break;
	  case  6  :  /*光 华 局  */
		      c = sub_menu_27();
		      break;
	  case  7  :  /*东 京 陵  */
		      c = sub_menu_28();
		      break;
	  case  8  :  /*弓 长 岭  */
		      c = sub_menu_29();
		      break;
	  case  9  :  /*首 山 县  */
		      c = sub_menu_2a();
		      break;
	  case 10  :  /*灯 塔 县  */
		      c = sub_menu_2b();
		      break;
	  case 11  :  /*辽 化 厂  */
		      c = sub_menu_2c();
		      break;
	  case 12  :  /*长 途 局  */
		      c = sub_menu_2d();
		      break;
	  case 13  :  /*移 动 局  */
		      c = sub_menu_2e();
		      break;
	}
      if(c == Esc)  menu11.status = 0;
  }while(c != OUT);
  rest_win(&winp);  rest_win(&winps);
  return c;
}

/*=======================================*/
int sub_menu_21()
{
  char *pp[14] =
       {
	  "--西关局",
	  "--曙光局",
	  "--北门局",
	  "--东四局",
	  "--青年街",
	  "--宏伟区",
	  "--光华局",
	  "--东京陵",
	  "--弓长岭",
	  "--辽阳县",
	  "--灯塔县",
	  "--辽化厂",
	  "--长途局",
	  "--移动局"
       };
  char *pps[14] =
       {
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--西关局   (212)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--曙光局   (412)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--北门局   (313)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--东四局   (314)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--青年街   (230)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--宏伟区   (516)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--光华局   (530)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--东京陵   (316)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--弓长岭   (511)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--辽阳县   (717)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--灯塔县   (818)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--辽化厂   (511)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--长途局   (ATS)",
	  " Select:→ ← ↑ ↓ Enter Esc                               西关--移动局   (MOV)"
       };
  unsigned int c = 0,wflag = 0;
  int x[14] = {  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1 };
  int y[14] = {  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14 };

  WINDOWSTRU winp  = { 13,  4, 24, 19, 0x7f,  6,  0,  1, NULL };
  WINDOWSTRU winps = {  1, 24, 80, 25, 0x74,  1,  0,  0, NULL };
  menu21.win = &winp;  menu21.winp = &winps;  menu21.pp = pp;
  menu21.x = x;        menu21.y = y;  menu21.pps = pps;
  save_win(&winp);  save_win(&winps);
  do{
      c = menu_run(&menu21,c,wflag);
      wflag = 1;
      if(c == LEFT || c == RIGHT || c == Esc){
	rest_win(&winp);  rest_win(&winps);
	return c;
      }
      switch(menu21.ch){
	  case  0  :  /*--西关*/
		      if( (c == Enter)||( c == UEnter) ){
			SZX_cmux_init();
			system("mode co80"); system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case  1  :  /*--曙光*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			SZX_cmux_init(); system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case  2  :  /*--北门*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case  3  :  /*--东四*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case  4  :  /*--201 */
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case  5  :  /*--宏伟*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case  6  :  /*--光华*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case  7  :  /*--东京陵*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case  8  :  /*--弓长岭*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case  9  :  /*--辽阳县*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case 10  :  /*--灯塔县*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case 11  :  /*--辽化厂*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case 12  :  /*--长途局*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	  case 13  :  /*--移动局*/
		      if(c == Enter || c == UEnter){
			SZX_cmux_init();
			system("mode co80");system("wsmenu.exe"); cursor(0);
			c = OUT;
		      }
		      else
			c = 0;
		      break;
	}
      if(c == Esc)  menu21.status = 0;
  }while(c != OUT);
  rest_win(&winp);  rest_win(&winps);
  return c;
}

/*=======================================*/
int sub_menu_22()
{
  char *pp[14] =
       {
	  "--西关局",
	  "--曙光局",
	  "--北门局",
	  "--东四局",
	  "--青年街",
	  "--宏伟区",
	  "--光华局",
	  "--东京陵",

⌨️ 快捷键说明

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