change the add and search frames close event

when the add frame is showing, the main fram will not able to
operating...
and the search frame is like the edit frame which is closed by
setVisible() function