def layout(self, status):
        # logo
        self.SetIcon(logo.get_icon())

        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 0), size=(300, -1), style=wx.ALL | wx.EXPAND)

        # Account + Password
        wx.StaticText(parent=self.panel, id=-1, label="Account:", pos=(25, 19), size=(60, 30))
        self.account = wx.TextCtrl(parent=self.panel, id=-1, value="", pos=(90, 15), size=(180, 30))

        wx.StaticText(parent=self.panel, id=-1, label="Password:"******"", pos=(90, 50), size=(180, 30), style=wx.TE_PASSWORD
        )

        # Login btn
        self.login_btn = wx.Button(parent=self.panel, id=-1, label="Login", pos=(125, 85), size=(90, 35))

        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 125), size=(300, -1), style=wx.ALL | wx.EXPAND)

        # site link
        wx.StaticText(parent=self.panel, id=-1, label="Home Page:", pos=(30, 135), size=(90, 30))
        self.link = hyperlink.HyperLinkCtrl(parent=self.panel, id=-1, pos=(115, 135))
        self.link.SetURL(URL=HOME_PAGE)
        self.link.SetLabel(label=HOME_PAGE)

        # status
        stbar = MyStatusBar(self)
        self.SetStatusBar(stbar)
Пример #2
0
 def __init__(self, frame):
     wx.TaskBarIcon.__init__(self)
     self.frame = frame
     self.logo_ico = logo.get_icon()
     self.create_menu()
     
     #bind event
     self.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, self.on_taskbar_leftdclick)
     self.Bind(wx.EVT_MENU, self.on_exit, id=wx.ID_EXIT)
Пример #3
0
    def __init__(self, frame):
        wx.TaskBarIcon.__init__(self)
        self.frame = frame
        self.logo_ico = logo.get_icon()
        self.create_menu()

        #bind event
        self.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, self.on_taskbar_leftdclick)
        self.Bind(wx.EVT_MENU, self.on_exit, id=wx.ID_EXIT)
Пример #4
0
 def layout(self):
     #
     self.SetIcon(logo.get_icon())
     
     #
     wx.StaticLine(parent=self.panel, id=-1, pos=(0, 0), size=(500, -1))
     wx.StaticText(parent=self.panel, id=-1, pos=(10, 5), size=(-1, -1),
                   label='To choose a user, please click the image.')
     self.search_res = wxhtml.HtmlWindow(parent=self.panel, id=-1, 
                                         pos=(10, 30), size=(480, 260),
                                         style=wxhtml.HW_SCROLLBAR_AUTO)
     self.search_res.SetPage('<b>Searching, please wait...</b>')
 def layout(self):
     #
     self.SetIcon(logo.get_icon())
     
     #
     wx.StaticLine(parent=self.panel, id=-1, pos=(0, 0), size=(500, -1))
     wx.StaticText(parent=self.panel, id=-1, pos=(10, 5), size=(-1, -1),
                   label='To choose a user, please click the image.')
     self.search_res = wxhtml.HtmlWindow(parent=self.panel, id=-1, 
                                         pos=(10, 30), size=(480, 260),
                                         style=wxhtml.HW_SCROLLBAR_AUTO)
     self.search_res.SetPage('<b>Searching, please wait...</b>')
Пример #6
0
  def on_help(self, event):
      info = wx.AboutDialogInfo()
      info.SetIcon(logo.get_icon())
 
      info.Name        = 'Crawler Client'
      info.Version     = VERSION
      info.Copyright   = COPYRIGHT
      info.Description = wordwrap.wordwrap(text=HELP_DOC, width=350, 
                                           dc=wx.ClientDC(self.panel),
                                           breakLongWords=True, margin=0)
      info.WebSite    = (HOME_PAGE, 'Home Page')
      info.Developers = DEVELOPERS
      info.Licence    = LICENCE
      
      wx.AboutBox(info)
  def on_help(self, event):
      info = wx.AboutDialogInfo()
      info.SetIcon(logo.get_icon())
 
      info.Name        = 'Crawler Client'
      info.Version     = VERSION
      info.Copyright   = COPYRIGHT
      info.Description = wordwrap.wordwrap(text=HELP_DOC, width=350, 
                                           dc=wx.ClientDC(self.panel),
                                           breakLongWords=True, margin=0)
      info.WebSite    = (HOME_PAGE, 'Home Page')
      info.Developers = DEVELOPERS
      info.Licence    = LICENCE
      
      wx.AboutBox(info)
 def layout(self, status):
     #logo
     self.SetIcon(logo.get_icon())
     
     #
     wx.StaticLine(parent=self.panel, id=-1, pos=(0, 0), size=(300, -1), 
                   style=wx.ALL|wx.EXPAND)
             
     #WebSite + Account + Password
     wx.StaticText(parent=self.panel, id=-1, label='WebSite:', 
                   pos=(24, 15), size=(60, 30))
     self.website = wx.Choice(parent=self.panel, id=-1,
                               pos=(90, 7), size=(180, 30),
                               choices=SITE_CHOICES)
     self.website.SetSelection(0)
     
     wx.StaticText(parent=self.panel, id=-1, label='Account:',
                   pos=(25, 47), size=(60, 30))
     self.account = wx.TextCtrl(parent=self.panel, id=-1, value='',
                                pos=(90, 42), size=(180, 30))
      
     wx.StaticText(parent=self.panel, id=-1, label='Password:'******'',
                                 pos=(90, 77), size=(180, 30), 
                                 style=wx.TE_PASSWORD|wx.TE_PROCESS_ENTER)
     
     #Login btn
     self.login_btn = wx.Button(parent=self.panel, id=-1, label='Login',
                                pos=(125, 110), size=(90, 35))
     
     #
     wx.StaticLine(parent=self.panel, id=-1, pos=(0, 145), size=(300, -1), 
                   style=wx.ALL|wx.EXPAND)
     
     #site link
     wx.StaticText(parent=self.panel, id=-1, label='Home Page:',
                   pos=(30, 155), size=(90, 30))
     self.link = hyperlink.HyperLinkCtrl(parent=self.panel, id=-1, pos=(115, 155))
     self.link.SetURL(URL=HOME_PAGE)
     self.link.SetLabel(label=HOME_PAGE)
     self.link.SetBackgroundColour(self.GetBackgroundColour())
     
     #status bar
     stbar = MyStatusBar(self)
     self.SetStatusBar(stbar)        
Пример #9
0
    def layout(self, status):
        #logo
        self.SetIcon(logo.get_icon())

        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 0),
                      size=(300, -1),
                      style=wx.ALL | wx.EXPAND)

        #Account + Password
        wx.StaticText(parent=self.panel,
                      id=-1,
                      label='Account:',
                      pos=(25, 19),
                      size=(60, 30))
        self.account = wx.TextCtrl(parent=self.panel,
                                   id=-1,
                                   value='',
                                   pos=(90, 15),
                                   size=(180, 30))

        wx.StaticText(parent=self.panel,
                      id=-1,
                      label='Password:'******'',
                                    pos=(90, 50),
                                    size=(180, 30),
                                    style=wx.TE_PASSWORD)

        #Login btn
        self.login_btn = wx.Button(parent=self.panel,
                                   id=-1,
                                   label='Login',
                                   pos=(125, 85),
                                   size=(90, 35))

        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 125),
                      size=(300, -1),
                      style=wx.ALL | wx.EXPAND)

        #site link
        wx.StaticText(parent=self.panel,
                      id=-1,
                      label='Home Page:',
                      pos=(30, 135),
                      size=(90, 30))
        self.link = hyperlink.HyperLinkCtrl(parent=self.panel,
                                            id=-1,
                                            pos=(115, 135))
        self.link.SetURL(URL=HOME_PAGE)
        self.link.SetLabel(label=HOME_PAGE)

        #status
        stbar = MyStatusBar(self)
        self.SetStatusBar(stbar)
Пример #10
0
 def layout(self, status):
     self.SetIcon(logo.get_icon())
     
     self.SetBackgroundColour('MEDIA GRAY')
     wx.StaticLine(parent=self.panel, id=-1, pos=(0, 0), size=(600, -1), 
                   style=wx.ALL|wx.EXPAND)
     
     #Basic Infos: Account+WebSite+Help
     wx.StaticText(parent=self.panel, id=-1, 
                   label='Account:'+self.account_display,
                   pos=(25, 5), size=(285, 25), style=wx.TE_RICH2)
     wx.StaticText(parent=self.panel, id=-1, 
                   label='WebSite:'+self.website_display,
                   pos=(300, 5), size=(180, 25), style=wx.TE_RICH2)
     self.help_btn = platebtn.PlateButton(parent=self.panel, id_=-1, label='Help?',
                                      pos=(490, 2), size=(50, 25),
                                      style=platebtn.PB_STYLE_NOBG|
                                      platebtn.PB_STYLE_GRADIENT)
 
     #
     wx.StaticLine(parent=self.panel, id=-1, pos=(0, 30), size=(600, -1), 
                   style=wx.ALL|wx.EXPAND)
     
     #Path Setting
     self.path_setting_btn = wx.Button(parent=self.panel, id=-1, 
                                       pos=(20, 35), size=(120, 30), 
                                       label='Path Setting')
     self.path_setting_txt = wx.TextCtrl(parent=self.panel, id=-1, 
                                         value=self.store_path,
                                         pos=(142, 37), size=(398, 27),
                                         style=wx.TE_RICH2|wx.TE_READONLY)
     self.path_setting_txt.SetBackgroundColour(self.GetBackgroundColour())
     
     #
     wx.StaticLine(parent=self.panel, id=-1, pos=(0, 70), size=(600, -1), 
                   style=wx.ALL|wx.EXPAND)
     
     #Single User ID/Multi-User ID/message chain
     self.single_user_id_btn = wx.Button(parent=self.panel, id=-1, 
                                         label='Nick Name', pos=(20, 79), 
                                         size=(120, 30))
     self.single_user_id_search = wx.SearchCtrl(parent=self.panel, id=-1, 
                                                pos=(142, 79), size=(235, 28),
                                                style=wx.TE_RICH2|wx.TE_PROCESS_ENTER)
     self.multi_user_id_btn = wx.Button(parent=self.panel, id=-1, 
                                        label='Multi User ID',
                                        pos=(20, 109), size=(120, 30))
     self.multi_user_id_txt = wx.TextCtrl(parent=self.panel, id=-1, value='',
                                          pos=(142, 79), size=(235, 90),
                                          style=wx.TE_RICH2|wx.TE_MULTILINE)
     self.msg_url_btn = wx.Button(parent=self.panel, id=-1, label='Message URL',
                                  pos=(20, 140), size=(120, 30))
     self.msg_url_txt = wx.TextCtrl(parent=self.panel, id=-1, value='',
                                           pos=(142, 79), size=(235, 90),
                                           style=wx.TE_RICH2|wx.TE_MULTILINE)
     
     self.multi_user_id_btn.Enable(False)
     self.single_user_id_btn.Enable(True)
     self.single_user_id_search.Show(False)
     self.msg_url_btn.Enable(True)
     self.msg_url_txt.Show(False)
     
     #Fetch Data Type
     self.fetch_data_type= wx.RadioBox(parent=self.panel, id=-1, label='Fetch Data Type',
                                       pos=(390, 72), size=(150, 98),
                                       majorDimension=2,
                                       style=wx.RA_SPECIFY_COLS,
                                       choices=DATA_CHOICES)
     self.fetch_data_type.SetSelection(0)
     
     #
     wx.StaticLine(parent=self.panel, id=-1, pos=(0, 176), size=(600, -1), 
                   style=wx.ALL|wx.EXPAND)
     
     #Start
     self.start_btn = wx.Button(parent=self.panel, id=-1, label='Start',
                                pos=(440, 185), size=(100, 40))    
     
     #progress bar
     wx.RadioBox(parent=self.panel, id=-1, label='Progressing',
                                       pos=(20, 180), size=(360, 55),
                                       style=wx.RA_HORIZONTAL, choices=[''])
     self.progress_bar = wx.Gauge(parent=self.panel, id=-1, range=100, 
                                  pos=(25, 200), size=(350, 30),
                                  style=wx.GA_HORIZONTAL)
     self.progress_bar.SetValue(0)
             
     values  = 'Login succeed...\nCurrent User:'******'\n'
     values += 'Current WebSite:' + self.website_display +'\n'
     values += 'Current Version of Crawler:' + VERSION +'\n'
     self.logs_txt = wx.TextCtrl(parent=self.panel, id=-1, value=values,
                                 pos=(20, 255), size=(520, 230),
                                 style=wx.TE_READONLY|wx.TE_RICH2|wx.TE_MULTILINE)
     
     #status
     stbar = MyStatusBar(self)
     self.SetStatusBar(stbar)         
Пример #11
0
    def layout(self, status):
        self.SetIcon(logo.get_icon())

        self.SetBackgroundColour('MEDIA GRAY')
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 0),
                      size=(600, -1),
                      style=wx.ALL | wx.EXPAND)

        #Basic Infos: Account + Help
        wx.StaticText(parent=self.panel,
                      id=-1,
                      label='Site Account:' + self.host_fetcher.username,
                      pos=(25, 5),
                      size=(285, 25),
                      style=wx.TE_RICH2)

        self.help_btn = platebtn.PlateButton(parent=self.panel,
                                             id=-1,
                                             label='Help?',
                                             pos=(488, 2),
                                             size=(50, 25),
                                             style=platebtn.PB_STYLE_NOBG
                                             | platebtn.PB_STYLE_GRADIENT)

        #
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 30),
                      size=(600, -1),
                      style=wx.ALL | wx.EXPAND)

        #Path Setting
        self.path_setting_txt = wx.TextCtrl(parent=self.panel,
                                            id=-1,
                                            value=self.store_path,
                                            pos=(23, 37),
                                            size=(370, 27),
                                            style=wx.TE_RICH2 | wx.TE_READONLY)
        self.path_setting_txt.SetBackgroundColour(self.GetBackgroundColour())

        self.path_setting_btn = wx.Button(parent=self.panel,
                                          id=-1,
                                          pos=(440, 35),
                                          size=(100, 30),
                                          label='Path Setting')

        #
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 70),
                      size=(600, -1),
                      style=wx.ALL | wx.EXPAND)

        #WebSite + Account + Password
        wx.StaticText(parent=self.panel,
                      id=-1,
                      label='WebSite:',
                      pos=(33, 84),
                      size=(60, 25))
        self.website = wx.Choice(parent=self.panel,
                                 id=-1,
                                 pos=(98, 77),
                                 size=(200, 30),
                                 choices=SITE_CHOICES)
        self.website.SetSelection(0)

        wx.StaticText(parent=self.panel,
                      id=-1,
                      label='Account:',
                      pos=(32, 114),
                      size=(60, 25))
        self.account = wx.TextCtrl(parent=self.panel,
                                   id=-1,
                                   value='',
                                   pos=(98, 109),
                                   size=(200, 30))

        wx.StaticText(parent=self.panel,
                      id=-1,
                      label='Password:'******'',
                                    pos=(98, 144),
                                    size=(200, 30),
                                    style=wx.TE_PASSWORD)

        #Start
        self.start_btn = wx.Button(parent=self.panel,
                                   id=-1,
                                   label='Start',
                                   pos=(440, 135),
                                   size=(100, 30))

        #
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 180),
                      size=(600, -1),
                      style=wx.ALL | wx.EXPAND)

        #progress bar
        wx.RadioBox(parent=self.panel,
                    id=-1,
                    label='Progressing',
                    pos=(20, 185),
                    size=(518, 60),
                    style=wx.RA_HORIZONTAL,
                    choices=[''])
        self.progress_bar = wx.Gauge(parent=self.panel,
                                     id=-1,
                                     range=100,
                                     pos=(25, 207),
                                     size=(508, 30),
                                     style=wx.GA_HORIZONTAL)
        self.progress_bar.SetValue(0)

        values = 'Running...\nCurrent User:'******'\n'
        values += 'Current Version of Crawler:' + VERSION + '\n'
        self.logs_txt = wx.TextCtrl(parent=self.panel,
                                    id=-1,
                                    value=values,
                                    pos=(20, 255),
                                    size=(520, 230),
                                    style=wx.TE_READONLY | wx.TE_RICH2
                                    | wx.TE_MULTILINE)

        #status
        stbar = MyStatusBar(self)
        self.SetStatusBar(stbar)
    def layout(self, status):
        self.SetIcon(logo.get_icon())
        
        self.SetBackgroundColour('MEDIA GRAY')
        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 0), size=(600, -1), 
                      style=wx.ALL|wx.EXPAND)
        
        #Basic Infos: Account + Help
        wx.StaticText(parent=self.panel, id=-1, label='Site Account:'+self.host_fetcher.username,
                      pos=(25, 5), size=(285, 25), style=wx.TE_RICH2)

        self.help_btn = platebtn.PlateButton(parent=self.panel, id=-1, label='Help?', 
                                         pos=(488, 2), size=(50, 25),
                                         style=platebtn.PB_STYLE_NOBG|platebtn.PB_STYLE_GRADIENT)
                                         
                
        #
        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 30), size=(600, -1), 
                      style=wx.ALL|wx.EXPAND)
        
        #Path Setting
        self.path_setting_txt = wx.TextCtrl(parent=self.panel, id=-1, 
                                            value=self.store_path,
                                            pos=(23, 37), size=(370, 27),
                                            style=wx.TE_RICH2|wx.TE_READONLY)
        self.path_setting_txt.SetBackgroundColour(self.GetBackgroundColour())
        
        self.path_setting_btn = wx.Button(parent=self.panel, id=-1, 
                                          pos=(440, 35), size=(100, 30), 
                                          label='Path Setting')
        
        #
        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 70), size=(600, -1), 
                      style=wx.ALL|wx.EXPAND)
        
        #WebSite + Account + Password
        wx.StaticText(parent=self.panel, id=-1, label='WebSite:', 
                      pos=(33, 84), size=(60, 25))
        self.website  = wx.Choice(parent=self.panel, id=-1, 
                                  pos=(98, 77), size=(200, 30),
                                  choices=SITE_CHOICES)
        self.website.SetSelection(0)
         
        wx.StaticText(parent=self.panel, id=-1, label='Account:',
                      pos=(32, 114), size=(60, 25))
        self.account  = wx.TextCtrl(parent=self.panel, id=-1, value='',
                                    pos=(98, 109), size=(200, 30))
          
        wx.StaticText(parent=self.panel, id=-1, label='Password:'******'',
                                    pos=(98, 144), size=(200, 30), 
                                    style=wx.TE_PASSWORD)
         
        #Start
        self.start_btn = wx.Button(parent=self.panel, id=-1, label='Start',
                                   pos=(440, 135), size=(100, 30))
        
        #
        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 180), size=(600, -1), 
                      style=wx.ALL|wx.EXPAND)
        
        #progress bar
        wx.RadioBox(parent=self.panel, id=-1, label='Progressing',
                                          pos=(20, 185), size=(518, 60),
                                          style=wx.RA_HORIZONTAL, choices=[''])
        self.progress_bar = wx.Gauge(parent=self.panel, id=-1, range=100, 
                                     pos=(25, 207), size=(508, 30),
                                     style=wx.GA_HORIZONTAL)
        self.progress_bar.SetValue(0)
        
        values = 'Running...\nCurrent User:'******'\n'
        values += 'Current Version of Crawler:' + VERSION +'\n'
        self.logs_txt = wx.TextCtrl(parent=self.panel, id=-1, value=values,
                                    pos=(20, 255), size=(520, 230),
                                    style=wx.TE_READONLY|wx.TE_RICH2|wx.TE_MULTILINE)

        #status
        stbar = MyStatusBar(self)
        self.SetStatusBar(stbar) 
Пример #13
0
    def layout(self, status):
        self.SetIcon(logo.get_icon())

        self.SetBackgroundColour('MEDIA GRAY')
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 0),
                      size=(600, -1),
                      style=wx.ALL | wx.EXPAND)

        #Basic Infos: Account+WebSite+Help
        wx.StaticText(parent=self.panel,
                      id=-1,
                      label='Account:' + self.account_display,
                      pos=(25, 5),
                      size=(285, 25),
                      style=wx.TE_RICH2)
        wx.StaticText(parent=self.panel,
                      id=-1,
                      label='WebSite:' + self.website_display,
                      pos=(300, 5),
                      size=(180, 25),
                      style=wx.TE_RICH2)
        self.help_btn = platebtn.PlateButton(parent=self.panel,
                                             id_=-1,
                                             label='Help?',
                                             pos=(490, 2),
                                             size=(50, 25),
                                             style=platebtn.PB_STYLE_NOBG
                                             | platebtn.PB_STYLE_GRADIENT)

        #
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 30),
                      size=(600, -1),
                      style=wx.ALL | wx.EXPAND)

        #Path Setting
        self.path_setting_btn = wx.Button(parent=self.panel,
                                          id=-1,
                                          pos=(20, 35),
                                          size=(120, 30),
                                          label='Path Setting')
        self.path_setting_txt = wx.TextCtrl(parent=self.panel,
                                            id=-1,
                                            value=self.store_path,
                                            pos=(142, 37),
                                            size=(398, 27),
                                            style=wx.TE_RICH2 | wx.TE_READONLY)
        self.path_setting_txt.SetBackgroundColour(self.GetBackgroundColour())

        #
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 70),
                      size=(600, -1),
                      style=wx.ALL | wx.EXPAND)

        #Single User ID/Multi-User ID/message chain
        self.single_user_id_btn = wx.Button(parent=self.panel,
                                            id=-1,
                                            label='Nick Name',
                                            pos=(20, 79),
                                            size=(120, 30))
        self.single_user_id_search = wx.SearchCtrl(parent=self.panel,
                                                   id=-1,
                                                   pos=(142, 79),
                                                   size=(235, 28),
                                                   style=wx.TE_RICH2
                                                   | wx.TE_PROCESS_ENTER)
        self.multi_user_id_btn = wx.Button(parent=self.panel,
                                           id=-1,
                                           label='Multi User ID',
                                           pos=(20, 109),
                                           size=(120, 30))
        self.multi_user_id_txt = wx.TextCtrl(parent=self.panel,
                                             id=-1,
                                             value='',
                                             pos=(142, 79),
                                             size=(235, 90),
                                             style=wx.TE_RICH2
                                             | wx.TE_MULTILINE)
        self.msg_url_btn = wx.Button(parent=self.panel,
                                     id=-1,
                                     label='Message URL',
                                     pos=(20, 140),
                                     size=(120, 30))
        self.msg_url_txt = wx.TextCtrl(parent=self.panel,
                                       id=-1,
                                       value='',
                                       pos=(142, 79),
                                       size=(235, 90),
                                       style=wx.TE_RICH2 | wx.TE_MULTILINE)

        self.multi_user_id_btn.Enable(False)
        self.single_user_id_btn.Enable(True)
        self.single_user_id_search.Show(False)
        self.msg_url_btn.Enable(True)
        self.msg_url_txt.Show(False)

        #Fetch Data Type
        self.fetch_data_type = wx.RadioBox(parent=self.panel,
                                           id=-1,
                                           label='Fetch Data Type',
                                           pos=(390, 72),
                                           size=(150, 98),
                                           majorDimension=2,
                                           style=wx.RA_SPECIFY_COLS,
                                           choices=DATA_CHOICES)
        self.fetch_data_type.SetSelection(0)

        #
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 176),
                      size=(600, -1),
                      style=wx.ALL | wx.EXPAND)

        #Start
        self.start_btn = wx.Button(parent=self.panel,
                                   id=-1,
                                   label='Start',
                                   pos=(440, 185),
                                   size=(100, 40))

        #progress bar
        wx.RadioBox(parent=self.panel,
                    id=-1,
                    label='Progressing',
                    pos=(20, 180),
                    size=(360, 55),
                    style=wx.RA_HORIZONTAL,
                    choices=[''])
        self.progress_bar = wx.Gauge(parent=self.panel,
                                     id=-1,
                                     range=100,
                                     pos=(25, 200),
                                     size=(350, 30),
                                     style=wx.GA_HORIZONTAL)
        self.progress_bar.SetValue(0)

        values = 'Login succeed...\nCurrent User:'******'\n'
        values += 'Current WebSite:' + self.website_display + '\n'
        values += 'Current Version of Crawler:' + VERSION + '\n'
        self.logs_txt = wx.TextCtrl(parent=self.panel,
                                    id=-1,
                                    value=values,
                                    pos=(20, 255),
                                    size=(520, 230),
                                    style=wx.TE_READONLY | wx.TE_RICH2
                                    | wx.TE_MULTILINE)

        #status
        stbar = MyStatusBar(self)
        self.SetStatusBar(stbar)
Пример #14
0
    def layout(self, status):
        #logo
        self.SetIcon(logo.get_icon())

        #
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 0),
                      size=(300, -1),
                      style=wx.ALL | wx.EXPAND)

        #WebSite + Account + Password
        wx.StaticText(parent=self.panel,
                      id=-1,
                      label=u'WebSite:',
                      pos=(24, 15),
                      size=(60, 30))
        self.website = wx.Choice(parent=self.panel,
                                 id=-1,
                                 pos=(90, 7),
                                 size=(180, 30),
                                 choices=SITE_CHOICES)
        self.website.SetSelection(0)

        wx.StaticText(parent=self.panel,
                      id=-1,
                      label=u'Account:',
                      pos=(25, 47),
                      size=(60, 30))
        self.account = wx.TextCtrl(parent=self.panel,
                                   id=-1,
                                   value='',
                                   pos=(90, 42),
                                   size=(180, 30))

        wx.StaticText(parent=self.panel,
                      id=-1,
                      label=u'Password:'******'',
                                    pos=(90, 77),
                                    size=(180, 30),
                                    style=wx.TE_PASSWORD | wx.TE_PROCESS_ENTER)

        #Login btn
        self.login_btn = wx.Button(parent=self.panel,
                                   id=-1,
                                   label=u'Login',
                                   pos=(125, 110),
                                   size=(90, 35))

        #
        wx.StaticLine(parent=self.panel,
                      id=-1,
                      pos=(0, 147),
                      size=(300, -1),
                      style=wx.ALL | wx.EXPAND)

        #site link
        wx.StaticText(parent=self.panel,
                      id=-1,
                      label=u'Home Page:',
                      pos=(30, 155),
                      size=(90, 30))
        self.link = hyperlink.HyperLinkCtrl(parent=self.panel,
                                            id=-1,
                                            pos=(115, 155))
        self.link.SetURL(URL=HOME_PAGE)
        self.link.SetLabel(label=HOME_PAGE)
        self.link.SetBackgroundColour(self.GetBackgroundColour())

        #status
        stbar = MyStatusBar(self)
        self.SetStatusBar(stbar)
    def layout(self, status):
        self.SetIcon(logo.get_icon())

        self.SetBackgroundColour("MEDIA GRAY")
        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 0), size=(600, -1), style=wx.ALL | wx.EXPAND)

        # Basic Infos: Account + Help
        wx.StaticText(
            parent=self.panel,
            id=-1,
            label="Site Account:" + self.host_fetcher.username,
            pos=(25, 5),
            size=(285, 30),
            style=wx.TE_RICH2,
        )

        self.help_btn = platebtn.PlateButton(
            parent=self.panel,
            id_=-1,
            label="Help?",
            pos=(500, 5),
            size=(50, 30),
            style=platebtn.PB_STYLE_NOBG | platebtn.PB_STYLE_GRADIENT,
        )

        #
        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 30), size=(600, -1), style=wx.ALL | wx.EXPAND)

        # Path Setting
        self.path_setting_txt = wx.TextCtrl(
            parent=self.panel,
            id=-1,
            value=self.store_path,
            pos=(23, 37),
            size=(355, 27),
            style=wx.TE_RICH2 | wx.TE_READONLY,
        )
        self.path_setting_txt.SetBackgroundColour(self.GetBackgroundColour())

        self.path_setting_btn = wx.Button(parent=self.panel, id=-1, pos=(420, 35), size=(120, 30), label="Path Setting")

        #
        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 70), size=(600, -1), style=wx.ALL | wx.EXPAND)

        # WebSite + Account + Password
        wx.StaticText(parent=self.panel, id=-1, label="WebSite:", pos=(33, 80), size=(60, 30))
        self.website = wx.Choice(parent=self.panel, id=-1, pos=(98, 73), size=(200, 30), choices=SITE_CHOICES)
        self.website.SetSelection(0)

        wx.StaticText(parent=self.panel, id=-1, label="Account:", pos=(32, 110), size=(60, 30))
        self.account = wx.TextCtrl(parent=self.panel, id=-1, value="", pos=(98, 105), size=(200, 30))

        wx.StaticText(parent=self.panel, id=-1, label="Password:"******"", pos=(98, 140), size=(200, 30), style=wx.TE_PASSWORD
        )

        # Start
        self.start_btn = wx.Button(parent=self.panel, id=-1, label="Start", pos=(440, 135), size=(100, 40))

        #
        wx.StaticLine(parent=self.panel, id=-1, pos=(0, 180), size=(600, -1), style=wx.ALL | wx.EXPAND)

        # progress bar
        wx.RadioBox(
            parent=self.panel,
            id=-1,
            label="Progressing",
            pos=(20, 190),
            size=(518, 60),
            style=wx.RA_HORIZONTAL,
            choices=[""],
        )
        self.progress_bar = wx.Gauge(
            parent=self.panel, id=-1, range=100, pos=(25, 208), size=(508, 35), style=wx.GA_HORIZONTAL
        )
        self.progress_bar.SetValue(0)

        values = "Running...\nCurrent User:"******"\n"
        values += "Current Version of Crawler:" + VERSION + "\n"
        self.logs_txt = wx.TextCtrl(
            parent=self.panel,
            id=-1,
            value=values,
            size=(520, 210),
            pos=(20, 255),
            style=wx.TE_READONLY | wx.TE_RICH2 | wx.TE_MULTILINE,
        )

        # status
        stbar = MyStatusBar(self)
        self.SetStatusBar(stbar)