当前位置: 首页>>代码示例>>C#>>正文


C# InvokeOperation.CheckErrorStatus方法代码示例

本文整理汇总了C#中InvokeOperation.CheckErrorStatus方法的典型用法代码示例。如果您正苦于以下问题:C# InvokeOperation.CheckErrorStatus方法的具体用法?C# InvokeOperation.CheckErrorStatus怎么用?C# InvokeOperation.CheckErrorStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在InvokeOperation的用法示例。


在下文中一共展示了InvokeOperation.CheckErrorStatus方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnSendEmailCompleted

		private void OnSendEmailCompleted(InvokeOperation operation)
		{
			x_OK.IsEnabled = true;
			string errorStatus = operation.CheckErrorStatus();
			if (errorStatus != null)
			{
				x_ErrorStatus.Text = errorStatus;
				return;
			}

			x_ErrorStatus.Text = null;
			DialogResult = MessageBoxResult.OK;
		}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例2: OnValidateResetPasswordCompleted

		private void OnValidateResetPasswordCompleted(InvokeOperation<string> operation)
		{
			string errorStatus = operation.CheckErrorStatus();
			string userName = (errorStatus != null ? null : operation.Value);
			if (userName != null)
			{
				AuthenticationDialog dialog = new AuthenticationDialog(AuthenticationDialog.DialogType.ResetPassword);
				dialog.ResetUserName = userName;
				dialog.ResetPasswordCode = m_ResetPasswordCode;
			}
			else
			{
				AuthenticationDialog dialog = new AuthenticationDialog(AuthenticationDialog.DialogType.RecoverSignIn);
				dialog.RecoverErrorStatus = "Sorry but the link you clicked on is no longer valid.  Enter your email address again and we will send you a new recovery email.";
			}
		}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例3: OnDeleteCompleted

		private void OnDeleteCompleted(InvokeOperation<bool> operation)
		{
			x_Delete.IsEnabled = true;
			string errorStatus = operation.CheckErrorStatus();
			bool deleted = (errorStatus == null && operation.Value == true);
			if (!deleted)
			{
				x_DeleteErrorStatus.Text = (errorStatus != null ? errorStatus : g_AccountNotDeleted);
				x_DeleteErrorStatus.Visibility = Visibility.Visible;
				return;
			}

			App.Model.UserServices.Logout(null, null);
			x_DeleteErrorStatus.Text = null;
			x_DeleteErrorStatus.Visibility = Visibility.Collapsed;
			DialogResult = (deleted ? MessageBoxResult.OK : MessageBoxResult.Cancel);
		}
开发者ID:,项目名称:,代码行数:17,代码来源:

示例4: OnChangePasswordCompleted

		private void OnChangePasswordCompleted(InvokeOperation<bool> operation)
		{
			x_Change.IsEnabled = true;
			string errorStatus = operation.CheckErrorStatus();
			bool changed = (errorStatus == null && operation.Value == true);
			if (!changed)
			{
				x_ChangeErrorStatus.Text = (errorStatus != null ? errorStatus : g_PasswordNotChanged);
				x_ChangeErrorStatus.Visibility = Visibility.Visible;
				return;
			}

			x_ChangeErrorStatus.Text = null;
			x_ChangeErrorStatus.Visibility = Visibility.Collapsed;
			x_ChangeCurrentPassword.Password = "";
			x_ChangeNewPassword.Password = "";
			DialogResult = (changed ? MessageBoxResult.OK : MessageBoxResult.Cancel);
		}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例5: OnResetPasswordCompleted

		private void OnResetPasswordCompleted(InvokeOperation<bool> operation)
		{
			x_Reset.IsEnabled = true;
			string errorStatus = operation.CheckErrorStatus();
			if (errorStatus != null)
			{
				x_ResetErrorStatus.Text = errorStatus;
				x_ResetErrorStatus.Visibility = Visibility.Visible;
				return;
			}

			App.Model.UserServices.Login(ResetUserName, ResetPassword, true/*isPersistent*/, OnResetPasswordCompletedStep2, null/*userState*/);

			x_ResetErrorStatus.Text = null;
			x_ResetErrorStatus.Visibility = Visibility.Collapsed;
			DialogResult = MessageBoxResult.OK;
		}
开发者ID:,项目名称:,代码行数:17,代码来源:

示例6: OnRecoverCompleted

		private void OnRecoverCompleted(InvokeOperation operation)
		{
			x_Recover.IsEnabled = true;
			string errorStatus = operation.CheckErrorStatus();
			if (errorStatus != null)
			{
				x_RecoverErrorStatus.Text = errorStatus;
				x_RecoverErrorStatus.Visibility = Visibility.Visible;
				return;
			}

			x_RecoverErrorStatus.Text = null;
			x_RecoverErrorStatus.Visibility = Visibility.Collapsed;
			base.Closed += OnRecoverDialogClosed;
			DialogResult = MessageBoxResult.OK;
		}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例7: OnRegisterCompletedStep4

		private void OnRegisterCompletedStep4(InvokeOperation operation)
		{
			string errorStatus = operation.CheckErrorStatus();
			if (errorStatus != null)
			{
				MessageBoxEx.ShowError("Register account", errorStatus, null);
				return;
			}
		}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例8: OnDeleteUserCompleted

		private void OnDeleteUserCompleted(InvokeOperation<bool> operation)
		{
			x_Signin.IsEnabled = true;
			string errorStatus = operation.CheckErrorStatus();
			bool deleted = (errorStatus == null && operation.Value == true);
			x_SignInErrorStatus.Text = string.Format("User account '{0}' was{1} deleted", SignInUserName, (deleted ? "" : " NOT"));
			x_SignInErrorStatus.Visibility = Visibility.Visible;
		}
开发者ID:,项目名称:,代码行数:8,代码来源:


注:本文中的InvokeOperation.CheckErrorStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。