Beispiel #1
0
 def start(self):
     if not self.test():
         return False
     connectobj = mc.core(Loops=self.LoopInput.get(), PerCycleTime=self.UnitTimeInput.get(),
                          StartTime=self.StartInput.get(), User=self.UserInput.get(), Passwd=self.PasswdInput.get())
     if (connectobj.start()):
         return True
     return False
Beispiel #2
0
 def test(self):
     connectobj = mc.core(Loops=self.LoopInput.get(), PerCycleTime=self.UnitTimeInput.get(),
                          StartTime=self.StartInput.get(), User=self.UserInput.get(), Passwd=self.PasswdInput.get())
     if connectobj.error is not None:
         self.Msg['text'] = connectobj.error
         return False
     if connectobj.test():
         self.Msg['text'] = 'Connect successed!'
         return True
     return False