Added close events to AddDialog()