private void mainMenuView_Properties(object sender, EventArgs e) { using (var form = formFactory.CreatePropertiesForm()) { form.RsaFileColor = options.RsaFileColor.Color; if (form.ShowDialog() == DialogResult.OK) { options.RsaFileColor.Color = form.RsaFileColor; commandsContainer.RefreshDirectoryCommand.Execute(); } } }