コード例 #1
0
 private static void Host_PostLimitNumberInfos(object sender, Chromium.Remote.Event.CfrV8HandlerExecuteEventArgs e)
 {
     try
     {
         List <NumberLimit> infos = LimitManager.GetInfos();
         string             json  = Utility.JsonSerializerByArrayData(infos.ToArray());
         e.SetReturnValue(json);
     }
     catch (Exception ex)
     {
         Log4Helper.ErrorInfo(ex.Message, ex);
         ViewCallFunction.ViewAlert(ex.Message);
     }
 }
コード例 #2
0
 private static void Host_PostConfirmClientNumber(object sender, Chromium.Remote.Event.CfrV8HandlerExecuteEventArgs e)
 {
     try
     {
         string          strClientNumber = e.Arguments[0].StringValue;
         int             clientNumber    = Utility.StrToInt(strClientNumber);
         List <UserInfo> infos           = UserManager.GetInfos();
         int             count           = infos.Where(w => w.UserNumber == clientNumber).Count();
         if (count == 0)
         {
             if (LimitManager.NumberInfos == null)
             {
                 LimitManager.GetInfos();
             }
             count = LimitManager.NumberInfos.Where(w => w.LimitNumber == clientNumber).Count();
         }
         e.SetReturnValue(count > 0);
     }
     catch (Exception ex)
     {
         Log4Helper.ErrorInfo(ex.Message, ex);
         ViewCallFunction.ViewAlert(ex.Message);
     }
 }