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

📄 3kmenu5.c

📁 嵌入式开发 嵌入式开发 嵌入式开发
💻 C
📖 第 1 页 / 共 5 页
字号:
            Edit(tmpnewx+380, tmpnewy+1*45, 100, 35, tSTL, szChar);
            break;
        case 8: // d3
            sprintf(szChar, "%6.1f", Str6xtcs.d3);
            Edit(tmpnewx+380, tmpnewy+2*45, 100, 35, tSTL, szChar);
            break;
        case 9: // m
            sprintf(szChar, "%6.1f", Str6xtcs.m);
            Edit(tmpnewx+380, tmpnewy+3*45, 100, 35, tSTL, szChar);
            break;
        default:
            break;
        }
    }
    else
    {   // 机械参数结构一 [摆臂调整结构]
        switch(Focus)
        {
        /* 左侧栏 */
        case 1: // x1
            sprintf(szChar, "%6.1f", Str6xtcs.x1);
            Edit(tmpnewx+130, tmpnewy+0*45, 100, 35, tSTL, szChar);
            break;
        case 2: // y1
            sprintf(szChar, "%6.1f", Str6xtcs.y1);
            Edit(tmpnewx+130, tmpnewy+1*45, 100, 35, tSTL, szChar);
            break;
        case 3: // x3
            sprintf(szChar, "%6.1f", Str6xtcs.x3);
            Edit(tmpnewx+130, tmpnewy+2*45, 100, 35, tSTL, szChar);
            break;
        case 4: // y3
            sprintf(szChar, "%6.1f", Str6xtcs.y3);
            Edit(tmpnewx+130, tmpnewy+3*45, 100, 35, tSTL, szChar);
            break;
        case 5: // x5
            sprintf(szChar, "%6.1f", Str6xtcs.x5);
            Edit(tmpnewx+130, tmpnewy+4*45, 100, 35, tSTL, szChar);
            break;
        case 6: // y5
            sprintf(szChar, "%6.1f", Str6xtcs.y5);
            Edit(tmpnewx+130, tmpnewy+5*45, 100, 35, tSTL, szChar);
            break;
        case 7: // x6
            sprintf(szChar, "%6.1f", Str6xtcs.x6);
            Edit(tmpnewx+130, tmpnewy+6*45, 100, 35, tSTL, szChar);
            break;
        case 8: // y6
            sprintf(szChar, "%6.1f", Str6xtcs.y6);
            Edit(tmpnewx+130, tmpnewy+7*45, 100, 35, tSTL, szChar);
            break;
        /* 右侧栏 */
        case 9: // a
            sprintf(szChar, "%6.1f", Str6xtcs.a);
            Edit(tmpnewx+380, tmpnewy+0*45, 100, 35, tSTL, szChar);
            break;
        case 10:// d1
            sprintf(szChar, "%6.1f", Str6xtcs.d1);
            Edit(tmpnewx+380, tmpnewy+1*45, 100, 35, tSTL, szChar);
            break;
        case 11: // d2
            sprintf(szChar, "%6.1f", Str6xtcs.d2);
            Edit(tmpnewx+380, tmpnewy+2*45, 100, 35, tSTL, szChar);
            break;
        case 12:// d3
            sprintf(szChar, "%6.1f", Str6xtcs.d3);
            Edit(tmpnewx+380, tmpnewy+3*45, 100, 35, tSTL, szChar);
            break;
        case 13: // l1
            sprintf(szChar, "%6.1f", Str6xtcs.l1);
            Edit(tmpnewx+380, tmpnewy+4*45, 100, 35, tSTL, szChar);
            break;
        case 14: // l2
            sprintf(szChar, "%6.1f", Str6xtcs.l2);
            Edit(tmpnewx+380, tmpnewy+5*45, 100, 35, tSTL, szChar);
            break;
        case 15: // m
            sprintf(szChar, "%6.1f", Str6xtcs.m);
            Edit(tmpnewx+380, tmpnewy+6*45, 100, 35, tSTL, szChar);
            break;
        default:
            break;
        }
    }
}

/******************************
 描述: 预套准参数标准一页显示的内容
******************************/
void ClearM5_Fr13(void)
{
    Bar(MenuAttr.sX+MenuAttr.tW+2, MenuAttr.sY,
        MenuAttr.sX+MenuAttr.tW+MenuAttr.bW, MenuAttr.sY+475, 192, 192, 192);
}

/******************************
 描述: 预套准参数标准X页 输入过程中
******************************/
void SyncInputing513(const unsigned char Flags, const unsigned char Focus, char *value)
{
    int tmpnewx=MenuAttr.sX+MenuAttr.tW+5;
    int tmpnewy=MenuAttr.sY+80;
    unsigned char tSTL=0xC5;
    if( Flags&0x10 )
    {   // 标准2
        switch(Focus)
        {
        case 1: //x1
            Edit(tmpnewx+130, tmpnewy+0*45, 100, 35, tSTL, value);
            break;
        case 2: //y1
            Edit(tmpnewx+130, tmpnewy+1*45, 100, 35, tSTL, value);
            break;
        case 3: //x5
            Edit(tmpnewx+130, tmpnewy+2*45, 100, 35, tSTL, value);
            break;
        case 4: //y5
            Edit(tmpnewx+130, tmpnewy+3*45, 100, 35, tSTL, value);
            break;
        case 5: //x6
            Edit(tmpnewx+130, tmpnewy+4*45, 100, 35, tSTL, value);
            break;
        case 6: //y6    -换列显示(右)
            Edit(tmpnewx+380, tmpnewy+0*45, 100, 35, tSTL, value);
            break;
        case 7: //d1
            Edit(tmpnewx+380, tmpnewy+1*45, 100, 35, tSTL, value);
            break;
        case 8: //d3
            Edit(tmpnewx+380, tmpnewy+2*45, 100, 35, tSTL, value);
            break;
        case 9: //m
            Edit(tmpnewx+380, tmpnewy+3*45, 100, 35, tSTL, value);
            break;
        default:
            break;
        }
    }
    else
    {   // 标准1
        switch(Focus)
        {
        case 1: //x1
            Edit(tmpnewx+130, tmpnewy+0*45, 100, 35, tSTL, value);
            break;
        case 2: //y1
            Edit(tmpnewx+130, tmpnewy+1*45, 100, 35, tSTL, value);
            break;
        case 3: //x3
            Edit(tmpnewx+130, tmpnewy+2*45, 100, 35, tSTL, value);
            break;
        case 4: //y3
            Edit(tmpnewx+130, tmpnewy+3*45, 100, 35, tSTL, value);
            break;
        case 5: //x5
            Edit(tmpnewx+130, tmpnewy+4*45, 100, 35, tSTL, value);
            break;
        case 6: //y5
            Edit(tmpnewx+130, tmpnewy+5*45, 100, 35, tSTL, value);
            break;
        case 7: //x6
            Edit(tmpnewx+130, tmpnewy+6*45, 100, 35, tSTL, value);
            break;
        case 8: //y6
            Edit(tmpnewx+130, tmpnewy+7*45, 100, 35, tSTL, value);
            break;
        case 9: //a-换列显示(右)
            Edit(tmpnewx+380, tmpnewy+0*45, 100, 35, tSTL, value);
            break;
        case 10://d1
            Edit(tmpnewx+380, tmpnewy+1*45, 100, 35, tSTL, value);
            break;
        case 11://d2
            Edit(tmpnewx+380, tmpnewy+2*45, 100, 35, tSTL, value);
            break;
        case 12://d3
            Edit(tmpnewx+380, tmpnewy+3*45, 100, 35, tSTL, value);
            break;
        case 13://l1
            Edit(tmpnewx+380, tmpnewy+4*45, 100, 35, tSTL, value);
            break;
        case 14://l2
            Edit(tmpnewx+380, tmpnewy+5*45, 100, 35, tSTL, value);
            break;
        case 15://m
            Edit(tmpnewx+380, tmpnewy+6*45, 100, 35, tSTL, value);
            break;
        default:
            break;
        }
    }
}

/******************************
 描述: 系统机械参数页事件处理函数
******************************/
void RespPAGE13_M5(void)
{
    int i,kNO;
    float fVAL;
    int tmpnewx=MenuAttr.sX+MenuAttr.tW+5;
    int tmpnewy=MenuAttr.sY+80;
    unsigned char tSTL=(VarST3000.Language ? 0x81 : 0x03);
    if( Edition3K.YtzMachID==1 )
    {   // 标准1
        for(i=0; i<15; i++)
        {
            if(i<8)
            {
                if( (ClickCol>=tmpnewx && ClickCol<=tmpnewx+230)&& //2007-2-7 06:11下午
                    (ClickRow>=tmpnewy+i*45 && ClickRow<=tmpnewy+i*45+35) && vItemSEL5!=i+1)
                {
                    //Button(tmpnewx, tmpnewy+i*45, 120, 35, 0x10, NULL, 192, 192, 192);
                    Rect(tmpnewx, tmpnewy+i*45, 120, 35,1); //2007-4-12 11:00
                    delay(BTN_DELAY);
                    Button(tmpnewx, tmpnewy+i*45, 120, 35, tSTL, szptr_pw_1[i][VarST3000.Language], 192, 192, 192);
                    SetFocus513(0x00, vItemSEL5);
                    vItemSEL5=i+1;
                    SetFocus513(0x01, vItemSEL5);
                    ClearKBuffer();
                    return;
                }
            }
            else
            {
                if( (ClickCol>=tmpnewx+250 && ClickCol<=tmpnewx+480) && //2007-2-7 06:11下午
                    (ClickRow>=tmpnewy+(i-8)*45 && ClickRow<=tmpnewy+(i-8)*45+35) && vItemSEL5!=i+1)
                {
                    //Button(tmpnewx+250, tmpnewy+(i-8)*45, 120, 35, 0x10, NULL, 192, 192, 192); 
                    Rect(tmpnewx+250, tmpnewy+(i-8)*45, 120, 35,1);
                    delay(BTN_DELAY);
                    Button(tmpnewx+250, tmpnewy+(i-8)*45, 120, 35, tSTL, szptr_pw_1[i][VarST3000.Language], 192, 192, 192);
                    SetFocus513(0x00, vItemSEL5);
                    vItemSEL5=i+1;
                    SetFocus513(0x01, vItemSEL5);
                    ClearKBuffer();
                    return;
                }
            }
        }
        if( (ClickCol>=MenuAttr.sX+MenuAttr.tW+385 && ClickCol<=MenuAttr.sX+MenuAttr.tW+485) &&
            (ClickRow>=MenuAttr.sY+395 && ClickRow<=MenuAttr.sY+430))
        {
            if( Str6xtcs.flag==1 )
            {   Str6xtcs.flag=0;
                Button(MenuAttr.sX+MenuAttr.tW+385, MenuAttr.sY+395, 100, 35,
                    (VarST3000.Language?0x81:0x03), szptr_pw_1[17][VarST3000.Language], 192, 192, 192);
            }
            else
            {   Str6xtcs.flag=1;
                Button(MenuAttr.sX+MenuAttr.tW+385, MenuAttr.sY+395, 100, 35,
                    (VarST3000.Language?0x91:0x13), szptr_pw_1[16][VarST3000.Language], 192, 192, 192);
            }
            return;
        }
        if( (ClickCol>=MenuAttr.sX+MenuAttr.tW+((MenuAttr.bW-240)/3)*2+120 &&
             ClickCol<=MenuAttr.sX+MenuAttr.tW+((MenuAttr.bW-240)/3)*2+240) &&
            (ClickRow>=MenuAttr.sY+480 && ClickRow<=MenuAttr.sY+550))
        {   // 标准2
            Edition3K.YtzMachID=2;
            ClearM5_Fr13();
            SubM5_Fr13B();
            Rect(MenuAttr.sX+MenuAttr.tW+((MenuAttr.bW-240)/3), MenuAttr.sY+480, 120, 70, 0);
            Rect(MenuAttr.sX+MenuAttr.tW+((MenuAttr.bW-240)/3)*2+120, MenuAttr.sY+480, 120, 70, 1);
            REC_Version();
            return;
        }
        kNO=RespNumKBoard();
        if( kNO!=100 )
        {
            if( kNO==205 )
            {   // Enter
                if( strlen(Dispbuf) )
                {
                    fVAL=atof(Dispbuf);
                    if(vItemSEL5==1) {   Str6xtcs.x1=fVAL;}
                    else if(vItemSEL5==2) {   Str6xtcs.y1=fVAL;}
                    else if(vItemSEL5==3) {   Str6xtcs.x3=fVAL;}
                    else if(vItemSEL5==4) {   Str6xtcs.y3=fVAL;}
                    else if(vItemSEL5==5) {   Str6xtcs.x5=fVAL;}
                    else if(vItemSEL5==6) {   Str6xtcs.y5=fVAL;}
                    else if(vItemSEL5==7) {   Str6xtcs.x6=fVAL;}
                    else if(vItemSEL5==8) {   Str6xtcs.y6=fVAL;}
                    else if(vItemSEL5==9) {   Str6xtcs.a=fVAL;}
                    else if(vItemSEL5==10) {   Str6xtcs.d1=fVAL;}
                    else if(vItemSEL5==11) {   Str6xtcs.d2=fVAL;}
                    else if(vItemSEL5==12) {   Str6xtcs.d3=fVAL;}
                    else if(vItemSEL5==13) {   Str6xtcs.l1=fVAL;}
                    else if(vItemSEL5==14) {   Str6xtcs.l2=fVAL;}
                    else if(vItemSEL5==15) {   Str6xtcs.m=fVAL;}
                }
                SetFocus513(0x01, vItemSEL5);
                ClearKBuffer();
            }
            else
            {
                ProcNumKBinp(kNO);
                SyncInputing513(0x00, vItemSEL5, Dispbuf);
            }
        }
    }
    else
    {   // 标准2
        for(i=0; i<9; i++)
        {
            if(i<5)
            {
                if( (ClickCol>=tmpnewx && ClickCol<=tmpnewx+230) && //2007-2-7 06:11下午
                    (ClickRow>=tmpnewy+i*45 && ClickRow<=tmpnewy+i*45+35) && vItemSEL5!=i+1)
                {
                    //Button(tmpnewx, tmpnewy+i*45, 120, 35, 0x10, NULL, 192, 192, 192); 
                    Rect(tmpnewx, tmpnewy+i*45, 120, 35,1);
                    delay(BTN_DELAY);
                    Button(tmpnewx, tmpnewy+i*45, 120, 35, tSTL, szptr_pw_2[i][VarST3000.Language], 192, 192, 192);
                    SetFocus513(0x10, vItemSEL5);
                    vItemSEL5=i+1;
                    SetFocus513(0x11, vItemSEL5);
                    ClearKBuffer();
                    return;
                }
            }
            else
            {
                if( (ClickCol>=tmpnewx+250 && ClickCol<=tmpnewx+480) && //2007-2-7 06:11下午
                    (ClickRow>=tmpnewy+(i-5)*45 && ClickRow<=tmpnewy+(i-5)*45+35) && vItemSEL5!=i+1)
                {
                    //Button(tmpnewx+250, tmpnewy+(i-5)*45, 120, 35, 0x10, NULL, 192, 192, 192); 
                    Rect(tmpnewx+250, tmpnewy+(i-5)*45, 120, 35,1);
                    delay(BTN_DELAY);
                    Button(tmpnewx+250, tmpnewy+(i-5)*45, 120, 35, tSTL, szptr_pw_2[i][VarST3000.Language], 192, 192, 192);
                    SetFocus513(0x10, vItemSEL5);

⌨️ 快捷键说明

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