Refactor code:Add Pattern SIngelton for calculator event.