2010-02-08 38 views
0

我剛開始建設使用「XihSolutions.DotMSN.dll」版本的應用程序:2.0.0.40909,DOTMsn不點火的SingedIn事件

我的問題是,它不點火的「Nameserver_SignedIn」事件。不知道我是否做錯了什麼。 你的幫助將會非常有幫助。

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(); 

    } 

回答