• feixin


       #region
                //static object sdk;
                //static Assembly asm;
                //[STAThread]
                //static void Main(string[] args)
                //{
                //    // 载入程序集
                //    //asm = Assembly.LoadFrom(@"Fetion SDK.dll");
                //    asm=Assembly.LoadFrom(@"D:\work\Fetion SDK.dll"); 

                //    // 获取Fetion SDK的类型
                //    Type type = Invoker.GetType(asm, "com.hetaoos.FetionSDK.FetionSDK");
                //    // 实例化sdk
                //    sdk = Invoker.CreateInstance(type);
                //    // 获取账号管理的属性
                //    object accountManager = Invoker.GetProperty(sdk, "AccountManager");
                //    // 设置用户名和密码
                //    Invoker.CallMethod(accountManager, "FillUserIdAndPassword", new object[] { "13661766147", "gongyi", false });
                //    // 监听事件
                //    Invoker.AddEventHandler(sdk, "SDK_UserSatusChange", Invoker.GetMethod(typeof(Program), "sdk_SDK_UserSatusChange"), null);
                //    // 调用登录方法
                //    Invoker.CallMethod(accountManager, "Login");
                //}
                //static void Hello()
                //{
                //    Console.WriteLine("hello in Hello");
                //}

                //static void sdk_SDK_UserSatusChange(object sender, EventArgs e)
                //{

                //    Console.WriteLine(Invoker.GetProperty(e, "NewStatus"));
                //    Console.WriteLine(Invoker.GetSaticField(Invoker.GetType(asm, "Imps.Client.UserAccountStatus"), "Logon"));
                //    // 这里用==不好使,要用Equals,不知道为什么
                //    if (Invoker.GetProperty(e, "NewStatus").Equals(Invoker.GetSaticField(Invoker.GetType(asm, "Imps.Client.UserAccountStatus"), "Logon")))
                //    {
                //        Console.WriteLine("hello");
                //        object contactControl = Invoker.GetProperty(sdk, "ContactControl");
                //        object sendSMS = Invoker.GetProperty(contactControl, "SendSMS");
                //        Invoker.CallMethod(sendSMS, "SendSMS", "13297093329", "hello, a test");
                //    }
                //}


                #endregion
  • 相关阅读:
    Fast AutoAugment阅读笔记
    object as point阅读笔记
    Hardware-in-the-loop End-to-end Optimization of Camera Image Processing Pipelines阅读笔记
    TP框架使用命令行
    shopee常见的刊登报错问题
    TP执行队列的命令
    正则匹配手机号码
    时间格式化转换
    使用fixed定位将元素(如按钮)悬浮在页面底部
    LNMP一键安装教程
  • 原文地址:https://www.cnblogs.com/duwamish/p/1513212.html
Copyright © 2020-2023  润新知