def onSendBtn(self, event): user = appSettings.userID nickname = appSettings.nickname msgToSend = self.msgText.GetValue() if msgToSend: sendMessageToServer(self, 'sendMsg', ChatMsg(user, nickname, msgToSend)) self.msgText.SetValue("") event.Skip()
def onCollectBtn(self, event): if self.productNbr.GetValue(): productID = self.productList.GetSelection() productQty = int(self.productNbr.GetValue()) collectMsg = CollectMsg(productID, productQty) self.productNbr.SetValue(0) if productQty: sendMessageToServer(self, 'productAdd', collectMsg) event.Skip()
def onPingBtn(self, event): sendMessageToServer(self, 'pingAll', True) event.Skip()
def onPingUser03Btn(self, event): sendMessageToServer(self, 'pingUser', "user03") event.Skip()
def onCnxBtn03(self, event): userCnx = "user03" appSettings.userID = userCnx sendMessageToServer(self, 'userCnx', UserCnx(userCnx, userCnx)) event.Skip()
def onMenuQuit(self, event): sendMessageToServer(self, 'userQuit', True) event.Skip()