授权代码

bool 授权账号()
{
   ushort    分割符;
   string    账号数组[1000];;
   int       授权账号个数;
   string    当前账号名称;
   int       i;
//----------------------------
   if (授权账号列表=="")
   {
      return(true); 
   }
   分割符=StringGetCharacter("|",0); 
   授权账号个数 = StringSplit(授权账号列表,分割符,账号数组) ;
   if(授权账号个数>=1000)
   {
      Alert("授权列表数量太大2"); 
   }
   for ( ; i<授权账号个数 ; i = i + 1)
   {
      if(当前账号名称==账号数组[i])
      {
         return(true); 
      }
   }
   ObjectCreate(0,by_st_46 + "onlyuser",OBJ_LABEL,0,0,0); 
   ObjectSetInteger(0,by_st_46 + "onlyuser",OBJPROP_XDISTANCE,20); 
   ObjectSetInteger(0,by_st_46 + "onlyuser",OBJPROP_YDISTANCE,20); 
   ObjectSetString(0,by_st_46 + "onlyuser",OBJPROP_FONT,"Trebuchet MS"); 
   ObjectSetInteger(0,by_st_46 + "onlyuser",OBJPROP_FONTSIZE,12); 
   ObjectSetInteger(0,by_st_46 + "onlyuser",OBJPROP_CORNER,0); 
   ObjectSetInteger(0,by_st_46 + "onlyuser",OBJPROP_SELECTABLE,1); 
   ObjectSetString(0,by_st_46 + "onlyuser",OBJPROP_TOOLTIP,"\n"); 
   ObjectSetString(0,by_st_46 + "onlyuser",OBJPROP_TEXT,"非授权账号:" + 当前账号名称); 
   ObjectSetInteger(0,by_st_46 + "onlyuser",OBJPROP_COLOR,Red); 
   return(false); 
}



微信公众号:天泓评测


本博客所有文章如无特别注明均为原创。作者:天泓评测
分享到:更多

相关推荐

发表评论

路人甲 表情
Ctrl+Enter快速提交

网友评论(0)