def PrintRecord( self ) : recordList = self.db.GetRecord( ) index = 0 while( index < recordList.__len__() ) : slowPrint( ' ' , 0.05 ) print( recordList[index] ) if( ( index + 1 ) % 7 == 0 ) : input_ = raw_input( '\nEnter to continue, input \'#\' to stop' ) if( input_ == '#' ) : break index = index + 1 input_ = raw_input( '\n...END Press any key to go back' )
def PrintStationNameList( self ) : nameList = self.db.GetStationNameList( ) index = 0 ; while( index < nameList.__len__( ) ) : if( index % 4 == 0 ) : if( index + 4 < nameList.__len__( ) ) : slowPrint( '\n %2d ~ %2d : ' % ( index + 1 , index + 4 ) , 0.00025 ) else : slowPrint( '\n %02d ~ %02d : ' % ( index + 1 , nameList.__len__( ) ) , 0.00025 ) slowPrint( '%s ' % nameList[index] , 0.00025 ) index = index + 1 slowPrint( '\n' )
def adminTips(self): self.cls() slowPrint('\n') slowPrint(' [+] Welcome! \n') slowPrint(' [+] This station is [ %s ] \n' % self.db.GetThisStationName()) slowPrint(' [+] This machine has [ %d ] tickets now\n' % self.db.GetTicketLeft()) slowPrint(' [+] Today is %s \n' % (time.strftime("%Y-%m-%d", time.localtime(time.time())))) slowPrint(' [+] You can go back by inputing \'#\' at any time\n') slowPrint(' [+] Careful! This is administrate mode\n') slowPrint('\n')
def tips(self): self.cls() slowPrint('\n') slowPrint(' Welcome! \n') slowPrint(' This station is [ %s ] \n' % self.db.GetThisStationName()) slowPrint(' This machine has [ %d ] tickets now\n' % self.db.GetTicketLeft()) slowPrint(' Today is %s \n' % (time.strftime("%Y-%m-%d", time.localtime(time.time())))) slowPrint(' You can go back by inputing \'#\' at any time\n') slowPrint('\n')
def printTicket(self, begin, end, price): slowPrint('\n') slowPrint(' This is your ticket , have a nice trip \n') slowPrint('\n') slowPrint(' +--------------------------------------+ \n') slowPrint(' | Metro Ticket | \n') slowPrint(' +--------------------------------------+ \n') slowPrint(' | %s -> %s \n' % (begin, end)) slowPrint(' | price : %d |\n' % price) slowPrint(' +--------------------------------------+ \n')
def change( self , money ) : slowPrint( '\n' ) slowPrint( '----------------------------------------------------\n' ) slowPrint( ' This is your money for change/refund : [ %d ]\n' % money ) slowPrint( '----------------------------------------------------\n' ) slowPrint( '\n' )
def adminServices( self ) : slowPrint( '\n' ) slowPrint( ' [+] Services : \n' ) slowPrint( '\n' ) slowPrint( ' [+] 1. Print Selling Record\n' ) slowPrint( ' [+] 2. Add tickets to this machine\n' ) slowPrint( ' [+] 3. Change this station name\n' )
def services( self ) : slowPrint( '\n' ) slowPrint( ' Services : \n' ) slowPrint( '\n' ) slowPrint( ' 1. Buy metro ticket\n' ) slowPrint( ' 2. Manager this mechine\n' )
def printTicket( self , begin , end , price ) : slowPrint( '\n' ) slowPrint( ' This is your ticket , have a nice trip \n' ) slowPrint( '\n' ) slowPrint( ' +--------------------------------------+ \n' ) slowPrint( ' | Metro Ticket | \n' ) slowPrint( ' +--------------------------------------+ \n' ) slowPrint( ' | %s -> %s \n' % ( begin , end ) ) slowPrint( ' | price : %d |\n' % price ) slowPrint( ' +--------------------------------------+ \n' )
def adminTips( self ) : self.cls( ) slowPrint( '\n' ) slowPrint( ' [+] Welcome! \n' ) slowPrint( ' [+] This station is [ %s ] \n' % self.db.GetThisStationName( ) ) slowPrint( ' [+] This machine has [ %d ] tickets now\n' % self.db.GetTicketLeft( ) ) slowPrint( ' [+] Today is %s \n' % ( time.strftime( "%Y-%m-%d" , time.localtime( time.time() ) ) ) ) slowPrint( ' [+] You can go back by inputing \'#\' at any time\n' ) slowPrint( ' [+] Careful! This is administrate mode\n' ) slowPrint( '\n' )
def tips( self ) : self.cls( ) slowPrint( '\n' ) slowPrint( ' Welcome! \n' ) slowPrint( ' This station is [ %s ] \n' % self.db.GetThisStationName( ) ) slowPrint( ' This machine has [ %d ] tickets now\n' % self.db.GetTicketLeft( ) ) slowPrint( ' Today is %s \n' % ( time.strftime( "%Y-%m-%d" , time.localtime( time.time() ) ) ) ) slowPrint( ' You can go back by inputing \'#\' at any time\n' ) slowPrint( '\n' )