コード例 #1
0
ファイル: UserInterface.py プロジェクト: wuyou1102/ChargeTest
 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
コード例 #2
0
 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()))