Class MainDialog fully redeveloped