Пример #1
0
 def decorate(self, border=False, slim=False):
     if border:
         frame.switch(self.frame, frame.Border)
     elif slim:
         frame.switch(self.frame, frame.SlimBorder)
     else:
         frame.switch(self.frame, frame.Full)
Пример #2
0
def makemenu(win):
	global flag_save
	flag_save=0
	top=Menu(win)
	win.config(menu=top)
	sys=Menu(top,tearoff=False)
	sys.add_command(label='切换用户',
	command=lambda:change_admin(win),underline=0)
	top.add_cascade(label='系统',menu=sys,underline=0)
	
	analysis=Menu(top,tearoff=False)
	analysis.add_command(label='电压和频率偏差',
	command=lambda:frame.switch(8),underline=0)
	analysis.add_command(label='谐波分析',
	command=lambda:frame.switch(9),underline=0)
	analysis.add_command(label='三相不平衡',
	command=lambda:frame.switch(10),underline=0)
	top.add_cascade(label='电能质量显示',menu=analysis,underline=0)
	
	view=Menu(top,tearoff=False)
	view.add_command(label='A相有效值波形图',
	command=lambda:frame.switch(0),underline=0)
	view.add_command(label='B相有效值波形图',
	command=lambda:frame.switch(1),underline=0)
	view.add_command(label='C相有效值波形图',
	command=lambda:frame.switch(2),underline=0)
	view.add_command(label='A相瞬时值波形图',
	command=lambda:frame.switch(3),underline=0)
	view.add_command(label='B相瞬时值波形图',
	command=lambda:frame.switch(4),underline=0)
	view.add_command(label='C相瞬时值波形图',
	command=lambda:frame.switch(5),underline=0)
	view.add_command(label='电流电压数据表  ',
	command=lambda:frame.switch(6),underline=0)
	view.add_command(label='三相功率数据表  ',
	command=lambda:frame.switch(7),underline=0)
	top.add_cascade(label='基本电量显示',menu=view,underline=0)

	
	tool=Menu(top,tearoff=False)
	tool.add_command(label='开始记录',
	command=save.save_start,underline=0)
	tool.add_command(label='结束记录',
	command=save.save_stop,underline=0)
	tool.add_command(label='历史数据查询',
	command=save.save_window,underline=0)
	top.add_cascade(label='数据记录',menu=tool,underline=0)
	

	help=Menu(top,tearoff=False)
	help.add_command(label='关于',command=about,underline=0)
	top.add_cascade(label='帮助',menu=help,underline=0)
Пример #3
0
 def frame_nada(self):
     frame.switch(self.frame, frame.Nada)
Пример #4
0
 def frame_slimborder(self):
     frame.switch(self.frame, frame.SlimBorder)
Пример #5
0
 def frame_border(self):
     frame.switch(self.frame, frame.Border)
Пример #6
0
 def frame_full(self):
     frame.switch(self.frame, frame.Full)
Пример #7
0
 def undecorate(self):
     frame.switch(self.frame, frame.Nada)
Пример #8
0
 def frame_switch(self, frame_cls):
     frame.switch(self.frame, frame_cls)