DOTMsn 未触发 SingedIn 事件

发布于 2024-08-20 19:02:47 字数 1275 浏览 9 评论 0原文

我刚刚开始使用“XihSolutions.DotMSN.dll”版本构建一个应用程序:2.0.0.40909,

我的问题是它没有触发“Nameserver_SignedIn”事件。不确定我是否做错了什么。 你的帮助将会非常有帮助。

void Nameserver_SignedIn(对象发送者,EventArgs e) { 抛出新的异常(“用户已登录”); }

    private string message = string.Empty;
    void NameserverProcessor_ConnectionEstablished(object sender, EventArgs e)
    {

        message = "Connected";
        SetMessage();

    }

    void SetMessage()
    {
        if (tbMessage.InvokeRequired)
           tbMessage. Invoke(new ThreadStart(SetMessage));
        else
        tbMessage.Text += Environment.NewLine+ message; 
    }

    private void btnSingIn_Click(object sender, EventArgs e)
    {
        if (messenger.Connected)
        {
           // SetStatus("Disconnecting from server");
            messenger.Disconnect();
        }

        // set the credentials, this is ofcourse something every DotMSN program will need to
        // implement.
        messenger.Credentials.Account = tbUserName.Text;
        messenger.Credentials.Password = tbPwd.Text;

        // inform the user what is happening and try to connecto to the messenger network.                
        //SetStatus("Connecting to server");
        messenger.Connect();

    }

I have just started building a app using “XihSolutions.DotMSN.dll” version: 2.0.0.40909,

My problem is that it is not firing the “Nameserver_SignedIn” event. Not sure if I am doing something wrong.
your help will be really helpful.

void Nameserver_SignedIn(object sender, EventArgs e)
{
throw new Exception("User Signed In");
}

    private string message = string.Empty;
    void NameserverProcessor_ConnectionEstablished(object sender, EventArgs e)
    {

        message = "Connected";
        SetMessage();

    }

    void SetMessage()
    {
        if (tbMessage.InvokeRequired)
           tbMessage. Invoke(new ThreadStart(SetMessage));
        else
        tbMessage.Text += Environment.NewLine+ message; 
    }

    private void btnSingIn_Click(object sender, EventArgs e)
    {
        if (messenger.Connected)
        {
           // SetStatus("Disconnecting from server");
            messenger.Disconnect();
        }

        // set the credentials, this is ofcourse something every DotMSN program will need to
        // implement.
        messenger.Credentials.Account = tbUserName.Text;
        messenger.Credentials.Password = tbPwd.Text;

        // inform the user what is happening and try to connecto to the messenger network.                
        //SetStatus("Connecting to server");
        messenger.Connect();

    }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦醒灬来后我 2024-08-27 19:02:47

您可以改用 MSNPSharp - DotMSN 很旧,可能不支持当前的 MSN 协议。链接在这里:

http://code.google.com/p/msnp-sharp/

You might use MSNPSharp instead - DotMSN is old and may not support the current MSN protocol. There link is here:

http://code.google.com/p/msnp-sharp/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文