コード例 #1
0
ファイル: classes.py プロジェクト: amaranth0203/Sources
 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' )
コード例 #2
0
ファイル: classes.py プロジェクト: amaranth0203/Sources
 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' )
コード例 #3
0
ファイル: classes.py プロジェクト: chinaofmelon/Sources
 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')
コード例 #4
0
ファイル: classes.py プロジェクト: chinaofmelon/Sources
 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')
コード例 #5
0
ファイル: classes.py プロジェクト: chinaofmelon/Sources
 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')
コード例 #6
0
ファイル: classes.py プロジェクト: chinaofmelon/Sources
 def change( self , money ) :
     slowPrint( '\n' )
     slowPrint( '----------------------------------------------------\n' )
     slowPrint( '  This is your money for change/refund : [ %d ]\n' % money )
     slowPrint( '----------------------------------------------------\n' )
     slowPrint( '\n' )
コード例 #7
0
ファイル: classes.py プロジェクト: chinaofmelon/Sources
 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' )
コード例 #8
0
ファイル: classes.py プロジェクト: chinaofmelon/Sources
 def services( self ) :
     slowPrint( '\n' ) 
     slowPrint( '   Services : \n' )
     slowPrint( '\n' )
     slowPrint( '    1. Buy metro ticket\n' )
     slowPrint( '    2. Manager this mechine\n' )    
コード例 #9
0
ファイル: classes.py プロジェクト: amaranth0203/Sources
 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' )
コード例 #10
0
ファイル: classes.py プロジェクト: amaranth0203/Sources
 def change( self , money ) :
     slowPrint( '\n' )
     slowPrint( '----------------------------------------------------\n' )
     slowPrint( '  This is your money for change/refund : [ %d ]\n' % money )
     slowPrint( '----------------------------------------------------\n' )
     slowPrint( '\n' )
コード例 #11
0
ファイル: classes.py プロジェクト: amaranth0203/Sources
 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' )
コード例 #12
0
ファイル: classes.py プロジェクト: amaranth0203/Sources
 def services( self ) :
     slowPrint( '\n' ) 
     slowPrint( '   Services : \n' )
     slowPrint( '\n' )
     slowPrint( '    1. Buy metro ticket\n' )
     slowPrint( '    2. Manager this mechine\n' )    
コード例 #13
0
ファイル: classes.py プロジェクト: amaranth0203/Sources
 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' )
コード例 #14
0
ファイル: classes.py プロジェクト: amaranth0203/Sources
 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' )