private void GetNewPassword(OfxDownloadData ofxData)
        {
            var info = OfxRequest.GetSignonInfo(this.myMoney, ofxData.OnlineAccount);

            ChangePasswordDialog dialog = new ChangePasswordDialog(info, ofxData.OnlineAccount, this.myMoney);

            dialog.Owner = Application.Current.MainWindow;

            if (dialog.ShowDialog() == true)
            {
                ofxData.Message     = "New password is accepted";
                ofxData.LinkCaption = this.tryAgainCaption = "Try Download Again";
                ofxData.OfxError    = OfxErrorCode.None;
                ofxData.Error       = null;
            }
            else
            {
                Exception ex = dialog.Error;
                if (ex != null)
                {
                    ofxData.Message = ex.Message;
                }
                else
                {
                    ofxData.Message = "User cancelled";
                }
            }
        }
        private void GetLogin(OfxDownloadData ofxData)
        {
            var info = OfxRequest.GetSignonInfo(this.myMoney, ofxData.OnlineAccount);

            string msg = (ofxData.Error != null) ? ofxData.Error.Message : null;

            OfxLoginDialog login = new OfxLoginDialog(info, ofxData.OnlineAccount, null, ofxData.OfxError, msg);

            login.Owner = Application.Current.MainWindow;

            if (login.ShowDialog() == true)
            {
                ofxData.Message     = "New credentials are ready.";
                ofxData.LinkCaption = this.tryAgainCaption = "Try Download Again";
                ofxData.OfxError    = OfxErrorCode.None;
                ofxData.Error       = null;
            }
            else
            {
                ofxData.Message = "User cancelled";
            }
        }
        private void GetAuthenticationToken(OfxDownloadData ofxData, OfxErrorCode code)
        {
            var info = OfxRequest.GetSignonInfo(this.myMoney, ofxData.OnlineAccount);

            if (info != null)
            {
                PromptForAuthToken(ofxData, info, code);

                if (string.IsNullOrWhiteSpace(ofxData.OnlineAccount.AuthToken))
                {
                    // user cancelled.
                    ofxData.Message = "User cancelled";
                    return;
                }
                else
                {
                    ofxData.Message     = "Your authorization token is ready to use";
                    ofxData.LinkCaption = this.tryAgainCaption = "Try Download Again";
                    ofxData.OfxError    = OfxErrorCode.None;
                    ofxData.Error       = null;
                }
            }
        }