Exemple #1
0
    def OnSelScanFile(self, event):
        checkstate = (self.tb2.FindTool(wxID_TB_WWW).GetState() & aui.AUI_BUTTON_STATE_CHECKED)
        if not checkstate:
            wx.MessageBox(u"请先选择文件扫描模式!", u"警告")
            return

        dlg = MyScanFileSelDlg(self)
        if dlg.ShowModal() == wx.ID_OK:
            dlg.SaveSel()
        dlg.Destroy()
Exemple #2
0
    def OnToolWWWClick(self, event):
        evid = event.GetId()
        tb = event.GetEventObject()
        checkstate = (tb.FindTool(evid).GetState() & aui.AUI_BUTTON_STATE_CHECKED)

        # file select
        if checkstate:
            for (k,v) in SCRIPT_TYPE_BT.items():
                if k == wxID_TB_WWW: continue
                tb.FindTool(k).SetState(aui.AUI_BUTTON_STATE_NORMAL)
            tb.RefreshOverflowState()

            dlg = MyScanFileSelDlg(self)
            if dlg.ShowModal() == wx.ID_OK:
                dlg.SaveSel()
            dlg.Destroy()
        else:
            self.cmdpara.SetScanFile("")

        self.UpdateScriptType()
        return