Skip to content

Commit

Permalink
增加功能描述
Browse files Browse the repository at this point in the history
  • Loading branch information
caitinggui committed Jan 14, 2017
1 parent 5b60bb6 commit 43f6a7e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions NEMbox/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,13 @@ def start(self):
timing_time = self.ui.build_timing()
if timing_time.isdigit():
timing_time = int(timing_time)
notify('The musicbox will exit in {} minutes'.format(timing_time))
timing_time = timing_time * 60
timing_flag = True
if timing_time:
notify('The musicbox will exit in {} minutes'.format(timing_time))
timing_time = timing_time * 60
timing_flag = True
else:
notify('The timing exit has been canceled')
timing_flag = False
else:
notify('The input should be digit')

Expand Down
2 changes: 2 additions & 0 deletions NEMbox/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ def build_timing(self):
self.screen.timeout(-1)
self.addstr(8, self.startcol, '输入定时时间(min):',
curses.color_pair(1))
self.addstr(11, self.startcol, 'ps:定时时间为整数,输入0代表取消定时退出',
curses.color_pair(1))
self.screen.timeout(-1) # disable the screen timeout
curses.echo()
timing_time = self.screen.getstr(8, self.startcol + 19, 60)
Expand Down

0 comments on commit 43f6a7e

Please sign in to comment.