public void connected(SessionHelper session) { // If the session has been reassigned avoid the // spurious callback. if (session != _session) { return; } Ice.Object servant = new ChatCallbackI(this); Demo.ChatCallbackPrx callback = Demo.ChatCallbackPrxHelper.uncheckedCast(_session.addWithUUID(servant)); _chat = Demo.ChatSessionPrxHelper.uncheckedCast(_session.session()); _chat.begin_setCallback(callback).whenCompleted(delegate() { closeCancelDialog(); input.IsEnabled = true; status.Content = "Connected with " + _loginData.routerHost; }, delegate(Ice.Exception ex) { if (_session != null) { _session.destroy(); } }); }
public void disconnected(SessionHelper session) { // If the session has been reassigned avoid the // spurious callback. if (session != _session) { return; } closeCancelDialog(); _session = null; _chat = null; input.IsEnabled = false; status.Content = "Not connected"; }
public void connected(SessionHelper session) { // If the session has been reassigned avoid the // spurious callback. if(session != _session) { return; } Ice.Object servant = new ChatCallbackI(this); Demo.ChatCallbackPrx callback = Demo.ChatCallbackPrxHelper.uncheckedCast(_session.addWithUUID(servant)); _chat = Demo.ChatSessionPrxHelper.uncheckedCast(_session.session()); _chat.begin_setCallback(callback).whenCompleted(delegate() { closeCancelDialog(); input.IsEnabled = true; status.Content = "Connected with " + _loginData.routerHost; }, delegate(Ice.Exception ex) { if(_session != null) { _session.destroy(); } }); }
public void disconnected(SessionHelper session) { // If the session has been reassigned avoid the // spurious callback. if(session != _session) { return; } closeCancelDialog(); _session = null; _chat = null; input.IsEnabled = false; status.Content = "Not connected"; }