Esempio n. 1
0
        /// <summary>
        /// 接收短信
        /// </summary>
        /// <returns></returns>
        public CallResult ReceiveSMSEx()
        {
            this.rsc.Clear();

            deleSQF mySmsContent = new deleSQF(getSMSContent);

            int Result = 2;
            int Count  = 0;

            while (Result == 2) //当result = 2 时,说明还有下一批短信等待接收,这时需重新再调用一次ReceiveSMSEx方法
            {
                Result = _ReceiveSMSEx(UserName, mySmsContent);

                if ((Result == 2) || (Result == 1))
                {
                    Count++;
                }
            }

            CallResult cr = new CallResult(Result);

            cr.Value = Count.ToString();

            return(cr);
        }
Esempio n. 2
0
 private EUCPComm()
 {
     this.sqf            = new deleSQF(this.comm_mySmsContent);
     this.report         = new delegSMSReport(this.comm_mySmsReport);
     this.reportex       = new delegSMSReportEx(this.comm_mySmsReportEx);
     this._mySmsContent  = (deleSQF)Delegate.Combine(this._mySmsContent, this.sqf);
     this._mySmsReport   = (delegSMSReport)Delegate.Combine(this._mySmsReport, this.report);
     this._mySmsReportEx = (delegSMSReportEx)Delegate.Combine(this._mySmsReportEx, this.reportex);
 }
Esempio n. 3
0
        private EUCPComm()
        {
            sqf      = new EUCPComm.deleSQF(comm_mySmsContent);
            report   = new EUCPComm.delegSMSReport(comm_mySmsReport);
            reportex = new EUCPComm.delegSMSReportEx(comm_mySmsReportEx);

            _mySmsContent  += sqf;
            _mySmsReport   += report;
            _mySmsReportEx += reportex;
        }
Esempio n. 4
0
        public override List <MoInfo> GetMo()
        {
            mos = new List <MoInfo>();
            SendUser us           = this.SendUser;
            deleSQF  mySmsContent = new deleSQF(getSMSContent);
            //接收短信(扩展)             序列号     函数指针
            int result = 2;

            while (result == 2) //当result = 2 时,说明还有下一批短信等待接收,这时需重新再调用一次ReceiveSMSEx方法
            {
                result = ReceiveSMSEx(us.serialNumber, mySmsContent);
            }
            return(mos);
        }
Esempio n. 5
0
        /// <summary>
        /// 上行
        /// </summary>
        /// <param name="us"></param>
        /// <returns></returns>
        public override string Getascending()
        {
            SendUser us           = this.SendUser;
            deleSQF  mySmsContent = new deleSQF(getSMSContent);
            //接收短信                序列号       函数指针
            int    result       = 2;
            string resultString = string.Empty;

            while (result == 2)  //当result = 2 时,说明还有下一批短信等待接收,这时需重新再调用一次ReceiveSMS方法
            {
                result = ReceiveSMS(us.serialNumber, mySmsContent);
                if (result == 1)
                {
                    resultString = "接收短信成功";
                }
                else if (result == 101)
                {
                    resultString = "网络故障";
                }
                else if (result == 102)
                {
                    resultString = "其它故障";
                }
                else if (result == 105)
                {
                    resultString = "参数指针为空";
                }
                else if (result == 0)
                {
                    resultString = "失败";
                }
                else
                {
                    resultString = "其他故障值:" + result.ToString();
                }
            }
            return(resultString);
        }
Esempio n. 6
0
        public CallResult ReceiveSMSEx()
        {
            this.rsc.Clear();
            deleSQF mySmsContent = new deleSQF(this.FgF4PPDs7);
            int     code         = 2;
            int     num2         = 0;

            while (code == 2)
            {
                code = _ReceiveSMSEx(this.name, mySmsContent);
                switch (code)
                {
                case 2:
                case 1:
                    num2++;
                    break;
                }
            }
            CallResult result = new CallResult(code);

            result.Value = num2.ToString();
            return(result);
        }
Esempio n. 7
0
 public static extern int ReceiveSMSEx(string sn, deleSQF mySmsContent);
Esempio n. 8
0
 [DllImport("EUCPComm.dll", EntryPoint = "ReceiveSMSEx")]  // 接收短信
 public static extern int _ReceiveSMSEx(string sn, deleSQF mySmsContent);
Esempio n. 9
0
 public override List<MoInfo> GetMo()
 {
     mos = new List<MoInfo>();
     SendUser us = this.SendUser;
     deleSQF mySmsContent = new deleSQF(getSMSContent);
     //接收短信(扩展)             序列号     函数指针
     int result = 2;
     while (result == 2) //当result = 2 时,说明还有下一批短信等待接收,这时需重新再调用一次ReceiveSMSEx方法
     {
         result = ReceiveSMSEx(us.serialNumber, mySmsContent);
     }
     return mos;
 }
Esempio n. 10
0
 /// <summary>
 /// 上行
 /// </summary>
 /// <param name="us"></param>
 /// <returns></returns>
 public override string Getascending()
 {
     SendUser us = this.SendUser;
     deleSQF mySmsContent = new deleSQF(getSMSContent);
     //接收短信                序列号       函数指针
     int result = 2;
     string resultString = string.Empty;
     while (result == 2)  //当result = 2 时,说明还有下一批短信等待接收,这时需重新再调用一次ReceiveSMS方法
     {
         result = ReceiveSMS(us.serialNumber, mySmsContent);
         if (result == 1)
             resultString = "接收短信成功";
         else if (result == 101)
             resultString = "网络故障";
         else if (result == 102)
             resultString = "其它故障";
         else if (result == 105)
             resultString = "参数指针为空";
         else if (result == 0)
             resultString = "失败";
         else
             resultString = "其他故障值:" + result.ToString();
     }
     return resultString;
 }
Esempio n. 11
0
 public CallResult ReceiveSMSEx()
 {
     this.rsc.Clear();
     deleSQF mySmsContent = new deleSQF(this.FgF4PPDs7);
     int code = 2;
     int num2 = 0;
     while (code == 2)
     {
         code = _ReceiveSMSEx(this.name, mySmsContent);
         switch (code)
         {
             case 2:
             case 1:
                 num2++;
                 break;
         }
     }
     CallResult result = new CallResult(code);
     result.Value = num2.ToString();
     return result;
 }
Esempio n. 12
0
 [DllImport("EUCPComm.dll", EntryPoint = "ReceiveSMSEx")] // 接收短信
 internal static extern int ReceiveSMSEx(string sn, deleSQF mySmsContent);