Ejemplo n.º 1
0
 public static void Dispose()
 {
     if (_client.State == ClientState.SignedIn)
     {
         _client.BeginSignOut(EndSignout, _client);
     }
     else
     {
         _client.BeginShutdown(EndShutdown, _client);
     }
 }
        //SignOut callback method
        // Called asynchronously by client instance after Signout()
        private void SignOutCallback(IAsyncResult ar)
        {
            MessageBox.Show("SignOutCallback method");
            _Client.EndSignOut(ar);

            _Client.ConversationManager.ConversationAdded -= new EventHandler <ConversationManagerEventArgs>(_SignIn._SendMessage.ConversationManager_ConversationAdded);

            if (_Client.InSuppressedMode == true)
            {
                if (_Client.State == ClientState.SignedOut)
                {
                    _Client.BeginShutdown(ShutDownCallback, null);
                    MessageBox.Show("BeginShutdown method");
                }
            }
        }
Ejemplo n.º 3
0
 private void button2_Click(object sender, RoutedEventArgs e)
 {
     Log("BeginShutdown client");
     lyncClient.BeginShutdown(ShutdownCallback, null);
 }