예제 #1
0
 public formCloudSendSingle(object objData, string pOperation, LedPanelCloud pPanelCloud, bool pOk, LedCmdType pCommand, formMain fmain)
 {
     this.InitializeComponent();
     this.ShowOK     = pOk;
     this.command    = pCommand;
     this.commData   = objData;
     this.operation  = pOperation;
     this.panelCloud = pPanelCloud;
     this.frmMain    = fmain;
     base.Text       = pOperation;
     base.Size       = new System.Drawing.Size(425, 89);
     base.TopMost    = true;
 }
 public formCloudGroupSendingSingle(LedCmdType pCommand, string pOperation, object pData, formMain fmain)
 {
     this.InitializeComponent();
     this.DoubleBuffered = true;
     base.SetStyle(ControlStyles.UserPaint, true);
     base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
     base.SetStyle(ControlStyles.DoubleBuffer, true);
     base.UpdateStyles();
     this.command   = pCommand;
     this.operation = pOperation;
     this.commData  = pData;
     this.fm        = fmain;
     this.Diplay_lanuage_Text();
 }
예제 #3
0
 public formSendSingle(object objData, string pOperation, LedPanel pPanel, bool pOk, LedCmdType pCommand, formMain fmain)
 {
     this.InitializeComponent();
     formSendSingle.LastSendResultObject = null;
     this.ShowOK    = pOk;
     this.command   = pCommand;
     this.commData  = objData;
     this.operation = pOperation;
     this.panel     = pPanel;
     this.fm        = fmain;
     base.Text      = pOperation;
     base.Size      = new System.Drawing.Size(425, 89);
     base.TopMost   = true;
 }
예제 #4
0
 public static byte[] API_DownSingleCommand(string pDeviceID, LedCmdType pCMD)
 {
     byte[] result;
     try
     {
         string address = formMain.GprsServer + "terminal/downloadSingleCommandByUser.json?timer=" + GprsAdministrator.GetTimeStamp();
         string text    = "&user.id=" + GprsAdministrator.Entity_ID;
         text = text + "&user.userType=" + GprsAdministrator.Entity_UserType;
         text = text + "&user.username="******"&user.sign=" + GprsAdministrator.Entity_Sign;
         text = text + "&entity.id=" + pDeviceID;
         byte[] bytes = Encoding.UTF8.GetBytes(text);
         byte[] array = new WebClient
         {
             Headers =
             {
                 {
                     "Content-Type",
                     "application/x-www-form-urlencoded"
                 }
             }
         }.UploadData(address, "POST", bytes);
         if (array.Length == 44)
         {
             byte[] array2 = new byte[1];
             result = array2;
         }
         else
         {
             result = array;
         }
     }
     catch
     {
         byte[] array3 = new byte[1];
         result = array3;
     }
     return(result);
 }