예제 #1
0
파일: Attmake.cs 프로젝트: skyclub66/HMI
 private static unsafe byte AttConvert_gui(runattinf *b1, runattinf *b2, byte lenth1, byte lenth2)
 {
     if ((b1->attlei != attshulei.Sstr.typevalue) && (b2->attlei == attshulei.Sstr.typevalue))
     {
         if (b2->datafrom != 0xfe)
         {
             myapp.errcode = 0x1b;
             return(0);
         }
         if (lenth1 == 0)
         {
             lenth1 = Strmake.Strmake_GetS32strlen(b1->val);
         }
         if (b2->att.merrylenth <= lenth1)
         {
             lenth1 = (byte)(b2->att.merrylenth - 1);
         }
         Strmake.Strmake_S32ToStr(b1->val, b2->Pz, lenth1, 1);
     }
     else
     {
         if ((b1->attlei == attshulei.Sstr.typevalue) && (b2->attlei != attshulei.Sstr.typevalue))
         {
             b2->val = Strmake.Strmake_StrToS32(b1->Pz, lenth1);
             return(Attmake_SetAtt(b2, b2, 0));
         }
         myapp.errcode = 0x1b;
         return(0);
     }
     return(1);
 }
예제 #2
0
파일: Commake.cs 프로젝트: skyclub66/HMI
 public static unsafe void Commake_PrintIntToStr(int val, byte isend)
 {
     byte[] buffer = new byte[13];
     fixed(byte *numRef = buffer)
     {
         Strmake.Strmake_S32ToStr(val, numRef, 0, 1);
         Commake_Prints(numRef, isend);
     }
 }