/// <summary>
        /// Creates the redirect.
        /// </summary>
        void CreateRedirect()
        {
            // Create an instance of the InputChannel and check the provided credentials
            var window = new ChannelSetupRedirectWindow(ChannelConfiguration, false);

            window.ShowDialog();

            if (window.Success.HasValue)
            {
                if (window.Success ?? false)
                {
                    token       = window.Token;
                    tokenSecret = window.TokenSecret;

                    // Control is hidden anyway so doesn't matter that we use it for temporarily storing results.
                    // Value of this field if picked up again in the ValidateCredentials method.
                    PincodeTextBox.Text = window.LastUri.ToString();

                    ValidateCredentials();
                }
                else
                {
                    Inbox2MessageBox.Show(String.Format(Strings.AddingAccountFailed, ChannelConfiguration.DisplayName), Inbox2MessageBoxButton.OK);

                    FailureCount++;
                }
            }
            else
            {
                // Close setup control if we didn't get a result (user closed popup window)
                if (OnCancel != null)
                {
                    OnCancel(this, EventArgs.Empty);
                }
            }
        }
        /// <summary>
        /// Creates the redirect.
        /// </summary>
        void CreateRedirect()
        {
            // Create an instance of the InputChannel and check the provided credentials
            var window = new ChannelSetupRedirectWindow(ChannelConfiguration, false);

            window.ShowDialog();

            if (window.Success.HasValue)
            {
                if (window.Success ?? false)
                {
                    token = window.Token;
                    tokenSecret = window.TokenSecret;

                    // Control is hidden anyway so doesn't matter that we use it for temporarily storing results.
                    // Value of this field if picked up again in the ValidateCredentials method.
                    PincodeTextBox.Text = window.LastUri.ToString();

                    ValidateCredentials();
                }
                else
                {
                    Inbox2MessageBox.Show(String.Format(Strings.AddingAccountFailed, ChannelConfiguration.DisplayName), Inbox2MessageBoxButton.OK);

                    FailureCount++;
                }
            }
            else
            {
                // Close setup control if we didn't get a result (user closed popup window)
                if (OnCancel != null)
                {
                    OnCancel(this, EventArgs.Empty);
                }
            }
        }