界面执行程序

def run(self):
        '''界面执行程序'''
        while True:
            self.display()
            c = getch.getch()
            if c == self.KEYS['UP'] or c == 'A' and self.markline != 1:
                self.updown(-1)
            elif c == self.KEYS['DOWN'] or c == 'B':
                self.updown(1)
            elif c == self.KEYS['QUIT']:
                self.win.state = 0
                break
            elif c == ' ':
                self.playsong()
            elif c == self.KEYS['TOP']:      # g键返回顶部
                self.markline = 1
                self.topline = 0
            elif c == self.KEYS['BOTTOM']:   # G键返回底部
                if len(self.lines) < self.screen_height:
                    self.markline = len(self.lines) - 1
                else:
                    self.markline = self.screen_height
                    self.topline = len(self.lines) - self.screen_height - 1
            elif c == 'h' or c == 'D':
                self.state -= 1 if self.state != 0 else -2
                self.get_lines()
            elif c == 'l' or c == 'C':
                self.state += 1 if self.state != 2 else -2
                self.get_lines()