auto add dialog base functions
#40 auto show and hide gate dialog