⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vcard.cs

📁 老外Logix Mobile mCoreLib短信控件源码 通过串口或者手机数据线进行连接,可对手机进行 读写操作.
💻 CS
📖 第 1 页 / 共 5 页
字号:
namespace mCore
{
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.IO;
    using System.Security;
    using System.Threading;
    using System.Windows.Forms;

    public class vCard : IvCard
    {
        private string a = "";
        private string b = "";
        private string c = "";
        private string d = "";
        private string e = "";
        private string f = "";
        private string g = "";
        private string h = "";
        private string i = "";
        private string j = "";
        private string k = "";
        private string l = "";
        private string m = "";
        private string n = "";
        private string o = "";
        private string p = "";
        private string q = "";
        private string r = "";
        private string s = "";
        private string t = "";
        private string u = "";
        private string v = "";
        private Random w;
        private f x;
        private SMS y;
        private const int z = 1;

        internal vCard(ref SMS A_0)
        {
            this.y = A_0;
            this.x = this.y.gm;
            this.w = new Random((int) (DateTime.Now.Ticks % 0x7fffffffL));
        }

        private void a()
        {
            if (this.x.ac.Length > 0)
            {
                switch (this.x.ac.ToUpper())
                {
                    case "GENERAL":
                        throw new GeneralException("ERROR " + this.x.z.ToString() + ": " + this.x.y);

                    case "SMSSEND":
                        throw new SMSSendException("ERROR " + this.x.z.ToString() + ": " + this.x.y);

                    case "SMSREAD":
                        throw new SMSReadException("ERROR " + this.x.z.ToString() + ": " + this.x.y);

                    case "SMSDELETE":
                        throw new SMSDeleteException("ERROR " + this.x.z.ToString() + ": " + this.x.y);

                    case "WAPPUSH":
                        throw new WapPushException("ERROR " + this.x.z.ToString() + ": " + this.x.y);

                    case "VCARD":
                        throw new vCardException("ERROR " + this.x.z.ToString() + ": " + this.x.y);

                    case "VCALENDAR":
                        throw new vCalendarException("ERROR " + this.x.z.ToString() + ": " + this.x.y);
                }
            }
        }

        public string Send()
        {
            string str2 = "";
            if (string.Compare(this.x.ah, this.x.b8, true) == 0)
            {
                str2 = this.w.Next(0, 10).ToString();
            }
            mCore.vCard.a a = new mCore.vCard.a(ref this.y, this.a, this.f, this.g, this.h, this.b, this.c, this.d, this.i, this.e, this.j, this.k, this.l, this.m, this.n, this.o, this.p, this.q, this.r, this.s, this.t, this.u, this.v, str2, this.x.bh, this.x.bi);
            Thread thread = new Thread(new ThreadStart(a.b));
            thread.Name = "VCF_SendMethodThread";
            thread.Priority = ThreadPriority.AboveNormal;
            thread.Start();
            while (thread.IsAlive)
            {
                Thread.Sleep(1);
                Application.DoEvents();
            }
            string ad = a.ad;
            if (a != null)
            {
                a = null;
            }
            string str = ad;
            this.a();
            return str;
        }

        public string SendFile(string vCardFile)
        {
            string str2 = "";
            if (string.Compare(this.x.ah, this.x.b8, true) == 0)
            {
                str2 = this.w.Next(0, 10).ToString();
            }
            mCore.vCard.b b = new mCore.vCard.b(ref this.y, vCardFile, this.a, str2, this.x.bh, this.x.bi);
            Thread thread = new Thread(new ThreadStart(b.a));
            thread.Name = "VCF_SendFileMethodThread";
            thread.Priority = ThreadPriority.AboveNormal;
            thread.Start();
            while (thread.IsAlive)
            {
                Thread.Sleep(1);
                Application.DoEvents();
            }
            string i = b.i;
            if (b != null)
            {
                b = null;
            }
            string str = i;
            this.a();
            return str;
        }

        public string SendFileToQueue(string vCardFile)
        {
            string str2 = "";
            if (string.Compare(this.x.ah, this.x.b8, true) == 0)
            {
                str2 = this.w.Next(0, 10).ToString();
            }
            mCore.vCard.b b = new mCore.vCard.b(ref this.y, vCardFile, this.a, str2, this.x.bh, this.x.bi);
            b.j = 2;
            Thread thread = new Thread(new ThreadStart(b.b));
            thread.Name = "VCF_SendFileToQueueMethodThread";
            thread.Priority = ThreadPriority.AboveNormal;
            thread.Start();
            while (thread.IsAlive)
            {
                Thread.Sleep(1);
                Application.DoEvents();
            }
            string k = b.k;
            if (b != null)
            {
                b = null;
            }
            string str = k;
            this.a();
            return str;
        }

        public string SendFileToQueue(string vCardFile, QueuePriority Priority)
        {
            string str2 = "";
            if (string.Compare(this.x.ah, this.x.b8, true) == 0)
            {
                str2 = this.w.Next(0, 10).ToString();
            }
            mCore.vCard.b b = new mCore.vCard.b(ref this.y, vCardFile, this.a, str2, this.x.bh, this.x.bi);
            b.j = (int) Priority;
            Thread thread = new Thread(new ThreadStart(b.b));
            thread.Name = "VCF_SendFileToQueueMethodThread";
            thread.Priority = ThreadPriority.AboveNormal;
            thread.Start();
            while (thread.IsAlive)
            {
                Thread.Sleep(1);
                Application.DoEvents();
            }
            string k = b.k;
            if (b != null)
            {
                b = null;
            }
            string str = k;
            this.a();
            return str;
        }

        public string SendToQueue()
        {
            string str2 = "";
            if (string.Compare(this.x.ah, this.x.b8, true) == 0)
            {
                str2 = this.w.Next(0, 10).ToString();
            }
            mCore.vCard.a a = new mCore.vCard.a(ref this.y, this.a, this.f, this.g, this.h, this.b, this.c, this.d, this.i, this.e, this.j, this.k, this.l, this.m, this.n, this.o, this.p, this.q, this.r, this.s, this.t, this.u, this.v, str2, this.x.bh, this.x.bi);
            a.ab = 2;
            Thread thread = new Thread(new ThreadStart(a.c));
            thread.Name = "VCF_SendToQueueMethodThread";
            thread.Priority = ThreadPriority.AboveNormal;
            thread.Start();
            while (thread.IsAlive)
            {
                Thread.Sleep(1);
                Application.DoEvents();
            }
            string ac = a.ac;
            if (a != null)
            {
                a = null;
            }
            string str = ac;
            this.a();
            return str;
        }

        public string SendToQueue(QueuePriority Priority)
        {
            string str2 = "";
            if (string.Compare(this.x.ah, this.x.b8, true) == 0)
            {
                str2 = this.w.Next(0, 10).ToString();
            }
            mCore.vCard.a a = new mCore.vCard.a(ref this.y, this.a, this.f, this.g, this.h, this.b, this.c, this.d, this.i, this.e, this.j, this.k, this.l, this.m, this.n, this.o, this.p, this.q, this.r, this.s, this.t, this.u, this.v, str2, this.x.bh, this.x.bi);
            a.ab = (int) Priority;
            Thread thread = new Thread(new ThreadStart(a.c));
            thread.Name = "VCF_SendToQueueMethodThread";
            thread.Priority = ThreadPriority.AboveNormal;
            thread.Start();
            while (thread.IsAlive)
            {
                Thread.Sleep(1);
                Application.DoEvents();
            }
            string ac = a.ac;
            if (a != null)
            {
                a = null;
            }
            string str = ac;
            this.a();
            return str;
        }

        public string BusinessAddressCity
        {
            get
            {
                this.x.av();
                return this.r;
            }
            set
            {
                this.x.av();
                if (value == null)
                {
                    value = "";
                }
                this.r = value.Trim();
                if ((value.Trim().Length > 0) & !this.x.h(value))
                {
                    this.r = "";
                    this.x.a(0x1f51L, "Invalid characters in business address city name", "VCARD");
                }
                this.a();
            }
        }

        public string BusinessAddressCountry
        {
            get
            {
                this.x.av();
                return this.u;
            }
            set
            {
                this.x.av();
                if (value == null)
                {
                    value = "";
                }
                this.u = value.Trim();
                if ((value.Trim().Length > 0) & !this.x.h(value))
                {
                    this.u = "";
                    this.x.a(0x1f54L, "Invalid characters in business address country name", "VCARD");
                }
                this.a();
            }
        }

        public string BusinessAddressState
        {
            get
            {
                this.x.av();
                return this.s;
            }
            set
            {
                this.x.av();
                if (value == null)
                {
                    value = "";
                }
                this.s = value.Trim();
                if ((value.Trim().Length > 0) & !this.x.h(value))
                {
                    this.s = "";
                    this.x.a(0x1f52L, "Invalid characters in business address state name", "VCARD");
                }
            }
        }

        public string BusinessAddressStreet
        {
            get
            {
                this.x.av();
                return this.q;
            }
            set
            {
                this.x.av();
                if (value == null)
                {
                    value = "";
                }
                this.q = value.Trim();
                if ((value.Trim().Length > 0) & !this.x.h(value))
                {
                    this.q = "";
                    this.x.a(0x1f50L, "Invalid characters in business street address", "VCARD");
                }
                this.a();
            }
        }

        public string BusinessAddressZIP
        {
            get
            {
                this.x.av();
                return this.t;
            }
            set
            {
                this.x.av();
                if (value == null)
                {
                    value = "";
                }
                this.t = value.Trim();
                if ((value.Trim().Length > 0) & !this.x.h(value))
                {
                    this.t = "";
                    this.x.a(0x1f53L, "Invalid characters in business address ZIP code", "VCARD");
                }
                this.a();
            }
        }

        public string BusinessPhone
        {
            get
            {
                this.x.av();
                return this.c;
            }
            set
            {
                this.x.av();
                if (value == null)
                {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -