Exemple #1
0
 def enroll(self, status, event, no):
     if (db.get_status() == 0):
         self.golag = pop.conf_pop('Please Login to get Enroll', 'Login',
                                   lambda x: self.GoLog())
         self.golag.open()
         return
     if status == 'registered':
         return
     self.dialog0 = pop.conf_pop('are you sure to enroll ' + event,
                                 'enroll',
                                 lambda x: self.enroll2(event, no))
     self.dialog0.open()
Exemple #2
0
 def cng_scr(self, scr):
     if (db.get_status() == 0):
         self.golag = pop.conf_pop('Please Login to submit Feedback',
                                   'Login', lambda x: self.GoLog())
         self.golag.open()
         return
     self.main_widget.ids.scr_mngr.current = scr
Exemple #3
0
 def show_logout(self):
     print(db.get_status())
     if (db.get_status() == 0):
         self.logout()
         return
     self.dialog0 = pop.conf_pop('are you sure to logout', 'logout',
                                 lambda x: self.logout())
     self.dialog0.open()
Exemple #4
0
 def load_info(self):
     if (db.get_status() == 0):
         self.golag = pop.conf_pop('Please Login to get info', 'Login',
                                   lambda x: self.GoLog())
         self.golag.open()
         return
     if self.info_state == 0:
         self.main_widget.ids.scr_mngr.add_widget(person.lis())
         self.info_state = 2
     elif self.info_state == 1:
         self.main_widget.ids.scr_mngr.get_screen('info').clear_widgets()
         self.main_widget.ids.scr_mngr.get_screen('info').__init__()
     self.path_back.append('vute')
     self.main_widget.ids.scr_mngr.current = 'info'
Exemple #5
0
    def cng_screen1(self, non, pro=0):
        if (pro == 1):
            if ((non == "prof1") & (not self.prof_con[0])):
                print('loading')
                self.prof_con[0] = True
                self.main_widget.ids.scr_mngr.add_widget(prof.prof1())
            if ((non == "prof2") & (not self.prof_con[1])):
                self.prof_con[1] = True
                self.main_widget.ids.scr_mngr.add_widget(prof.prof2())
            if ((non == "prof3") & (not self.prof_con[2])):
                self.prof_con[2] = True
                self.main_widget.ids.scr_mngr.add_widget(prof.prof3())
            if ((non == "cont") & (not self.prof_con[3])):
                self.prof_con[3] = True
                self.main_widget.ids.scr_mngr.add_widget(events.contact())
            if ((non == "shed") & (not self.prof_con[4])):
                try:
                    self.main_widget.ids.scr_mngr.add_widget(listest.lis())
                except Exception:
                    self.dialog0 = pop.conf_pop(
                        'no Internet Connection', 'Dismiss',
                        lambda x: self.dialog0.dismiss())
                    self.dialog0.open()
                    self.dialoga.dismiss()
                    return
                self.prof_con[4] = True
            try:
                self.dialoga.dismiss()
            except Exception:
                pass
            self.main_widget.ids.scr_mngr.current = non
            return

        if not self.main_widget.ids.scr_mngr.has_screen('show' + str(non)):
            if (non == 1):
                self.main_widget.ids.scr_mngr.add_widget(events.show1())
                self.event_scr_effects[non - 1] = 0
            if (non == 2):
                self.main_widget.ids.scr_mngr.add_widget(events.show2())
                self.event_scr_effects[non - 1] = 0
            if (non == 3):
                self.main_widget.ids.scr_mngr.add_widget(events.show3())
                self.event_scr_effects[non - 1] = 0
            if (non == 4):
                self.main_widget.ids.scr_mngr.add_widget(events.show4())
                self.event_scr_effects[non - 1] = 0
            if (non == 5):
                self.main_widget.ids.scr_mngr.add_widget(events.show5())
                self.event_scr_effects[non - 1] = 0
            if (non == 6):
                self.main_widget.ids.scr_mngr.add_widget(events.show6())
                self.event_scr_effects[non - 1] = 0
            self.path_back.append('event')
            try:
                self.dialoga.dismiss()
            except Exception:
                pass
            self.main_widget.ids.scr_mngr.current = 'show' + str(non)
            return
        if self.event_scr_effects[non - 1] == 0:
            self.path_back.append('event')
            try:
                self.dialoga.dismiss()
            except Exception:
                pass
            self.main_widget.ids.scr_mngr.current = 'show' + str(non)
            return
        posta = int(db.get_db(non))
        if (posta == 1):
            nor = 'registered'
            nocolor = self.theme_cls.green_color
        else:
            nor = 'enroll'
            nocolor = self.theme_cls.primary_color
        self.main_widget.ids.scr_mngr.get_screen('show' +
                                                 str(non)).ids.but.text = nor
        self.main_widget.ids.scr_mngr.get_screen(
            'show' + str(non)).ids.but.md_bg_color = nocolor
        self.event_scr_effects[non - 1] = 0
        self.path_back.append('event')
        try:
            self.dialoga.dismiss()
        except Exception:
            pass
        self.main_widget.ids.scr_mngr.current = 'show' + str(non)