pigrow_remote.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Pigrow 作者: Pragmatismo 项目源码 文件源码
def __init__( self, parent ):
        win_height = parent.GetSize()[1]
        height_of_pannels_above = 230
        space_left = win_height - height_of_pannels_above
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (0, height_of_pannels_above), size = wx.Size(285, space_left), style = wx.TAB_TRAVERSAL )
        # Start drawing the UI elements
        wx.StaticText(self,  label='Pigrow Config', pos=(25, 10))
        self.update_config_btn = wx.Button(self, label='read config from pigrow', pos=(15, 60), size=(175, 30))
        self.update_config_btn.Bind(wx.EVT_BUTTON, self.update_config_click)
        self.name_box_btn = wx.Button(self, label='change box name', pos=(15, 95), size=(175, 30))
        self.name_box_btn.Bind(wx.EVT_BUTTON, self.name_box_click)
        self.config_lamp_btn = wx.Button(self, label='config lamp', pos=(15, 130), size=(175, 30))
        self.config_lamp_btn.Bind(wx.EVT_BUTTON, self.config_lamp_click)
        self.config_dht_btn = wx.Button(self, label='config dht', pos=(15, 165), size=(175, 30))
        self.config_dht_btn.Bind(wx.EVT_BUTTON, self.config_dht_click)
        self.new_gpio_btn = wx.Button(self, label='Add new relay device', pos=(15, 200), size=(175, 30))
        self.new_gpio_btn.Bind(wx.EVT_BUTTON, self.add_new_device_relay)
        self.update_settings_btn = wx.Button(self, label='update pigrow settings', pos=(15, 235), size=(175, 30))
        self.update_settings_btn.Bind(wx.EVT_BUTTON, self.update_setting_click)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号