public async void connected(SessionHelper session) { // If the session has been reassigned avoid the // spurious callback. if (session != _session) { return; } Ice.Object servant = new ChatCallbackI(this); ChatCallbackPrx callback = Demo.ChatCallbackPrxHelper.uncheckedCast(_session.addWithUUID(servant)); _chat = ChatSessionPrxHelper.uncheckedCast(_session.session()); try { await _chat.setCallbackAsync(callback); closeCancelDialog(); input.IsEnabled = true; status.Content = "Connected with " + _loginData.routerHost; } catch (Exception) { 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 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 async void connected(SessionHelper session) { // If the session has been reassigned avoid the // spurious callback. if(session != _session) { return; } Ice.Object servant = new ChatCallbackI(this); ChatCallbackPrx callback = Demo.ChatCallbackPrxHelper.uncheckedCast(_session.addWithUUID(servant)); _chat = ChatSessionPrxHelper.uncheckedCast(_session.session()); try { await _chat.setCallbackAsync(callback); closeCancelDialog(); input.IsEnabled = true; status.Content = "Connected with " + _loginData.routerHost; } catch(Exception) { if(_session != null) { _session.destroy(); } } }