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

转载于:https://www.cnblogs.com/duwamish/archive/2009/06/29/1513212.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值