Esempio n. 1
0
File: Case7.c Progetto: baducki/me
// 7. 종료 함수
int saveCheck(void)   // 종료 전 파일 저장 유무를 질문 (반환값: 입력여부)
{
	int errorcheck = 0;
	while (1){
		if (errorcheck != -1){
			cursorOff();
			textColor(16 * 10);
			gotoxy(0, 24); printf("        수정한 내용을 저장하시겠습니까?      예 [→]     아니요 [←]       ");
			textColor(7);
			errorcheck = checkSaveValue();
			cursorOn();
			if (errorcheck != -1) break;
		}
		else if (errorcheck == -1){
			cursorOff();
			textColor(16 * 10);
			gotoxy(0, 24); printf("        수정한 내용을 저장하시겠습니까?      예 [→]     아니요 [←]        ");
			warningYesOrNo();
			textColor(7);
			errorcheck = checkSaveValue();
			cursorOn();
			if (errorcheck != -1) break;
		}
	}

	return errorcheck;
}
Esempio n. 2
0
File: Case4.c Progetto: baducki/me
int inputInfoYesOrNo(int i) // 입력정보 선택 여부 확인 (입력값 i: 검색 or 수정 선택 변수)
{
	int choice;  // key: Yes or No 선택 변수
	char input[2][5] = { "검색", "수정" };
	while (1){
		cursorOff();
		textColor(16 * 10);
		gotoxy(0, 26); printf("            위 정보로 %s하시겠습니까?      예 [→]     아니요 [←]       ", input[i]);
		textColor(0);
		gotoxy(0, 27);
		choice = getche();
		textColor(7);
		if (choice == 224){
			choice = getch();
			if (choice == 77){
				gotoxy(43, 26); textColor(16 * 14 + 10); printf("  예 [→]  "); textColor(7); Sleep(TIME_OF_DELAY);
				cursorOn();
				return 0;
			}
			else if (choice == 75){
				gotoxy(55, 26); textColor(16 * 14 + 10); printf("  아니요 [←]  "); textColor(7); Sleep(TIME_OF_DELAY);
				cursorOn();
				return -1;
			}
			else warningYesOrNo();
		}
		else warningYesOrNo();
	}
	return 0;
}
Esempio n. 3
0
File: Case4.c Progetto: baducki/me
void searchCancel(void)
{
	cursorOff();
	textColor(16 * 10);
	gotoxy(0, 26); printf("         < 회원정보 수정이 취소 되었습니다 > 아무 키나 누르세요            ");
	textColor(7);
	getch();
	cursorOn();
}
Esempio n. 4
0
void ParallaxLCD::setup(boolean startEmpty ) {
	pinMode(_bv[PINOUT], OUTPUT);
	delay(_bv[BOUNCE]);
	begin(19200);
	delay(_bv[BOUNCE]);
	if (startEmpty) {
		empty(); 
	}
	cursorOff();
}
Esempio n. 5
0
File: Case4.c Progetto: baducki/me
 void adjustInfoInputCellphone(Member_t *id, int i)
 {
	 cursorOff();
	 textColor(16 * 10);
	 gotoxy(0, 26); printf("           < 전화번호 수정이 완료 되었습니다 > 아무 키나 누르세요          ");
	 textColor(7);
	 getch();
	 cursorOn();
	 gotoxy(0, 16); lineClear();
	 gotoxy(0, 17); lineClear();
	 gotoxy(0, 18); lineClear();
	 gotoxy(0, 26); lineClear();
	 gotoxy(0, 28); lineClear();
	 case4PrintInfo(id, i);
 }
Esempio n. 6
0
File: Case4.c Progetto: baducki/me
 void adjustInfoInputStudentID(Member_t *id, int IDnum, int i)
{
	id[i].Studentnum = IDnum;
	cursorOff();
	textColor(16 * 10);
	gotoxy(0, 26); printf("          < 학번 수정이 완료 되었습니다 > 아무 키나 누르세요             ");
	textColor(7);
	getch();
	cursorOn();
	gotoxy(0, 16); lineClear();
	gotoxy(0, 17); lineClear();
	gotoxy(0, 18); lineClear();
	gotoxy(0, 26); lineClear();
	gotoxy(0, 28); lineClear();
	case4PrintInfo(id, i);
}
Esempio n. 7
0
void Wturnoff_buttons()
{
   PFI tempFunc;

   TPRINT0("Wturnoff_buttons: beginning\n");
#ifndef VNMRJ
   clearFuncs();
#endif
   linelength = 80;

   /* Mark that Wturnoff_buttons have been called.  After the
       main routine that called Wturnoff_buttons finished, the
       buttons should be cleared if Wactivate_buttons has not been
       called.  The main routine can either be initiated with a 
       button click or by entering a command in the command window.
                                                                 */
   Wturnoff_buttonsCalled = ON;

/******            Do not erase existing buttons here anymore          ********/
/*
 *#ifdef SUN
 *  if (Wissun())
 *  {  for (i=0; i<8 ;i++)
 *     {   panel_set(but[i], PANEL_SHOW_ITEM, FALSE,0);
 *     }
 *  }
 *  else
 *#endif
 *  {  Wclearpos(1,1,1,80);
 *     header[0] = NULL;
 *  }
 *  end of commented out section
 */
   buttons_active = 0;
   help_name[0] = '\0';
   if (returnFunc) /* if it exists */
   {  tempFunc = returnFunc;
      TPRINT1("Wturnoff_buttons:calling return function 0x%x\n",tempFunc);
      returnFunc = NULL;  /* Null out return function */
      (*tempFunc)();
   }
#ifndef VNMRJ
   cursorOff(BUTTONS);
   resetButtonPushed(); /* clear button pushed, so not reinversed video */
#endif
   TPRINT0("\nWturnoff_buttons: ending\n");
}
Esempio n. 8
0
File: Case4.c Progetto: baducki/me
void case4PrintInfo(Member_t *id, int i)
{
	if (i == -1){
		textColor(12);
		gotoxy(21, 7);  printf("검색한 정보가 존재하지 않습니다!");
		cursorOff();
		textColor(12 * 16);
		gotoxy(0, 28); printf("    Warning: 존재하지 않는 회원정보를 검색했습니다 (아무키나 누르세요)     ");
		textColor(7); getch();
		cursorOn();
	}
	else{
		textColor(15);
		gotoxy(12, 5);  printf("①     학번 : %d", id[i].Studentnum);
		gotoxy(12, 7);  printf("②     이름 : %s", id[i].Name);
		gotoxy(12, 9);  printf("③     주소 : %s", id[i].Address);
		gotoxy(12, 11); printf("④ 전화번호 : %s", id[i].Cellphone);
		textColor(7);
	}
}
Esempio n. 9
0
void Wturnoff_mouse()
{  int (*tempFunc)();

   aspMouse = 0;
   mouseIsActive = 0;
   mouseMove   = NULL;
   mouseButton = NULL;
   mouseGeneral = NULL;
   mouseClick = NULL;
   isJMouse = 0;
   if (mouseReturn) /* if it exists */
   {  tempFunc = mouseReturn;
      mouseReturn = NULL;  /* Null out return function */
      (*tempFunc)();
   }
#ifdef VNMRJ
   writelineToVnmrJ("mouse", "off");
#else
   cursorOff(MOUSE); /* turn cursor Off */
#endif 
}
Esempio n. 10
0
File: Case4.c Progetto: baducki/me
 int repeatStudentIDCheck(Member_t *id, int IDnum)
 {
	 int i;  // for 문을 위한 변수 i
	 for (i = 1; id[i].Studentnum != 0; i++){
		 if (id[i].Studentnum == IDnum){
			 cursorOff();
			 textColor(12 * 16);
			 gotoxy(0, 28); printf("      Warning: 기존 회원과 중복되는 학번입니다 (아무키나 누르세요)         ");
			 textColor(7); getch();
			 cursorOn();
			 gotoxy(0, 16); lineClear();
			 gotoxy(0, 17); lineClear();
			 gotoxy(0, 18); lineClear();
			 gotoxy(0, 26); lineClear();
			 gotoxy(0, 28); lineClear();
			 IDnum = -1;
			 break;
		 }
	 }
	 return IDnum;
 }
Esempio n. 11
0
void SerialLCD::init () {
	delay(500);
	switch (g_interface) {
		case RS232:
			LCD_SERIAL.begin(g_baudrate);
			break;
		case I2C:
			Wire.begin();
			break;
		case SPI:
			pinMode(g_sspin, OUTPUT);
			pinMode(g_sclk, OUTPUT);
			pinMode(g_mosi, OUTPUT);
			pinMode(g_miso, INPUT);
			digitalWrite(g_sspin, HIGH);
			break;
	}
	on();
	clear();
	blinkOff();
	cursorOff(); 
	home();
}
Esempio n. 12
0
File: Case7.c Progetto: baducki/me
void programCloseUI(void)   // 프로그램 종료 UI
{
	cursorOff();
	system("cls");
	textColor(16 * 14);
	printf("                             < 프로그램 종료 >                             "); Sleep(TIME_OF_DELAY);
	textColor(15);
	printf("                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("                 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("               @@@@@@@@@@@@@@@@@***.....*@@@@@@*@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("              @@@@@@@@@@@***...           ..****@@@@@@@@@@@@@@@@@@@@@@@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("              *@*@@@@@@@*....                 .**. *@@@@@@@@@@@@@@@@@@@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("                 @@@@@@*....       ...........     .@@@@@@@@@@@@@@@@@@@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("                *@@@@@@*..     ..*********......    .*@@@@@@@@@@@@@@@@@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("                ****@@@@@@*..    ....                  .@@@@@@@**.   ..@@@\n"); Sleep(TIME_OF_DELAY);
	printf("                     @@******..    ...*.****..          .@@@@*.       ..@@\n"); Sleep(TIME_OF_DELAY);
	printf("                      ***.*..**    ..*..***.            .*@@*.. ...   ..@@\n"); Sleep(TIME_OF_DELAY);
	printf("                      ***.****.       ..                 .*@*.     ..  *@@\n"); Sleep(TIME_OF_DELAY);
	printf("                      ***...**                           .**.      .  .@@@\n"); Sleep(TIME_OF_DELAY);
	printf("                      *....**                            .*.         *@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("                       *..**                             ... ..    ..@@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("                        **@@*.   .                          ..........@@@@\n"); Sleep(TIME_OF_DELAY);
	printf("                         @***@. .                          ...    ....***@\n"); Sleep(TIME_OF_DELAY);
	printf("                          @*@*....                         ... ...........\n"); Sleep(TIME_OF_DELAY);
	printf("                           @*@@*.***...*                  ............   .\n"); Sleep(TIME_OF_DELAY);
	printf("                            @@@*.*...                 ....   .......     .\n"); Sleep(TIME_OF_DELAY);
	printf("                             @@*....               .....        .        .\n"); Sleep(TIME_OF_DELAY);
	printf("                               *@..             ...........              .\n"); Sleep(TIME_OF_DELAY);
	printf("                                .@*..     ...****..........  ..          .\n"); Sleep(TIME_OF_DELAY);
	printf("                                  ........   .@@****.........            .\n"); Sleep(TIME_OF_DELAY);
	printf("                                               *******...**              .\n"); Sleep(TIME_OF_DELAY);
	printf("                                                .*@@**@@@*           .  ..\n"); Sleep(TIME_OF_DELAY);
	printf("    ..........................................@@@@@@@@*             .   ..\n"); Sleep(TIME_OF_DELAY);
	textColor(7);
	gotoxy(4, 25); printf(" made by YG & Kyung");
	textColor(14);
	gotoxy(4, 17);
	printf("G"); Sleep(TIME_OF_DELAY);
	printf("O"); Sleep(TIME_OF_DELAY);
	printf("O"); Sleep(TIME_OF_DELAY);
	printf("D"); Sleep(TIME_OF_DELAY);
	gotoxy(9, 17);
	printf("B"); Sleep(TIME_OF_DELAY);
	printf("Y"); Sleep(TIME_OF_DELAY);
	printf("E"); Sleep(TIME_OF_DELAY);
	gotoxy(4, 18);
	printf("S"); Sleep(TIME_OF_DELAY);
	printf("E"); Sleep(TIME_OF_DELAY);
	printf("E"); Sleep(TIME_OF_DELAY);
	gotoxy(8, 18);
	printf("Y"); Sleep(TIME_OF_DELAY);
	printf("O"); Sleep(TIME_OF_DELAY);
	printf("U"); Sleep(TIME_OF_DELAY);
	gotoxy(12, 18);
	printf("L"); Sleep(TIME_OF_DELAY);
	printf("A"); Sleep(TIME_OF_DELAY);
	printf("T"); Sleep(TIME_OF_DELAY);
	printf("E"); Sleep(TIME_OF_DELAY);
	printf("R"); Sleep(TIME_OF_DELAY);
	gotoxy(31, 18);
	textColor(12);
	printf("♡"); Sleep(TIME_OF_DELAY * 3);
	textColor(15);
	gotoxy(31, 18);
	printf("*.");
	textColor(12);
	gotoxy(25, 18);
	printf("\b\b♥"); Sleep(TIME_OF_DELAY);
	printf("\b\b\b♥"); Sleep(TIME_OF_DELAY);
	printf("\b\b\b♥"); Sleep(TIME_OF_DELAY);
	printf("\b\b\b♥"); Sleep(TIME_OF_DELAY);
	printf("\b\b\b♥"); Sleep(TIME_OF_DELAY);
	printf("\b\b\b♥"); Sleep(TIME_OF_DELAY);
	printf("\b\b\b♥"); Sleep(TIME_OF_DELAY);
	textColor(7);
	gotoxy(4, 28);
}