def delete_Season( self, season_index ): #experiment_number is the index of the list of seasons #A windows must pop up asking for confirmation yesorno = msgbox.Message_Popup( "YesorNo", "Delete Season", "Are you sure you want to delete the season(s): {} from project: {}" .format(season_index, self.project_name)) if yesorno.response == "Yes": del self.seasons[season_index] else: msgbox.Message_Popup("Info", "Delete Season", "None season will be deleted")
def delete_Experiment( self, exp_index ): #experiment_number is the index of the list of experiments #a windows must pop up asking for confimration yesorno = msgbox.Message_Popup( "YesorNo", "Delete Experiment", "Are you sure you want to delete the Experiment(s): {} from season: {}" .format(exp_index, self.season_name)) if yesorno.response == "Yes": del self.experiments[exp_index] else: msgbox.Message_Popup("Info", "Delete Experiment", "None experiment will be deleted")
def transfer_Season(self, to_project, season_index_list): #a windows must pop up asking for confimration season_index_list.sort() yesorno = msgbox.Message_Popup( "YesorNo", "Transfer Season", "Are you sure you want to transer the season(s):{} from project:{} to project:{} " .format(season_index_list, self.project_name, to_project.project_name)) if yesorno.response == "Yes": #seasons_selected=[self.seasons[i] for i in season_index_list] j = 0 for i in season_index_list: to_project.seasons.append( self.seasons[i]) #insert the seasons in the other project for i in season_index_list: del self.seasons[ i - j] #deletes the seasons from the actual project j += 1 else: msgbox.Message_Popup("Info", "Delete Season", "None season will be transfered")
def transfer_Experiment(self, to_season, Exp_index_list): #a windows must pop up asking for confimration Exp_index_list.sort() yesorno = msgbox.Message_Popup( "YesorNo", "Transfer Experiment", "Are you sure you want to transfer the Experiment(s):{} from season:{} to season:{}" .format(Exp_index_list, self.season_name, to_season.season_name)) #seasons_selected=[self.seasons[i] for i in season_index_list] if yesorno.response == "Yes": j = 0 for i in Exp_index_list: to_season.experiments.append( self.experiments[i] ) #insert the experiment(s) into the other project for i in Exp_index_list: del self.experiments[ i - j] #deletes the experiment(s) from the actual project j += 1 else: msgbox.Message_Popup("Info", "Delete Experiment", "None experiment will be deleted")