本文整理汇总了C#中Android.App.Activity.SetResult方法的典型用法代码示例。如果您正苦于以下问题:C# Activity.SetResult方法的具体用法?C# Activity.SetResult怎么用?C# Activity.SetResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.App.Activity
的用法示例。
在下文中一共展示了Activity.SetResult方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetActivityResult
public void SetActivityResult(Activity activity, Result result)
{
Intent data = new Intent();
ToIntent(data);
activity.SetResult(result, data);
}
示例2: onSignOutRequest
public static void onSignOutRequest(Activity _activity){
new System.Threading.Thread(new System.Threading.ThreadStart(() => {
//TCSignalRClient.getInstance().stop();
if(MApplication.getInstance().tcSignalR != null){
MApplication.getInstance().tcSignalR.stop();
}
})).Start();
if (constants.isSignInFromSplashScreen) {
constants.isSignInFromSplashScreen = false;
Intent intent = new Intent (_activity, typeof(HomeActivity));
_activity.StartActivity (intent);
} else {
_activity.SetResult (Result.Ok);
}
// Clear observer
if (HomeDashBoard.homeDashBoardActivity != null) {
TCNotificationCenter.defaultCenter.removeObserver (HomeDashBoard.homeDashBoardActivity, Constants.kPostNotifyAlertChange);
try{
HomeDashBoard.homeDashBoardActivity.Finish ();
} catch(Exception ex){
#if DEBUG
Console.Write(ex.Message);
#endif
}
}
if(SearchResultActivity.searchActivity != null){
TCNotificationCenter.defaultCenter.removeObserver (SearchResultActivity.searchActivity, constants.kAddFavoriteSuccess);
TCNotificationCenter.defaultCenter.removeObserver (SearchResultActivity.searchActivity, constants.kRemoveFavoriteSuccess);
try {
SearchResultActivity.searchActivity.Finish();
} catch(Exception ex){
#if DEBUG
Console.Write(ex.Message);
#endif
}
}
if (SpecialistDetailActivity.specDetailActivity != null) {
TCNotificationCenter.defaultCenter.removeObserver (SpecialistDetailActivity.specDetailActivity, Constants.kUpdateTalkNowStep);
TCNotificationCenter.defaultCenter.removeObserver (SpecialistDetailActivity.specDetailActivity, constants.kDeferSuccess);
try{
SpecialistDetailActivity.specDetailActivity.Finish();
} catch(Exception e){
#if DEBUG
Console.Write(e.Message);
#endif
}
//SpecialistDetailActivity.specDetailActivity = null;
}
if (ListFavoriteActivity.listFavoriteActivity != null) {
TCNotificationCenter.defaultCenter.removeObserver (ListFavoriteActivity.listFavoriteActivity, constants.kRemoveFavoriteSuccess);
TCNotificationCenter.defaultCenter.removeObserver (ListFavoriteActivity.listFavoriteActivity, constants.kAddFavoriteSuccess);
try {
ListFavoriteActivity.listFavoriteActivity.Finish ();
} catch(Exception ex){
#if DEBUG
Console.Write(ex.Message);
#endif
}
}
if (AlertActivity.eventActivity != null) {
try {
TCNotificationCenter.defaultCenter.removeObserver (AlertActivity.eventActivity, Constants.kPostDeleteFileSuccess);
TCNotificationCenter.defaultCenter.removeObserver (AlertActivity.eventActivity, constants.kUpdateAlertWhenDeleteFileLocal);
AlertActivity.eventActivity.Finish ();
} catch(Exception ex){
#if DEBUG
Console.Write(ex.Message);
#endif
}
}
if (ConfirmedRequestsActivity.confirmedActivity != null) {
TCNotificationCenter.defaultCenter.removeObserver (ConfirmedRequestsActivity.confirmedActivity, constants.kDeleteFileConfirmed);
TCNotificationCenter.defaultCenter.removeObserver (ConfirmedRequestsActivity.confirmedActivity, Constants.kPostDeleteFileSuccess);
try {
ConfirmedRequestsActivity.confirmedActivity.Finish ();
} catch(Exception ex){
#if DEBUG
Console.Write(ex.Message);
#endif
}
}
if(PastBookingActivity.pastBookingActivity != null){
TCNotificationCenter.defaultCenter.removeObserver (PastBookingActivity.pastBookingActivity, constants.kDeleteFilePast);
TCNotificationCenter.defaultCenter.removeObserver (PastBookingActivity.pastBookingActivity, constants.kNotifyUpdateBookingInfo);
TCNotificationCenter.defaultCenter.removeObserver (PastBookingActivity.pastBookingActivity, Constants.kPostDeleteFileSuccess);
try {
PastBookingActivity.pastBookingActivity.Finish ();
} catch(Exception ex){
#if DEBUG
Console.Write(ex.Message);
#endif
}
//.........这里部分代码省略.........