Пример #1
0
 def showDeviceListUi(self):
     self.mBottomArea.children=[]
     with self.mBottomArea:
         with ui.HBoxPanel(flex=1):
             with ui.VBoxPanel(flex=0,base_size=200,style='background:#aaa;color:#0f0;min-width:200px'):
                 self.b1 = ui.Button(text="功能1")
                 self.b2 = ui.Button(text='功能2')
             self.hist = HistoryListUi(flex=1,style="overflow-y:scroll")
Пример #2
0
 def init(self):
     with ui.HBox(flex=1):
         with ui.Widget(flex=1,style="overflow-y:scroll"):
             with ui.VBoxPanel(flex=0) as self.leftView:
                 with ui.HBox(flex=0,style="background:#ee0;min-height:40px;max-height:40px"):
                     ui.Label(text="<b>主设备</b>")
                     ui.Label(text="<b>从设备</b>")
         with ui.PinboardLayout(flex=0,style="background:#eee;color:#000;min-width:200px"):
             self.btnStartPolling = ui.Button(flex=0,text="发起一次轮询",css_class="button button-primary button-rounded button-small",pos=(10,10),base_size=(160,32))
Пример #3
0
 def init(self):
     self.udr = uart.UartDriver()
     self.uartfd = None
     self.mDevList = []
     with ui.VBoxPanel() as self.vboxs:
         with ui.PinboardLayout(flex = 0,base_size=100,style="background:#777;color:#0ff"):
             self.mDevNameLab = ui.Label(flex=0,text="目前没有打开的串口",pos=(10,10),base_size=(600,32))
             self.mDevTypeLab = ui.Label(flex=0,text="设备规格:",pos=(10,40),base_size=(600,32))
         self.mMenuBar = MenuBarView(flex=0,menuBtnFunc=self._menuBtnHandler)
         self.mBottomArea = ui.Widget(flex=1)
Пример #4
0
 def init(self):
     with ui.HBox(flex=1):
         with ui.Widget(flex=1,style="overflow-y:scroll"):
             with ui.VBoxPanel(flex=0) as self.leftView:
                 with ui.HBox(flex=0,style="background:#ee0;min-height:40px;max-height:40px"):
                     ui.Label(text="<b>主设备</b>")
                     ui.Label(text="<b>从设备</b>")
         with ui.VBox(flex=0,padding=6,style="background:#eee;color:#000;min-width:200px"):
             self.listenMode = ui.RadioButton(text="CEV485监听模式",checked=True)
             self.simuAllClient = ui.RadioButton(text="模拟所有客户端响应")
             self.simuOneKeyModClient = ui.RadioButton(text="模拟一键报警")
             self.btnStart = ui.Button(text="模拟启动",css_class="button button-primary button-rounded button-small",pos=(10,10),base_size=(160,32))
             ui.Widget(flex=1)
Пример #5
0
 def openother(self):
     self.children.remove(self.mDevList)
     with self:
         with ui.VBoxPanel(flex=1):
             for i in range(5):
                 ui.Label(flex=0,text="设备名称1113:",pos=(10,10),base_size=(100,32))
Пример #6
0
 def init(self):
     self.mDevList = ui.VBoxPanel(flex=1,parent = self)
     with self.mDevList:
         for i in range(2):
             DeviceItem(flex=0)