Ejemplo n.º 1
0
 def Load(self, node):
     ContractEntrySearch.Load(self, node)
     c = node.contract
     p = c.price
     self.sr.locationLabel.text = self.GetLocationText(
         c.startSolarSystemID, c.startRegionID, c.startStationID)
     if p == 0 and c.reward > 0:
         txt = '<color=0xff999999>-%s</color>' % FmtISKWithDescription(
             c.reward, True)
     else:
         txt = '<color=white>%s</color>' % FmtISKWithDescription(p, True)
     self.sr.priceLabel.SetText(txt)
     if localization.GetByLabel('UI/Contracts/ContractEntry/WantToBuy'
                                ) not in self.sr.contractLabel.text:
         if len([e for e in node.contractItems if not e.inCrate]) >= 1:
             self.sr.priceLabel.text += '<br>[%s]' % localization.GetByLabel(
                 'UI/Generic/Items')
     if c.type == const.conTypeAuction:
         self.sr.priceLabel.text = '<color=white>%s</color>' % FmtISKWithDescription(
             GetCurrentBid(c, node.bids), True)
         if c.collateral:
             self.sr.priceLabel.text += '<br>(%s)' % FmtISKWithDescription(
                 c.collateral, True)
         else:
             self.sr.priceLabel.text += '<br>(%s)' % localization.GetByLabel(
                 'UI/Contracts/ContractEntry/NoBuyoutPrice')
     self.sr.issuerLabel.text = node.issuer
     self.sr.createdLabel.text = '%s' % util.FmtDate(node.dateIssued, 'ss')
     self.sr.infoLabel.text = c.title
Ejemplo n.º 2
0
 def Load(self, node):
     ContractEntrySearch.Load(self, node)
     c = node.contract
     self.sr.locationLabel.text = self.GetLocationText(
         c.startSolarSystemID, c.startRegionID, c.startStationID)
     self.sr.currentBidLabel.text = '<color=white>%s</color>' % FmtISKWithDescription(
         GetCurrentBid(c, node.bids), True)
     self.sr.buyoutLabel.text = '%s' % [
         '<color=0xff999999>' +
         localization.GetByLabel('UI/Contracts/ContractEntry/NoneParen') +
         '</color>', '<color=white>' +
         FmtISKWithDescription(c.collateral, True) + '</color>'
     ][c.collateral > 0]
     self.sr.bidsLabel.text = '%s' % node.searchresult.numBids
     self.sr.issuerLabel.text = node.issuer
     self.sr.createdLabel.text = '%s' % util.FmtDate(node.dateIssued, 'ss')
     self.sr.infoLabel.text = c.title