def Wintbs(self):
y = self.WinOtopData[self.ID_PAD_TBS][1]
x = self.WinOtopData[self.ID_PAD_TBS][2]
nlines = self.WinOtopData[self.ID_PAD_TBS][3]
hsize = len(self.Vtbsdata_head)
self.tbs_head = 'Tablespace - max five used'
Ltmp=(self.ID_PAD_TBS,y,x,nlines,hsize)
self.padrefreshcoord.append(Ltmp)
try:
self.tbspad = curses.newpad(y+nlines+3,x+hsize+2)
self.tbswinbox = curses.newwin( nlines+3, hsize+3, y, x)
except Exception as err:
self.tbspad =-1
self.WinPrintError("Wintbs curses Error:"+str(err) )
finally:
try:
if not self.WinCheckThreadAlive(self.idthtbs):
self.idthtbs = threading.Thread(target=self._WintbsshowTH,name='tbsTH')
self.idthtbs.setDaemon(True)
self.thConfig.append((self.ID_PAD_TBS,1))
else:
self.lockvideo.acquire()
self.tbspad.addstr(1,1,self.Vtbsdata_head,self.CYANONBLACK)
self.tbspad.addstr(2,2,"waiting refresh..." ,self.GREENONBLACK)
self.tbspad.refresh(1,0,y+1,x+1,y+nlines+1,x+hsize)
self.lockvideo.release()
except Exception as err:
self.tbspad =-10
self.WinPrintError("Wintbs thrd Error:"+str(err) )
评论列表
文章目录