Esempio n. 1
0
    def OnInit(self):
        wxInitAllImageHandlers()
        if self.mode == 'scanner':
            if pyc.isWow64():
                self.DisablefsRedirect()
            self.exit_code = wxDialogUtils.wxScan(parent=None, config=self.config, path=self.path, autoClose=self.autoClose)
        elif self.mode == 'update':
            self.exit_code = wxDialogUtils.wxUpdateVirDB(parent=None, config=self.config, autoClose=self.autoClose)
        elif self.mode == 'configure':
            wxDialogUtils.wxConfigure(parent=None, config=self.config)
        elif self.mode == 'configure_schedule':
            wxDialogUtils.wxConfigure(parent=None, config=self.config, switchToSchedule=True)
        elif self.mode == 'about':
            wxDialogUtils.wxAbout(parent=None, config=self.config)
        elif self.mode == 'viewlog':
            wxDialogUtils.wxShowLog(parent=None, logfile=self.path.strip('"'))
        elif self.mode == 'checkversion':
            if not wxDialogUtils.wxCheckUpdate(parent=None, config=self.config):
                self.exit_code = 1

        else: #  mode == 'main'
            if pyc.isWow64():
                self.DisablefsRedirect()
            self.main = wxFrameMain.create(parent=None, config=self.config)
            self.main.Show()
            #workaround for running in wxProcess
            self.SetTopWindow(self.main)
        return True
Esempio n. 2
0
    def OnInit(self):
        wxInitAllImageHandlers()
        if self.mode == 'scanner':
            if pyc.isWow64():
                self.DisablefsRedirect()
            self.exit_code = wxDialogUtils.wxScan(parent=None, config=self.config, path=self.path, autoClose=self.autoClose)
        elif self.mode == 'update':
            self.exit_code = wxDialogUtils.wxUpdateVirDB(parent=None, config=self.config, autoClose=self.autoClose)
        elif self.mode == 'configure':
            wxDialogUtils.wxConfigure(parent=None, config=self.config)
        elif self.mode == 'configure_schedule':
            wxDialogUtils.wxConfigure(parent=None, config=self.config, switchToSchedule=True)
        elif self.mode == 'about':
            wxDialogUtils.wxAbout(parent=None, config=self.config)
        elif self.mode == 'viewlog':
            wxDialogUtils.wxShowLog(parent=None, logfile=self.path.strip('"'))
        elif self.mode == 'checkversion':
            if not wxDialogUtils.wxCheckUpdate(parent=None, config=self.config):
                self.exit_code = 1

        else: #  mode == 'main'
            if pyc.isWow64():
                self.DisablefsRedirect()
            self.main = wxFrameMain.create(parent=None, config=self.config)
            self.main.Show()
            #workaround for running in wxProcess
            self.SetTopWindow(self.main)
        return True
Esempio n. 3
0
 def OnScanMemButton(self, event):
     wxDialogUtils.wxScan(self, self._config, None)
Esempio n. 4
0
 def OnScanButton(self, event):
     scanPath = ''
     for path in self.dirCtrlScan.GetMultiplePath():
         scanPath += "\"%s\" " % path
     wxDialogUtils.wxScan(self, self._config, scanPath)