/// <summary> /// Validates the credentials. /// </summary> void ValidateCredentials() { if (!IsInEditModus) { CheckCanvas.Visibility = Visibility.Collapsed; } LoaderCanvas.Visibility = Visibility.Visible; IsChecking = true; #region Set channel authentication if (ChannelConfiguration.DisplayStyle == DisplayStyle.Other || ChannelConfiguration.Charasteristics.CanCustomize && IsManuallyCustomized) { // Incoming Settings ChannelConfiguration.InputChannel.Authentication.Username = ManualEntryIncomingUsername; ChannelConfiguration.InputChannel.Authentication.Password = ManualEntryIncomingPassword; ChannelConfiguration.InputChannel.Hostname = ManualEntryIncomingServer; ChannelConfiguration.InputChannel.Port = ManualEntryIncomingPort; ChannelConfiguration.InputChannel.IsSecured = ManualEntryIncomingSsl; ChannelConfiguration.InputChannel.Type = AccountTypeImapRadioButton.IsChecked == true ? typeof(Imap2ClientChannel) : typeof(Pop3ClientChannel); // Outgoing Settings ChannelConfiguration.OutputChannel.Authentication.Username = ManualEntryOutgoingUsername; ChannelConfiguration.OutputChannel.Authentication.Password = ManualEntryOutgoingPassword; ChannelConfiguration.OutputChannel.Hostname = ManualEntryOutgoingServer; ChannelConfiguration.OutputChannel.Port = ManualEntryOutgoingPort; ChannelConfiguration.OutputChannel.IsSecured = ManualEntryOutgoingSsl; ChannelBuilder.SetChannelAuthentication( ManualEntryIncomingUsername, ManualEntryIncomingPassword, ChannelConfiguration.InputChannel, ChannelConfiguration.OutputChannel); } else { if (ChannelConfiguration.DisplayStyle == DisplayStyle.Advanced) { ChannelBuilder.SetChannelHostname( HostnameTextBox.Text, ChannelConfiguration.InputChannel, ChannelConfiguration.OutputChannel, ChannelConfiguration.ContactsChannel, ChannelConfiguration.CalendarChannel, ChannelConfiguration.StatusUpdatesChannel); } ChannelBuilder.SetChannelAuthentication( Username, Password, ChannelConfiguration.InputChannel, ChannelConfiguration.OutputChannel, ChannelConfiguration.ContactsChannel, ChannelConfiguration.CalendarChannel, ChannelConfiguration.StatusUpdatesChannel); } #endregion // Start loader animation ((Storyboard)FindResource("RunLoaderStoryboard")).Begin(); ValidateLocalCredentials(); }