コード例 #1
0
 def __init__(self, heading, line1='', line2='', line3='', active=True, countdown=60, interval=5):
     self.heading = heading
     self.countdown = countdown
     self.interval = interval
     self.line1 = line1
     self.line2 = line2
     self.line3 = line3
     if active:
         if xbmc.getCondVisibility('Window.IsVisible(progressdialog)'):
             pd = CustomProgressDialog.ProgressDialog()
         else:
             pd = xbmcgui.DialogProgress()
         if not self.line3:
             line3 = 'Expires in: %s seconds' % countdown
         if six.PY2:
             pd.create(self.heading, line1, line2, line3)
         else:
             pd.create(self.heading,
                       line1 + '\n'
                       + line2 + '\n'
                       + line3)
         pd.update(100)
         self.pd = pd
     else:
         self.pd = None
コード例 #2
0
 def __create_dialog(self, line1, line2, line3):
     if self.background:
         pd = xbmcgui.DialogProgressBG()
         msg = line1 + line2 + line3
         pd.create(self.heading, msg)
     else:
         if xbmc.getCondVisibility('Window.IsVisible(progressdialog)'):
             pd = CustomProgressDialog.ProgressDialog()
         else:
             pd = xbmcgui.DialogProgress()
         if six.PY2:
             pd.create(self.heading, line1, line2, line3)
         else:
             pd.create(self.heading, line1 + '\n' + line2 + '\n' + line3)
     return pd