예제 #1
0
파일: hc2_demo.py 프로젝트: kstaniek/has
 def add_value(self, notification):
     item_id = "{0}:{1}".format(notification.network_id, notification.node_id)
     obj_value_id = notification.value_id
     value_type = Manager.get_value_type( obj_value_id )
     value =  Manager.get_value_as_string( obj_value_id )
     last_changed = Manager.get_value_last_changed(obj_value_id)
     text="{0}={1} ({2})".format(value_type,value,last_changed)
     self.tree.insert(item_id,"end", obj_value_id.id, text=text)
예제 #2
0
파일: hc2_demo.py 프로젝트: kstaniek/has
 def change_value(self, notification):
     obj_value_id = notification.value_id
     if self.tree.exists(obj_value_id.id):
         value_type = Manager.get_value_type( obj_value_id )
         value =  Manager.get_value_as_string( obj_value_id )
         last_changed = Manager.get_value_last_changed(obj_value_id)
         text="{0}={1} ({2})".format(value_type,value,last_changed)
         self.tree.item(obj_value_id.id, text=text, tags=('updated'))
     
     self.root.after(10000, self.reset_foreground, obj_value_id.id)