FetionSDK基本代码

 
 

//这是09年时的成果,现在FetionSDK.dll已经不能使用。

——————————————————————————————————————————————————————————————————————

//在C#工程中引用FetionSDK.dll 在代码中添加程序集
using NullStudio.Fetion_SDK; //实例化一个飞信对象
FetionSDK sdk = new FetionSDK(); //添加飞信响应事件
sdk.SDK_Error += new FetionSDK.SDK_ErrorEventHandler(sdk_SDK_Error); sdk.SDK_ReceiveMessage += new FetionSDK.SDK_ReceiveMessageEventHandler(sdk_SDK_ReceiveMessage); sdk.SDK_UserSatusChange += new FetionSDK.SDK_UserSatusChangedEventHandler(sdk_SDK_UserSatusChange); //完成事件发生时的代码
void sdk_SDK_Error(object sender, NullStudio.Fetion_SDK.Event.SDK_ErrorEventArgs fe) { //todo
} void sdk_SDK_ReceiveMessage(object sender, NullStudio.Fetion_SDK.Event.SDK_ReceiveMessageEventArgs fe) { //todo
} void sdk_SDK_UserSatusChange(object sender, Imps.Client.Core.UserSatusChangedEventArgs e) { //todo
} //完成飞信登录的代码
sdk.AccountManager.FillUserIdAndPassword(phoneNum/*手机号*/, password/*密码*/, true/*是否自动登录*/); sdk.AccountManager.LoginOrLogout(); //自动判断是注销还是登录 //得到飞信的分组列表
List<Imps.Client.Core.ContactGroup> listGroup = sdk.ContactControl.getContactGroup(); //得到所有飞信好友列表
List<Imps.Client.Core.Contact> listFriend = sdk.ContactControl.getAllContactList();

你可能感兴趣的:(sdk)