コード例 #1
0
 def SetDelegationDict(self, date, delegation, name, assistant,
                       delegateClass):
     delegationDict = dict()
     delegationDict[Delegation.DictDate()] = StringUtil.ClearSpace(date)
     delegationDict[Delegation.DictDelegate()] = StringUtil.ClearSpace(
         delegation)
     delegationDict[Delegation.DcitName()] = StringUtil.ClearSpace(name)
     delegationDict[Delegation.DictAssistant()] = StringUtil.ClearSpace(
         assistant)
     delegationDict[Delegation.DictClass()] = delegateClass
     print(delegationDict)
     return delegationDict
コード例 #2
0
 def SetJpOverlay(self, delegationDict, cv):
     if delegationDict[Delegation.DcitName()]!=None:
         cv.drawString(40, 263, delegationDict[Delegation.DcitName()].replace(self.jpStr, ""))
     if delegationDict[Delegation.DictDate()]!=None and delegationDict[Delegation.DictDelegate()]!=None:
         cv.drawString(40, 220, delegationDict[Delegation.DictDate()] + " - " + delegationDict[Delegation.DictDelegate()])
     if delegationDict[Delegation.DictAssistant()]!=None:
         cv.drawString(40, 240, delegationDict[Delegation.DictAssistant()])
     self.SetJpDelegationOverlay(delegationDict, cv)
     self.SetJpClassOverlay(delegationDict, cv)
     cv.save()
コード例 #3
0
 def SetChineseOverlay(self, delegationDict, cv):
     if delegationDict[Delegation.DcitName()]!=None:
         cv.drawString(40, 280, delegationDict[Delegation.DcitName()].replace(self.jpStr, ""))
     if delegationDict[Delegation.DictDate()]!=None and delegationDict[Delegation.DictDelegate()]!=None:
         cv.drawString(40, 230, delegationDict[Delegation.DictDate()] + " - " + delegationDict[Delegation.DictDelegate()])
     if delegationDict[Delegation.DictAssistant()]!=None:
         cv.drawString(40, 255, delegationDict[Delegation.DictAssistant()])
     self.SetChineseDelegationOverlay(delegationDict, cv)
     self.SetChineseClassOverlay(delegationDict, cv)
     cv.save()
コード例 #4
0
 def SetJpDelegationOverlay(self, delegationDict, cv):
     if delegationDict[Delegation.DictDelegate()].find(DelegationType.Reading())>=0:
         cv.drawString(19, 158, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.InitialCall())>=0:
         cv.drawString(19, 147, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.FirstRV())>=0:
         cv.drawString(19, 134, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.SecondRV())>=0:
         cv.drawString(19, 122, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.BibleStudy())>=0:
         cv.drawString(135, 147, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.BibleStudy2())>=0:
         cv.drawString(135, 147, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.Talk())>=0:
         cv.drawString(135, 134, "V")
     #續訪判斷放最後面
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.FirstRV2())>=0:
         cv.drawString(19, 134, "V")
     else:
         print("SetDelegationOverlay else")
コード例 #5
0
 def SetChineseDelegationOverlay(self, delegationDict, cv):
     if delegationDict[Delegation.DictDelegate()].find(DelegationType.Reading())>=0:
         cv.drawString(15, 190, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.InitialCall())>=0:
         cv.drawString(15, 175, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.FirstRV())>=0:
         cv.drawString(15, 160, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.SecondRV())>=0:
         cv.drawString(15, 150, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.BibleStudy())>=0:
         cv.drawString(110, 190, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.BibleStudy2())>=0:
         cv.drawString(110, 190, "V")
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.Talk())>=0:
         cv.drawString(110, 175, "V")
     #續訪判斷放最後面
     elif delegationDict[Delegation.DictDelegate()].find(DelegationType.FirstRV2())>=0:
         cv.drawString(15, 160, "V")
     else:
         print("SetDelegationOverlay else")
コード例 #6
0
 def SetJpClassOverlay(self, delegationDict, cv):
     if delegationDict[Delegation.DictClass()]==1:
         cv.drawString(19, 97, "V")
     else:
         cv.drawString(19, 85, "V")
コード例 #7
0
 def SetChineseClassOverlay(self, delegationDict, cv):
     if delegationDict[Delegation.DictClass()]==1:
         cv.drawString(15, 120, "V")
     else:
         cv.drawString(15, 105, "V")
コード例 #8
0
 def SetOverlay(self, delegationDict, cv):
     if delegationDict[Delegation.DcitName()].find(self.jpStr)>=0:
         self.SetJpOverlay(delegationDict, cv)
     else:
         self.SetChineseOverlay(delegationDict, cv)
コード例 #9
0
 def GetOutputPdfName(self, delegationDict):
     if delegationDict[Delegation.DcitName()].find(self.jpStr)>=0:
         return self.outputPath + "\\" + self.description + self.jpDescription + delegationDict[Delegation.DcitName()].replace(self.jpStr, "") + ".pdf"
     else:
         return self.outputPath + "\\" + self.description + delegationDict[Delegation.DcitName()] + ".pdf"
コード例 #10
0
 def WhichS89(self, delegationDict):
     if delegationDict[Delegation.DcitName()].find(self.jpStr)>=0:
         return Constant.GetS89J()
     else:
         return Constant.GetS89CH()