private void OpenConfig_Click(object sender, RoutedEventArgs e) { if (File.Exists(configFilePath.Text)) { ConfigWorker.ConfigFile config = ConfigWorker.ReadConfigFile(configFilePath.Text); structToControls(config); } }
private void structToControls(ConfigWorker.ConfigFile config) { eMail.Text = config.Email; User.Text = config.User; Pass.Text = config.Password; Sender.Text = config.Sender; Server.Text = config.SmtpServer; Port.Text = config.SmtpPort; Delay.Text = config.Delay; ConnectionString.Text = config.ConnString; }