예제 #1
0
파일: WindowLogic.py 프로젝트: yottu/yottu
class WindowLogic(threading.Thread):
	'''
	classdocs
	'''

	def __init__(self, stdscr):
		
		self.stdscr = stdscr
		self.dlog = DebugLog()
		try:
			self.windowList = []
			
			self.compad = CommandPad(stdscr)
			
			self.windowList.append(self.compad)
			self.set_active_window(0)
			self.compad.draw()
			
#			board = "int"
#			threadno = "50294416"
			self.nickname = "asdfasd"
			
			
#			self.bp = BoardPad(stdscr)
#			self.bp.join(board, threadno, self.nickname)
#			self.windowList.append(self.bp)
#			self.set_active_window(1)
			
			Thread.__init__(self)
			self._stop = threading.Event()
		except:
			raise
		
	def join_thread(self, board, thread):
		try:
			self.dlog.msg("Creating new boardpad for " + thread + " on /" + board + "/\n")
			boardpad = BoardPad(self.stdscr)
			boardpad.join(board, thread, self.nickname)
			self.windowList.append(boardpad)
			self.set_active_window(1)
		except Exception, err:
			self.dlog.excpt(err)