Card.LanBaoShiGY.FormatGasCard C# (CSharp) Метод

FormatGasCard() публичный Метод

public FormatGasCard ( short com, int baud, string kmm, string kh, string dqdm ) : int
com short
baud int
kmm string
kh string
dqdm string
Результат int
        public int FormatGasCard(short com, int baud, string kmm, string kh, string dqdm)
        {
            int rs = -1;
            try
            {
                PLtCardReader pcr1 = new PLtCardReader()
                {
                    dwDevType = 2,
                    dwPort = com,
                    dwBaud = baud,
                    dv_beep = 0
                };

                PUserCard puc1 = new PUserCard();
                int pti = 0;
                Log.Debug("LanBaoShiGY FormatGasCard start");
                String buf;
                String buf1;
                Log.Debug("擦卡前读卡格式:");
                MingHua.GetSnapShot(com, baud, out buf);
                rs = RecycleUserCard(ref pcr1, ref puc1, pti);
                Log.Debug("擦卡后读卡格式:");
                MingHua.GetSnapShot(com, baud, out buf1);
                Log.Debug(buf);
                Log.Debug(buf1);
                rs = RecycleUserCard(ref pcr1, ref puc1, pti);
                Log.Debug("LanBaoShiGY FormatGasCard end,return:" + rs);
                if (rs == 0)
                {
                    Log.Debug("蓝宝石工业擦卡成功!");
                    return 0;
                }
                else
                {
                    Log.Debug("蓝宝石工业擦卡失败!");
                    return -1;
                }
            }
            catch (Exception e)
            {
                Log.Debug("蓝宝石工业擦卡异常:" + e.Message + "--" + e.StackTrace);
            }
            return rs;
        }