当前位置: 首页>>代码示例>>Python>>正文


Python Gui.getScrumListFromScrumForm方法代码示例

本文整理汇总了Python中Gui.getScrumListFromScrumForm方法的典型用法代码示例。如果您正苦于以下问题:Python Gui.getScrumListFromScrumForm方法的具体用法?Python Gui.getScrumListFromScrumForm怎么用?Python Gui.getScrumListFromScrumForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gui的用法示例。


在下文中一共展示了Gui.getScrumListFromScrumForm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import Gui [as 别名]
# 或者: from Gui import getScrumListFromScrumForm [as 别名]
class Client:
    def __init__(self):
        self.server = xmlrpclib.ServerProxy('http://localhost:8006')
        self.gui = Gui(self)
        self.currentProject = None
        
    def start(self):
        self.gui.showMainMenu()
        self.gui.root.mainloop()
        
    def createNewProject(self,projectName):
        self.currentProject = Project(projectName)
        
    def loadProject(self,projectName):
        serializedProject = self.server.requestProjectLoad(projectName)
        if serializedProject == -1:
            #Project not found, create one
            self.createNewProject(projectName)
        else:
            self.currentProject = pickle.loads(serializedProject)
    
    def tryLoadTextFileIntoProject(self):
        if self.currentProject != None:
            self.currentProject.text = self.gui.getFileContentFromDialog("Ouvrir un fichier texte","Text file","*.txt")
        else:
            self.gui.loadProject()
            #self.gui.showMessage("Erreur","Vous devez charger ou créer un projet avant de charger le texte de l'analyse textuelle")

    def tryPerformTextAnalysis(self, howManyTry = 0):
        if self.currentProject != None and self.currentProject.text != None:
            text = self.currentProject.text
            sortedWords = self.currentProject.sortedWords
            self.currentProject.sortedWords = self.gui.getSortedWordsFromTextAnalysisForm(self.currentProject.name,text, sortedWords)             
        elif self.currentProject != None and howManyTry == 0:
            self.tryLoadTextFileIntoProject()
            self.tryPerformTextAnalysis(1)
        elif self.currentProject != None and howManyTry == 1:
            self.gui.showMessage("Erreur","Vous devez charger le texte pour faire l'analyse textuelle")
        else:
            self.gui.loadProject()
            self.tryPerformTextAnalysis()
            #self.gui.showMessage("Erreur","Vous devez charger ou créer un projet avant de faire l'analyse textuelle")

    def tryEditUseCases(self):
        if self.currentProject != None:
            useCaseList = self.currentProject.useCaseList
            sortedWords = self.currentProject.sortedWords
            self.currentProject.useCaseList = self.gui.getUseCaseListFromUseCaseForm(self.currentProject.name,useCaseList,sortedWords)
        else:
            self.gui.loadProject()
            self.tryEditUseCases()

    def tryEditCrcs(self):
        if self.currentProject != None:
            crcList = self.currentProject.crcList
            sortedWords = self.currentProject.sortedWords
            self.currentProject.crcList = self.gui.getCrcListFromCrcForm(self.currentProject.name,crcList,sortedWords)
        pass
    
    def tryEditScrums(self):
        if self.currentProject != None:
            scrumList = self.currentProject.scrumList
            sortedWords = self.currentProject.sortedWords
            self.currentProject.scrumList = self.gui.getScrumListFromScrumForm(self.currentProject.name,scrumList,sortedWords, self.currentProject.sprintList)
        pass
    
    def tryEditSprints(self):
        if self.currentProject != None:
            sprintList = self.currentProject.sprintList
            sortedWords = self.currentProject.sortedWords
            self.currentProject.sprintList = self.gui.getSprintListFromSprintForm(self.currentProject.name, self.currentProject.sprintList,sortedWords)
    
    def tryShowTreeView(self):
        if self.currentProject == None:
            self.gui.showMessage("Erreur","Vous devez charger un projet")
        else:
            self.gui.showTreeView(self.currentProject, self)
    
    def saveCurrentProject(self):
        if self.currentProject != None:
            serializedProject = pickle.dumps(self.currentProject)
            self.server.sendProject(serializedProject)
        else:
           self.gui.showMessage("Erreur","Vous devez créer ou charger un projet pour le sauvegarder")
    
    def getProjectNameList(self):
        projectNameList = self.server.getProjectNameList()
        return pickle.loads(projectNameList)
开发者ID:udovisdevoh,项目名称:superzebre,代码行数:90,代码来源:Client.py


注:本文中的Gui.getScrumListFromScrumForm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。