ProjectController.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:beremiz 作者: nucleron 项目源码 文件源码
def CheckNewProjectPath(self, old_project_path, new_project_path):
        if old_project_path == new_project_path:
            message = (_("Save path is the same as path of a project! \n"))
            dialog = wx.MessageDialog(self.AppFrame, message, _("Error"), wx.OK | wx.ICON_ERROR)
            dialog.ShowModal()
            return False
        else:
            plc_file = os.path.join(new_project_path, "plc.xml")
            if os.path.isfile(plc_file):
                message = (_("Selected directory already contains another project. Overwrite? \n"))
                dialog = wx.MessageDialog(self.AppFrame, message, _("Error"), wx.YES_NO | wx.ICON_ERROR)
                answer = dialog.ShowModal()
                return answer == wx.ID_YES
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号