示例#1
0
    def OnDoubleClick(self, event):
        """double click to show this iterm information
        """
        conf_id = self.ListCtrlObj.GetSelectedSingleItemInfo(
            event.m_itemIndex, self.ListCtrlObj.GetId())
        execsql = ExecSQL(self.PrintEventLog)

        if self.ListCtrlObj.GetId() == self.XmlListCtrlId:
            querydata = execsql.getAll(self.ListCtrlObj.GetId(), conf_id)
            for index in querydata:
                self.resultall = (index['conf_id'], index['conf_url'],
                                  str(index['conf_response']).decode('utf-8'),
                                  str(index['conf_request']).decode('utf-8'))

            # Show Information Dialog
            viewdialog = ViewXmlDialog(self, -1, "Show Information",
                                       (450, 400), self.resultall)
            viewdialog.CenterOnScreen()
            # this does not return until the dialog is closed.
            val = viewdialog.ShowModal()
            if val == wx.ID_OK:
                pass
                # print "You pressed OK"
            viewdialog.Destroy()
        else:
            querydata = execsql.getAll(self.ListCtrlObj.GetId(), conf_id)
            for index in querydata:
                self.resultall = (index['conf_id'], index['conf_url'],
                                  index['conf_type'], index['conf_before'],
                                  index['conf_after'])
            # Show Information Dialog
            viewbinarydialog = ViewBinaryDialog(self, -1, "Show Information",
                                                (450, 400), self.resultall)
            viewbinarydialog.CenterOnScreen()
            # this does not return until the dialog is closed.
            val = viewbinarydialog.ShowModal()
            if val == wx.ID_OK:
                # print "You pressed OK"
                pass
            viewbinarydialog.Destroy()
示例#2
0
    def EditResponseInfo(self, event):
        """ Edit Response info
        """
        conf_id = self.ListCtrlObj.GetSelectedSingleItemInfo(
            self.ListCtrlObj.GetSelectListItem()[0][0],
            self.ListCtrlObj.GetId())
        execsql = ExecSQL(self.PrintEventLog)

        if self.ListCtrlObj.GetId() == self.XmlListCtrlId:
            querydata = execsql.getAll(self.ListCtrlObj.GetId(), conf_id)
            for index in querydata:
                self.resultall = (index['conf_id'], index['conf_url'],
                                  str(index['conf_response']).decode('utf-8'),
                                  str(index['conf_request']).decode('utf-8'))
                self.editXmlDialog(self.resultall)
        else:
            querydata = execsql.getAll(self.ListCtrlObj.GetId(), conf_id)
            for index in querydata:
                self.resultall = (index['conf_id'], index['conf_url'],
                                  index['conf_type'], index['conf_before'],
                                  index['conf_after'])
                self.editBinaryDialog(self.resultall)