def tbChonTu_click(self):
        dialogKey = Ui_Dialog(server.numClientLeft)
        value = dialogKey.exec_()
        if value:
            self.tbChonTu.setText(value)
        if self.rbTuTrai.isChecked():
            firstName = 'Left_'
        else:
            firstName = 'Right_'

        if self.tbChonTu.text(
        ) == '0':  #neu bang khong thi luc chong ket cac tu la nhu nhau
            if firstName[0] == 'L' and server.numClientLeft > 0:
                self.tbLCKHienTai.setText(
                    str(int(server.dataSent2Client["Left_1"].dt2Pi2Ar[4])))
            elif firstName[0] == 'R' and server.numClientRight > 0:
                self.tbLCKHienTai.setText(
                    str(int(server.dataSent2Client["Right_1"].dt2Pi2Ar[4])))
            else:
                self.tbLCKHienTai.setText('0')
        else:
            self.tbLCKHienTai.setText(
                str(
                    int(server.dataSent2Client[
                        firstName + self.tbChonTu.text()].dt2Pi2Ar[4])))
Example #2
0
    def tbNumTu_click(self):
        numMaxLeft = server.numClientLeft + server.numClientRight + 1

        dialogKey = Ui_Dialog(numMaxLeft)

        value = dialogKey.exec_()
        if value:
            self.tbNumTu.setText(value)
    def tbInput_click(self):
        dialogKey = Ui_Dialog(31)
        value = dialogKey.exec_()
        if value:
            if int(value) < 16:
                self.tbInput.setText("16")

            self.tbInput.setText(value)
        self.tbInput.setStyleSheet(
            "background-color: #b6ffb2")  #b6ffb2  #81D4FA
Example #4
0
 def btMoTu_click(self):
     #chong doi phim
     if (self.btClickTimer):
         return
     else:
         self.buttonTimer()
     maxTu = server.numClientLeft + server.numClientRight + 1
     dialogKey = Ui_Dialog(maxTu)
     value = dialogKey.exec_()
     if value:
         nameTu = server.serverMain.getNameOfTu(int(value))
         if nameTu[0] == 'H':
             return
         server.tuTraiPhai = nameTu[0]
         if server.isWaiting == 2:
             server.dongMoTuFunction(2, nameTu)
         elif server.isWaiting == 0:
             server.dongMoTuFunction(1, nameTu)
Example #5
0
 def tbYear_click(self):
     dialogKey = Ui_Dialog(3000)
     value = dialogKey.exec_()
     if value:
         self.tbYear.setText(value)
Example #6
0
 def tbMonth_click(self):
     dialogKey = Ui_Dialog(12)
     value = dialogKey.exec_()
     if value:
         self.tbMonth.setText(value)
Example #7
0
 def tbDay_click(self):
     dialogKey = Ui_Dialog(31)
     value = dialogKey.exec_()
     if value:
         self.tbDay.setText(value)
Example #8
0
 def tbKCCaiDat_click(self):
     dialogKey = Ui_Dialog(10)
     value = dialogKey.exec_()
     if value:
         self.tbKCCaiDat.setText(value)
Example #9
0
 def btSecond_click(self):
     dialogKey = Ui_Dialog(60)
     value = dialogKey.exec_()
     if value:
         self.tbSecond.setText(value)
Example #10
0
 def btPhut_click(self):
     dialogKey = Ui_Dialog(60)
     value = dialogKey.exec_()
     if value:
         self.tbPhut.setText(value)
Example #11
0
 def btGio_click(self):
     dialogKey = Ui_Dialog(24)
     value = dialogKey.exec_()
     if value:
         self.tbGio.setText(value)
Example #12
0
 def tbGio_click(self):
     dialogKey = Ui_Dialog(24)
     value = dialogKey.exec_()
     if value:
         self.tbGio.setText(value)
         self.timeSplit[0] = str(value)
Example #13
0
 def tbTimes_click(self):
     dialogKey = Ui_Dialog(60)
     value = dialogKey.exec_()
     if value:
         self.tbTimes.setText(value)
         self.timeSplit[2] = str(value)
Example #14
0
 def tbPhut_click(self):
     dialogKey = Ui_Dialog(60)
     value = dialogKey.exec_()
     if value:
         self.tbPhut.setText(value)
         self.timeSplit[1] = str(value)
 def tbHumiTo_click(self):
     dialogKey = Ui_Dialog(100)
     value = dialogKey.exec_()
     if value:
         self.tbHumiTo.setText(value)
 def tbTempFrom_click(self):
     dialogKey = Ui_Dialog(60)
     value = dialogKey.exec_()
     if value:
         self.tbTempFrom.setText(value)