private void clientLogoff_Click(object obj) { ClientNotificationClient clientNotify = new ClientNotificationClient("NetNamedPipeBinding_IClientNotification"); clientNotify.setCommand(new CommandData { Command = Commands.AccountLogout, CounterNumber = obj.ToString() }); clientNotify.Close(); }