示例#1
0
    def OnToolClick(self, event):
        tb = event.GetEventObject()
        tb.FindTool(wxID_TB_AUTO).SetState(aui.AUI_BUTTON_STATE_NORMAL)
        tb.FindTool(wxID_TB_WWW).SetState(aui.AUI_BUTTON_STATE_NORMAL)

        dlg = MyScanFileSelDlg(self)
        dlg.ClearSel()

        tb.RefreshOverflowState()
        self.UpdateScriptType()
示例#2
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()
示例#3
0
    def OnToolAutoClick(self, event):
        evid = event.GetId()
        tb = event.GetEventObject()
        checkstate = (tb.FindTool(evid).GetState() & aui.AUI_BUTTON_STATE_CHECKED)
        if checkstate:
            for (k,v) in SCRIPT_TYPE_BT.items():
                if k == wxID_TB_AUTO: continue
                tb.FindTool(k).SetState(aui.AUI_BUTTON_STATE_NORMAL)

        dlg = MyScanFileSelDlg(self)
        dlg.ClearSel()
示例#4
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