private void MAdapterOnMessageButtonItemClick(object sender, ShowApplyJobsAdapterClickEventArgs e) { try { var item = MAdapter.GetItem(e.Position); if (item != null) { switch (AppSettings.MessengerIntegration) { case true when AppSettings.ShowDialogAskOpenMessenger: { var dialog = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialog.Title(Resource.String.Lbl_Warning).TitleColorRes(Resource.Color.primary); dialog.Content(GetText(Resource.String.Lbl_ContentAskOPenAppMessenger)); dialog.PositiveText(GetText(Resource.String.Lbl_Yes)).OnPositive((materialDialog, action) => { try { Intent intent = new Intent(this, typeof(ChatWindowActivity)); intent.PutExtra("UserID", item.UserData.UserId); intent.PutExtra("TypeChat", "User"); intent.PutExtra("UserItem", JsonConvert.SerializeObject(item.UserData)); StartActivity(intent); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }); dialog.NegativeText(GetText(Resource.String.Lbl_No)).OnNegative(new WoWonderTools.MyMaterialDialog()); dialog.AlwaysCallSingleChoiceCallback(); dialog.Build().Show(); break; } case true: Intent intent = new Intent(this, typeof(ChatWindowActivity)); intent.PutExtra("UserID", item.UserData.UserId); intent.PutExtra("TypeChat", "User"); intent.PutExtra("UserItem", JsonConvert.SerializeObject(item.UserData)); StartActivity(intent); break; } } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void MAdapterOnMessageButtonItemClick(object sender, ShowApplyJobsAdapterClickEventArgs e) { try { var item = MAdapter.GetItem(e.Position); if (item != null) { if (AppSettings.MessengerIntegration) { var dialog = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialog.Title(Resource.String.Lbl_Warning); dialog.Content(GetText(Resource.String.Lbl_ContentAskOPenAppMessenger)); dialog.PositiveText(GetText(Resource.String.Lbl_Yes)).OnPositive((materialDialog, action) => { try { Methods.App.OpenAppByPackageName(this, AppSettings.MessengerPackageName, "OpenChat", new ChatObject { UserId = item.UserData.UserId, Name = item.UserData.Name, Avatar = item.UserData.Avatar }); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }); dialog.NegativeText(GetText(Resource.String.Lbl_No)).OnNegative(new WoWonderTools.MyMaterialDialog()); dialog.AlwaysCallSingleChoiceCallback(); dialog.Build().Show(); } } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void MAdapterOnItemClick(object sender, ShowApplyJobsAdapterClickEventArgs e) { try { var item = MAdapter.GetItem(e.Position); if (item != null) { ObeeNetworkTools.OpenProfile(this, item.UserData.UserId, item.UserData); } } catch (Exception exception) { Console.WriteLine(exception); } }