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

📄 command.c

📁 MDE 图形引擎
💻 C
字号:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <minigui/common.h>#include <minigui/minigui.h>#include <minigui/gdi.h>#include <minigui/window.h>#include <minigui/control.h>#include <minigui/vcongui.h>#include "vacs.h"#include "header.h"#include "command.h"#include "footer.h"/************************** Global Variables  ********************************/extern void SetFooterRowInfo (int row, int num_cols, int *widths, BOOL fUpdate);extern void SetFooterCellInfo (int row, int col,                               int fc, int bc, const char* text, BOOL fUpdate);double G_CurrentPoint[6] = {0.0,0.0,0.0,0.0,0.0,0.0};char vmfilename[PATH_MAX+1];/************************** Interfaces of Command ****************************/void StateInfoDisplay (int id){   int row, column, wide;    char StateInfoText[50];        switch(id)        { case INITIAL:               StateInfoText[0] = '\0';               break;          case CREATECHILDFAILURE:                strcpy(StateInfoText, "Create child process failure!");               break;                             case CHILDOPERATIONFAILURE:                strcpy(StateInfoText, "Child process operation failure!");               break;                        case FILEISNOTCORRECT:                strcpy(StateInfoText, "NCfile is not correct!");               break;                         case FILEISCORRECT:               strcpy(StateInfoText, "Enter F4 or F5 to execute the NCcode.");               break;                           case FILENOTPASSCODECHANGE:                strcpy(StateInfoText, "NCfile has not passed code chang!");               break;                     case FILENOTPASSTOOLCOMPENSATE:                strcpy(StateInfoText, "NCfile has not passed tool compensate!");               break;                         case FILENOTPASSCOMPILE:                strcpy(StateInfoText, "NCfile has not passed compile!");               break;                    case FILENOTPASSWORKSPACECHECK:                strcpy(StateInfoText, "NCfile has not passed workspace check!");               break;                         case NCPROGRAMPAUSE:                strcpy(StateInfoText, "NCprogram is paused.");               break;                    case NCPROGRAMCONTINUE:               StateInfoText[0]= '\0';               break;          case OPERATIONOK:               strcpy(StateInfoText,"NCprogram is executing.");               break;                         case INITIALERROR:               strcpy(StateInfoText,"Tool initial position/gesture is error!");               break;                         case COORDINATEERROR:               strcpy(StateInfoText,"Coordinate is error!");               break;                         case FINISHGOZERO:               strcpy(StateInfoText,"GO ZERO operation is finished.");               break;                    case CODECHANGEOK:               strcpy(StateInfoText,"CodeChange OK.");               break;                         case ANGLEOFCISERROR:               strcpy(StateInfoText,"Find error in CodeChanging");               break;                         case STARTPOSITIONERROR:               strcpy(StateInfoText,"Find error in CodeChanging");               break;        }            row = 3; column = 1; wide = 800;    SetFooterRowInfo( row, column, &wide,TRUE);    SetFooterCellInfo( row, column - 1, COLOR_black,                        COLOR_lightwhite, StateInfoText, TRUE);    if(id != INITIAL) Beep();}static void CometoLinux (HWND hFooterWin, int id) {}static void ExitSystem (HWND hFooterWin, int id) {    if (MessageBox (hFooterWin,             "确定要退出系统吗?",             "退出系统",             MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) == IDYES) {        CloseHeaderFooter ();    }  }void ButtonCommand (HWND hHeaderWin, HWND hFooterWin, UINT id){    switch (id) {        case ID_FM_FIRST ... ID_FM_LAST:            break;                case ID_CC_FIRST ... ID_CC_LAST :             break;            case ID_VE_FIRST ... ID_VE_LAST:            break;                case ID_AR_FIRST ... ID_AR_LAST:            break;        case ID_MR_FIRST ... ID_MR_LAST:             break;                case ID_MR_SETPAMFIRST ... ID_MR_SETPAMLAST:             break;        case ID_PM_FIRST ... ID_PM_LAST:            break;        case ID_TEST1:            break;        case ID_TEST2:            break;        case ID_FILECOMPILE:            break;        case ID_WORKSPACECHECK:            break;        case ID_LINUX:            CometoLinux (hFooterWin, id);            break;                case ID_EXIT:            ExitSystem (hFooterWin, id);            break;    }}

⌨️ 快捷键说明

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