def show_error_box(self, prev_dialog, msg): print("에러 박스 표시") main_window = self.__init_ui.main_window main_window.setEnabled(False) self.__error_Dialog = dialog.Dialog_Modified(prev_dialog) self.__error_ui = error.Ui_Dialog(self, prev_dialog) self.__error_ui.setupUi(self.__error_Dialog) self.__error_ui.error_label.setText(msg) self.__error_Dialog.show()
def choice_game_btn_clicked_connect(self): print("경기 선택") self.__dialog.setEnabled(False) choice_idx = self.__idx[self.game_table.currentRow()] if (self.__game_manager.game_list[choice_idx].proceeding == False): self.__bet_select_horse_Dialog = dialog.Dialog_Modified( self.__dialog) self.__bet_select_horse_ui = bet_select_horse.Ui_Dialog( self.__member, self.__init_ui, choice_idx) self.__bet_select_horse_ui.game_manager = self.__game_manager self.__bet_select_horse_ui.setupUi(self.__bet_select_horse_Dialog) self.__bet_select_horse_Dialog.show() else: self.__error_Dialog = dialog.Dialog_Modified(self.__dialog) self.__error_ui = error.Ui_Dialog(self, self.__dialog) self.__error_ui.setupUi(self.__error_Dialog) self.__error_ui.error_label.setText("종료된 경기입니다.") self.__error_Dialog.show()
def betting_btn_clicked(self): print("베팅 버튼 클릭") game = self.__game_manager.game_list[self.__idx] choice_idx = self.horse_table.currentRow() bet_point = self.input_point.text() pw = self.input_pw.text() horse_name = game.horses[choice_idx].name game_id = game.id if (game.proceeding == False): self.__member.bet(bet_point, pw, game_id, horse_name, self.__dialog) else: main_window = self.__init_ui.main_window main_window.setEnabled(False) self.__error_Dialog = dialog.Dialog_Modified(self.__dialog) self.__error_ui = error.Ui_Dialog(self, self.__dialog) self.__error_ui.setupUi(self.__error_Dialog) self.__error_ui.error_label.setText("종료된 경기입니다.") self.__error_Dialog.show() self.__dialog.close()