コード例 #1
0
 def on_barcode(self, barcode):
     if not barcode:
         return
     user = Users.get_by_id_card(barcode)
     if user:
         ScreenManager.get_instance().set_active(
             ProfileScreen(self.screen, user))
コード例 #2
0
 def on_barcode(self, barcode):
     from .screen_manager import ScreenManager
     from .profile import ProfileScreen
     if not barcode:
         return
     user = Users.get_by_id_card(barcode)
     if user:
         ScreenManager.get_instance().set_active(
             ProfileScreen(self.screen, user))
コード例 #3
0
 def on_barcode(self, barcode):
     if not barcode:
         return
     self.processing.is_visible = True
     user = Users.get_by_id_card(barcode)
     if user:
         ScreenManager.get_instance().set_active(
             ProfileScreen(self.screen, user))
         self.processing.is_visible = False
         return
     drink = get_by_ean(barcode)
     DrinksManager.get_instance().set_selected_drink(drink)
     self.barcode_label.text = drink['name']
     self.show_scanned_info(True)
     self.processing.is_visible = False
     self.timeout.start()
コード例 #4
0
 def on_barcode(self, barcode):
     if not barcode:
         return
     self.processing.is_visible = True
     user = Users.get_by_id_card(barcode)
     if user:
         ScreenManager.get_instance().set_active(
             ProfileScreen(self.screen, user)
         )
         self.processing.is_visible = False
         return
     drink = get_by_ean(barcode)
     DrinksManager.get_instance().set_selected_drink(drink)
     self.barcode_label.text = drink['name']
     self.show_scanned_info(True)
     self.processing.is_visible = False
     self.timeout.start()
コード例 #5
0
 def on_barcode(self, barcode):
     if not barcode:
         return
     self.processing.is_visible = True
     user = Users.get_by_id_card(barcode)
     if user:
         ScreenManager.get_instance().set_active(
             ProfileScreen(self.screen, user)
         )
         self.processing.is_visible = False
         return
     drink = get_by_ean(barcode)
     DrinksManager.get_instance().set_selected_drink(drink)
     self.drink_info.text = drink['name']
     if self.zuordnen not in self.objects:
         self.objects.extend([self.zuordnen, self.drink_info])
     if self.btn_aufladungen in self.objects:
         self.objects.remove(self.btn_aufladungen)
     if self.btn_drinks in self.objects:
         self.objects.remove(self.btn_drinks)
     self.processing.is_visible = False
     self.timeout.start()