Exemple #1
0
    def toggleCapture(self):
        ''' Capture button toggle handler
        '''

        if self.captureActve:
            RegHandler.deactivate()
            self.captureActve = False

            self.capture_btn.config(text='Capture', image=IMAGES['link'])
            self.status_bar.config(text='Server has stopped')

        else:
            def activate(service=None):
                # set registry on windows
                try:
                    RegHandler.activate(config.port, service)
                except:
                    pass
                else:
                    self.captureActve = True

                    self.capture_btn.config(text='Stop', image=IMAGES['unlink'])
                    self.status_bar.config(text=RUNMSG)

            if sys.platform == 'darwin':
                NetworkSelector.toggle(activate)
            else:
                activate()
Exemple #2
0
    def toggleCapture(self):
        ''' Capture button toggle handler
        '''

        if self.captureActve:
            RegHandler.deactivate()
            self.captureActve = False

            self.capture_btn.config(text='Capture', image=IMAGES['link'])
            self.status_bar.config(text='Server has stopped')

        else:

            def activate(service=None):
                # set registry on windows
                try:
                    RegHandler.activate(config.port, service)
                except:
                    pass
                else:
                    self.captureActve = True

                    self.capture_btn.config(text='Stop',
                                            image=IMAGES['unlink'])
                    self.status_bar.config(text=RUNMSG)

            if sys.platform == 'darwin':
                NetworkSelector.toggle(activate)
            else:
                activate()
Exemple #3
0
            def activate(service=None):
                # set registry on windows
                try:
                    RegHandler.activate(config.port, service)
                except:
                    pass
                else:
                    self.captureActve = True

                    self.capture_btn.config(text='Stop', image=IMAGES['unlink'])
                    self.status_bar.config(text=RUNMSG)
Exemple #4
0
            def activate(service=None):
                # set registry on windows
                try:
                    RegHandler.activate(config.port, service)
                except:
                    pass
                else:
                    self.captureActve = True

                    self.capture_btn.config(text='Stop',
                                            image=IMAGES['unlink'])
                    self.status_bar.config(text=RUNMSG)