def on_stop(self, event): try: self.data.stop() self.ampe.stop() self.volt.stop() Utility.AlertMsg(u"已停止") self.EnableCtrl(enable=True) except AttributeError: pass
def update_ybound(self, event): try: y_max = int(self.max_tc.GetValue()) y_min = int(self.min_tc.GetValue()) if y_max < y_min: y_min, y_max = y_max, y_min self.set_ybound(lower=y_min, upper=y_max) Utility.AlertMsg(u"设置成功") except ValueError: Utility.AlertError(u"输入异常: \"%s\" or \"%s\"" % (self.min_tc.GetValue(), self.max_tc.GetValue()))