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

📄 f.cs

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

internal class f : IDisposable
{
    internal o a;
    internal string a0;
    internal string a1;
    internal int a2;
    internal string a3;
    internal string a4;
    internal string a5;
    internal string a6;
    internal long a7;
    internal bool a8;
    internal bool a9;
    internal string aa = "";
    internal long ab;
    internal string ac = "";
    internal string ad;
    internal int ae;
    internal bool af;
    internal bool ag;
    internal string ah;
    internal string ai;
    internal string aj;
    internal long ak;
    internal string al;
    private SerialPort am;
    internal int an;
    private const int ao = 0x19;
    private const int ap = 0x7d;
    private const int aq = 0x19;
    internal int ar;
    internal int @as;
    internal string at;
    internal string au;
    internal bool av;
    internal string aw;
    internal string ax;
    internal string ay;
    internal string az;
    internal License b;
    internal long b0;
    internal string b1;
    internal long b2;
    internal string b3;
    internal long b4;
    internal string b5;
    internal long b6;
    internal string b7;
    internal string b8;
    internal string b9;
    internal string ba;
    internal long bb;
    internal int bc;
    internal int bd;
    internal string be;
    internal string bf;
    internal string bg;
    internal int bh;
    internal bool bi;
    internal bool bj;
    internal bool bk;
    internal int bl;
    internal int bm;
    internal int bn;
    internal int bo;
    internal bool bp;
    internal long bq;
    internal string br;
    internal long bs;
    internal string bt;
    internal long bu;
    internal string bv;
    internal long bw;
    internal string bx;
    internal long by;
    internal string bz;
    internal c c;
    private const string c0 = "23F0";
    private const string c1 = "25";
    private const string c2 = "06";
    private const string c3 = "03AE81EA";
    private const string c4 = "AF";
    private const string c5 = "82";
    private const string c6 = "B484";
    internal const string c7 = "GENERAL";
    internal const string c8 = "SMSSEND";
    internal const string c9 = "SMSREAD";
    internal string ca;
    internal string cb;
    private string cc;
    private string cd;
    private string ce;
    private string cf;
    private string cg;
    private string ch;
    private bool ci;
    internal int cj;
    internal double ck;
    internal DateTime cl;
    internal bool cm;
    internal Collection cn;
    internal Collection co;
    internal Collection cp;
    private string cq;
    internal bool cr;
    internal bool cs;
    internal bool ct;
    internal bool cu;
    internal bool cv;
    private const int cw = 30;
    private const int cx = 0x3e8;
    private const string cy = "05";
    private const string cz = "0B84";
    private bool d = false;
    internal const string da = "SMSDELETE";
    internal const string db = "WAPPUSH";
    internal const string dc = "VCARD";
    internal const string dd = "VCALENDAR";
    private bool de;
    internal static bool e = false;
    internal static a f = null;
    private f.d g;
    private f.b h;
    private f.c i;
    private f.a j;
    private b k;
    private Collection l = new Collection();
    internal j m;
    internal string n = "mCoreLib.dll";
    internal string o = "";
    internal FileVersionInfo p = null;
    internal string q = "";
    internal bool r = false;
    internal bool s = false;
    internal bool t = false;
    internal bool u = false;
    internal bool v = false;
    internal bool w = false;
    internal bool x = false;
    internal string y = "";
    internal long z;

    internal f()
    {
        this.ad = this.l("(S8\"Wz\x0001!y2+w@\"\x001a]77 5~");
        this.af = false;
        this.ag = false;
        this.ah = "";
        this.ai = "";
        this.aj = "";
        this.ak = 0x7530L;
        this.al = "";
        this.a(new SerialPort());
        this.an = 0x3a98;
        this.ar = 150;
        this.@as = 0x493e0;
        this.at = "AT E0 V1 +CMEE=1";
        this.au = "";
        this.av = false;
        this.aw = "SM";
        this.ax = "";
        this.ay = "";
        this.az = "";
        this.a0 = "";
        this.a1 = "";
        this.a2 = -1;
        this.a3 = "";
        this.a4 = "";
        this.a5 = "";
        this.a6 = "";
        this.a7 = 0L;
        this.a8 = false;
        this.a9 = false;
        this.ba = "";
        this.be = "";
        this.bf = "";
        this.bg = "";
        this.bh = 0xa7;
        this.bi = false;
        this.bj = false;
        this.bk = false;
        this.bl = 7;
        this.bm = 3;
        this.bn = 0x3e8;
        this.bo = 1;
        this.bp = true;
        this.bq = 5L;
        this.br = "";
        this.bs = 0L;
        this.bt = "";
        this.bu = 0L;
        this.bv = "";
        this.bw = 0L;
        this.bx = "";
        this.by = 0L;
        this.bz = "";
        this.b0 = 0L;
        this.b1 = "";
        this.b2 = 0L;
        this.b3 = "";
        this.b4 = 0L;
        this.b5 = "";
        this.b6 = 0L;
        this.b7 = DateTime.Now.ToString();
        this.b8 = "";
        this.b9 = "";
        this.ca = "";
        this.cb = "";
        this.cc = "0";
        this.cd = "0";
        this.ce = "0";
        this.cf = "0";
        this.cg = "2";
        this.ch = "ATH";
        this.ci = false;
        this.cj = DateTime.Now.Second;
        this.cl = DateAndTime.Now;
        this.cm = true;
        this.cn = new Collection();
        this.co = new Collection();
        this.cp = new Collection();
        this.cq = "";
        this.cr = false;
        this.cs = false;
        this.ct = false;
        this.cu = false;
        this.cv = false;
        this.de = false;
        try
        {
            this.o = Assembly.GetExecutingAssembly().Location.ToString();
            this.p = FileVersionInfo.GetVersionInfo(this.o);
            this.q = this.o.Substring(0, (this.o.Length - this.n.Length) - 1);
        }
        catch (Exception exception1)
        {
            ProjectData.SetProjectError(exception1);
            Exception exception = exception1;
            this.q = "";
            ProjectData.ClearProjectError();
        }
        this.r().PortName = "COM1";
        this.aj = "";
        this.r().BaudRate = 0x4b00;
        this.r().Parity = System.IO.Ports.Parity.None;
        this.r().DataBits = 8;
        this.r().StopBits = System.IO.Ports.StopBits.One;
        this.r().Handshake = Handshake.None;
        if (this.r().Handshake != Handshake.RequestToSend)
        {
            this.r().RtsEnable = false;
        }
        this.r().DtrEnable = false;
        this.r().ReadBufferSize = 0x1000;
        this.r().WriteBufferSize = 0x400;
        this.r().ReadTimeout = 750;
        this.r().WriteTimeout = 750;
        this.r().ReceivedBytesThreshold = 1;
        this.r().NewLine = "\n";
        this.k = new b();
        this.m = new j();
        this.r().DataReceived += new SerialDataReceivedEventHandler(this.a);
    }

    private void a()
    {
        j m;
        if (Monitor.TryEnter(this.m, this.@as))
        {
            try
            {
                m = this.m;
                m.g++;
            }
            finally
            {
                Monitor.Exit(this.m);
            }
        }
        else
        {
            this.a(0x2333L, "Thread monitor enter attempt timeout [GSM:NewUSSD:A]", "GENERAL");
            this.av();
            return;
        }
        string expression = "";
        int num2 = -1;
        int num = -1;
        string str = "";
        string str3 = "";
        NewUSSDReceivedEventArgs args = null;
        try
        {
            while (this.k.h.Count > 0)
            {
                expression = "";
                num2 = -1;
                num = -1;
                str = "";
                str3 = "";
                if (args != null)
                {
                    args = null;
                }
                if (Monitor.TryEnter(this.l, this.@as))
                {
                    try
                    {
                        if (this.k.h.Count <= 0)
                        {
                            return;
                        }
                        expression = this.k.h[1].ToString();
                        this.k.h.Remove(1);
                    }
                    catch (Exception exception1)
                    {
                        ProjectData.SetProjectError(exception1);
                        Exception exception = exception1;
                        ProjectData.ClearProjectError();
                    }
                    finally
                    {
                        Monitor.Exit(this.l);
                    }
                }
                else
                {
                    this.a(0x2333L, "Thread monitor enter attempt timeout [GSM:NewUSSD:B]", "GENERAL");
                    this.av();
                    return;
                }
                this.a.b("Recv: " + expression);
                try
                {
                    string[] strArray = Strings.Split(expression, "+CUSD:", -1, CompareMethod.Binary);
                    if (strArray.GetUpperBound(0) <= 0)
                    {
                        continue;
                    }
                    strArray = Strings.Split(strArray[1], ",", -1, CompareMethod.Binary);
                    num2 = Conversions.ToInteger(strArray[0]);
                    int num4 = strArray.GetUpperBound(0) - 1;
                    for (int i = 1; i <= num4; i++)
                    {
                        str = str + strArray[i];
                    }
                    str = Strings.Mid(str, 2, str.Length - 2);
                    num = Conversions.ToInteger(strArray[strArray.GetUpperBound(0)]);
                    if ((num != 15) & (num != 0))
                    {

⌨️ 快捷键说明

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