MainWindow and Dialog supports persistent settings