예제 #1
0
    def on_btn_filechooser_rules_file_set(self, widget, data=None):
        self.rules_main_team = widget.get_uri().replace("file://", "")

        formacionAsociada = filenames.devolverFormacionAsociada(widget.get_uri())
        self.label_description.set_label(leer_comentario(widget.get_filename()))

        if formacionAsociada != None:
            self.btn_formation.set_uri(formacionAsociada)
            self.formation_main_team = self.btn_formation.get_uri().replace("file://", "")
    def on_file_chooser_es_ia_file_set(self, widget, data=None):
        self.rules_computer = widget.get_uri().replace('file://', '')
        
        formacionAsociada = filenames.devolverFormacionAsociada(widget.get_uri())
        self.label_description.set_label(leer_comentario(widget.get_filename()))

        if formacionAsociada != None:			
            self.file_chooser_team_ia.set_uri(formacionAsociada)
            self.formation_computer = formacionAsociada.replace('file://','')
    def on_file_chooser_es_b_file_set(self, widget, data=None):
        self.es_team_b = widget.get_uri()
        
        formacionAsociada = filenames.devolverFormacionAsociada(widget.get_uri())
        self.label_desc_B.set_label(leer_comentario(widget.get_filename()))

        if formacionAsociada != None:			
            self.file_chooser_team_b.set_uri(formacionAsociada)
            self.team_team_b = formacionAsociada
    def on_file_chooser_es_b_file_set(self, widget, data=None):
        self.es_team_b = widget.get_uri()

        formacionAsociada = filenames.devolverFormacionAsociada(
            widget.get_uri())
        self.label_desc_B.set_label(leer_comentario(widget.get_filename()))

        if formacionAsociada != None:
            self.file_chooser_team_b.set_uri(formacionAsociada)
            self.team_team_b = formacionAsociada
    def on_file_chooser_es_ia_file_set(self, widget, data=None):
        self.rules_computer = widget.get_uri().replace('file://', '')

        formacionAsociada = filenames.devolverFormacionAsociada(
            widget.get_uri())
        self.label_description.set_label(leer_comentario(
            widget.get_filename()))

        if formacionAsociada != None:
            self.file_chooser_team_ia.set_uri(formacionAsociada)
            self.formation_computer = formacionAsociada.replace('file://', '')
예제 #6
0
    def insert_element_list(self):
        s, rules_file_name = os.path.split(self.rules_selected_file)
        s, formation_file_name = os.path.split(self.formation_selected_file)
        self.files[rules_file_name] = self.rules_selected_file
        self.files[formation_file_name] = self.formation_selected_file

        name = filenames.extract_name_expert_system((rules_file_name, formation_file_name))

        if not self.teams.has_key(name):
            self.teams[name] = (self.rules_selected_file, self.formation_selected_file)

            self.list_store.append(
                (name, rules_file_name, formation_file_name, leer_comentario(self.rules_selected_file, wrap=False))
            )
            if len(self.teams) == 2:
                self.start_button.set_sensitive(True)
예제 #7
0
    def insert_element_list(self):
        s, rules_file_name = os.path.split(self.rules_selected_file)
        s, formation_file_name = os.path.split(self.formation_selected_file)
        self.files[rules_file_name] = self.rules_selected_file
        self.files[formation_file_name] = self.formation_selected_file

        name = filenames.extract_name_expert_system(
            (rules_file_name, formation_file_name))

        if not self.teams.has_key(name):
            self.teams[name] = (self.rules_selected_file,
                                self.formation_selected_file)

            self.list_store.append((name, rules_file_name, formation_file_name,
                                    leer_comentario(self.rules_selected_file,
                                                    wrap=False)))
            if len(self.teams) == 2:
                self.start_button.set_sensitive(True)