コード例 #1
0
        /// <summary>
        /// 发送读取历史信息命令
        /// </summary>
        /// <param name="_selectIndex">0-询问Master信息,1-询问Pack信息</param>
        public void SendReadHistoryCommand(int _selectIndex)
        {
            if (socketClient != null)
            {
                List <byte> SendTimeList = new List <byte> {
                };
                SendTimeList.AddRange(BitConverter.GetBytes(DataRange));
                SendTimeList.AddRange(BLLCommon.DateTimeToBytes(StartTime));
                SendTimeList.AddRange(BLLCommon.DateTimeToBytes(EndTime));
                if (_selectIndex == 0)
                {
                    BLLCommon.SendToServer(CS_AskReply.ClientAskGroup, Properties.Settings.Default.DTUIndex, Convert.ToByte((int)MasterIndex - 1), 0xff, SendTimeList.ToArray());
                }

                else
                {
                    BLLCommon.SendToServer(CS_AskReply.ClientAskPack, Properties.Settings.Default.DTUIndex, Convert.ToByte((int)MasterIndex - 1), Convert.ToByte((int)packIndex - 1), SendTimeList.ToArray());
                }
            }
            BLLCommon.ShowWaitWindow();
        }