private void MAdapterOnItemClick(object sender, SocialLinksAdapterClickEventArgs e) { try { var item = MAdapter.GetItem(e.Position); if (item != null) { SocialItem = item; var dialog = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialog.Title(item.SocialName); dialog.Input(Resource.String.Lbl_Enter_your_link, 0, false, this); dialog.InputType(InputTypes.TextFlagImeMultiLine); dialog.PositiveText(GetText(Resource.String.Lbl_Save)).OnPositive(this); dialog.NegativeText(GetText(Resource.String.Lbl_Cancel)).OnNegative(this); dialog.Build().Show(); dialog.AlwaysCallSingleChoiceCallback(); } } catch (Exception exception) { Console.WriteLine(exception); } }
private void MAdapterOnItemClick(object sender, ManageSessionsAdapterClickEventArgs e) { try { if (!Methods.CheckConnectivity()) { Toast.MakeText(this, GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Long).Show(); return; } ItemSessionsDataObject = MAdapter.GetItem(e.Position); if (ItemSessionsDataObject != null) { 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_AreYouSureLogoutFromThisDevice)); dialog.PositiveText(GetText(Resource.String.Lbl_Ok)).OnPositive(this); dialog.NegativeText(GetText(Resource.String.Lbl_Cancel)).OnNegative(this); dialog.AutoDismiss(true); dialog.AlwaysCallSingleChoiceCallback(); dialog.Build().Show(); } } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtGenderOnTouch(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); if (ListUtils.SettingsSiteList?.Genders?.Count > 0) { arrayAdapter.AddRange(from item in ListUtils.SettingsSiteList?.Genders select item.Value); } else { arrayAdapter.Add(GetText(Resource.String.Radio_Male)); arrayAdapter.Add(GetText(Resource.String.Radio_Female)); } dialogList.Title(GetText(Resource.String.Lbl_Gender)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
public void ShowNormalDialog(string title, string content = null, string positiveText = null, string negativeText = null) { try { MaterialDialog.Builder dialogList = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); if (!string.IsNullOrEmpty(title)) { dialogList.Title(title); } if (!string.IsNullOrEmpty(content)) { dialogList.Content(content); } if (!string.IsNullOrEmpty(negativeText)) { dialogList.NegativeText(negativeText); dialogList.OnNegative(this); } if (!string.IsNullOrEmpty(positiveText)) { dialogList.PositiveText(positiveText); dialogList.OnPositive(this); } dialogList.Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtCurrencyOnTouch(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } if (ListUtils.SettingsSiteList?.CurrencySymbolArray.CurrencyList != null) { TypeDialog = "Currency"; var arrayAdapter = WoWonderTools.GetCurrencySymbolList(); if (arrayAdapter?.Count > 0) { var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialogList.Title(GetText(Resource.String.Lbl_SelectCurrency)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } } else { Methods.DisplayReportResult(this, "Not have List Currency"); } } catch (Exception exception) { Console.WriteLine(exception); } }
//Categories private void LayoutCategoriesOnClick(object sender, EventArgs e) { try { if (CategoriesController.ListCategoriesJob.Count > 0) { TypeDialog = "Categories"; var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = CategoriesController.ListCategoriesJob.Select(item => item.CategoriesName).ToList(); dialogList.Title(GetText(Resource.String.Lbl_SelectCategories)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else { Methods.DisplayReportResult(Activity, "Not have List Categories Job"); } } catch (Exception exception) { Console.WriteLine(exception); } }
//delete group chat private void BtnDeleteGroupOnClick(object sender, EventArgs e) { try { if (!Methods.CheckConnectivity()) { Toast.MakeText(this, GetString(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short) .Show(); } else { Type = "Delete"; var dialog = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialog.Content(GetText(Resource.String.Lbl_AreYouSureDeleteGroup)); dialog.PositiveText(GetText(Resource.String.Lbl_DeleteGroup)).OnPositive(this); dialog.NegativeText(GetText(Resource.String.Lbl_Cancel)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.Build().Show(); } } catch (Exception exception) { Console.WriteLine(exception); } }
//Event Show More : Copy Link , Share , Edit (If user isOwner_Groups) private void BtnMoreOnClick(object sender, EventArgs e) { try { var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); arrayAdapter.Add(GetString(Resource.String.Lbl_CopeLink)); arrayAdapter.Add(GetString(Resource.String.Lbl_Share)); if (GroupDataClass.IsOwner) { arrayAdapter.Add(GetString(Resource.String.Lbl_Settings)); } dialogList.Title(GetString(Resource.String.Lbl_More)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
public void OnSelection(MaterialDialog p0, View p1, int itemId, ICharSequence itemString) { try { string text = itemString.ToString(); if (!Methods.CheckConnectivity()) { Toast.MakeText(this, GetString(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short)?.Show(); } else { if (text == GetString(Resource.String.Lbl_MessageCall5)) { var dialog = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialog.Input(Resource.String.Lbl_Write_your_message, 0, false, this); dialog.InputType(InputTypes.TextFlagImeMultiLine); dialog.PositiveText(GetText(Resource.String.Btn_Send)).OnPositive(this); dialog.NegativeText(GetText(Resource.String.Lbl_Cancel)).OnNegative(this); dialog.Build().Show(); dialog.AlwaysCallSingleChoiceCallback(); } else { SendMess(text); } } } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
//Event Menu >> Delete Comment private void DeleteCommentEvent(CommentObjectExtra item) { try { if (Methods.CheckConnectivity()) { TypeDialog = "DeleteComment"; CommentObject = item; var dialog = new MaterialDialog.Builder(MainContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialog.Title(MainContext.GetText(Resource.String.Lbl_DeleteComment)); dialog.Content(MainContext.GetText(Resource.String.Lbl_AreYouSureDeleteComment)); dialog.PositiveText(MainContext.GetText(Resource.String.Lbl_Yes)).OnPositive(this); dialog.NegativeText(MainContext.GetText(Resource.String.Lbl_No)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.ItemsCallback(this).Build().Show(); } else { Toast.MakeText(MainContext, MainContext.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show(); } } catch (Exception e) { Console.WriteLine(e); } }
//Contact User private void BtnContactOnClick(object sender, EventArgs e) { try { 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 = DataObject.UserData.UserId, Name = DataObject.UserData.Name, Avatar = DataObject.UserData.Avatar }); } catch (Exception exception) { Console.WriteLine(exception); } }); dialog.NegativeText(GetText(Resource.String.Lbl_No)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.Build().Show(); } } catch (Exception exception) { Console.WriteLine(exception); } }
//Event Menu >> Edit Comment private void EditCommentEvent(CommentObjectExtra item) { try { if (Methods.CheckConnectivity()) { TypeDialog = "EditComment"; CommentObject = item; var dialog = new MaterialDialog.Builder(MainContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialog.Title(Resource.String.Lbl_Edit); dialog.Input(MainContext.GetString(Resource.String.Lbl_Write_comment), Methods.FunString.DecodeString(item.Text), this); dialog.InputType(InputTypes.TextFlagImeMultiLine); dialog.PositiveText(MainContext.GetText(Resource.String.Lbl_Update)).OnPositive(this); dialog.NegativeText(MainContext.GetText(Resource.String.Lbl_Cancel)).OnNegative(this); dialog.Build().Show(); dialog.AlwaysCallSingleChoiceCallback(); } else { Toast.MakeText(MainContext, MainContext.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show(); } } catch (Exception e) { Console.WriteLine(e); } }
private void BtnFilterOnClick(object sender, EventArgs e) { try { if (CategoriesController.ListCategoriesMovies.Count > 0) { var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = CategoriesController.ListCategoriesMovies.Select(item => item.CategoriesName).ToList(); arrayAdapter.Insert(0, GetString(Resource.String.Lbl_Default)); dialogList.Title(GetText(Resource.String.Lbl_SelectCategories)); dialogList.Content(GetText(Resource.String.Lbl_GetMoviesByCategories)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else { Methods.DisplayReportResult(this, "Not have List Categories Movies"); } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
public void ShowNormalDialog(string title, string content = null, string positiveText = null, string negativeText = null) { try { MaterialDialog.Builder DialogList = new MaterialDialog.Builder(ActivityContext); if (!string.IsNullOrEmpty(title)) { DialogList.Title(title); } if (!string.IsNullOrEmpty(content)) { DialogList.Content(content); } if (!string.IsNullOrEmpty(negativeText)) { DialogList.NegativeText(negativeText); DialogList.OnNegative(this); } if (!string.IsNullOrEmpty(positiveText)) { DialogList.PositiveText(positiveText); DialogList.OnPositive(this); } DialogList.Build().Show(); } catch (Exception exception) { Crashes.TrackError(exception); } }
//Event Menu >> Delete Comment private void DeleteCommentEvent(CommentsArticlesObject item) { try { if (!Methods.CheckConnectivity()) { Toast.MakeText(MainContext, MainContext.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short)?.Show(); return; } TypeDialog = "DeleteComment"; CommentObject = item; var dialog = new MaterialDialog.Builder(MainContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialog.Title(MainContext.GetText(Resource.String.Lbl_DeleteComment)).TitleColorRes(Resource.Color.primary); dialog.Content(MainContext.GetText(Resource.String.Lbl_AreYouSureDeleteComment)); dialog.PositiveText(MainContext.GetText(Resource.String.Lbl_Yes)).OnPositive(this); dialog.NegativeText(MainContext.GetText(Resource.String.Lbl_No)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.ItemsCallback(this).Build().Show(); } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
private void ShareTimelineLayoutOnClick(object sender, EventArgs e) { try { if (Methods.CheckConnectivity()) { TypeDialog = "ShareToMyTimeline"; var dialog = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialog.Title(Resource.String.Lbl_Share); dialog.Content(Context.GetText(Resource.String.Lbl_ShareToMyTimeline)); dialog.PositiveText(Context.GetText(Resource.String.Lbl_Yes)).OnPositive(this); dialog.NegativeText(Context.GetText(Resource.String.Lbl_No)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.ItemsCallback(this).Build().Show(); } else { Toast.MakeText(Context, Context.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short)?.Show(); } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void TxtTwoFactorOnTouch(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = new List <string> { GetString(Resource.String.Lbl_Enable), GetString(Resource.String.Lbl_Disable) }; dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtJoinPrivacyOnTouch(object sender, View.TouchEventArgs e) { try { if (e?.Event?.Action != MotionEventActions.Down) { return; } TypeDialog = "JoinPrivacy"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = new List <string> { GetString(Resource.String.Lbl_Yes), GetString(Resource.String.Lbl_No) }; dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
//JobType private void LayoutJobTypeOnClick(object sender, EventArgs e) { try { TypeDialog = "JobType"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); arrayAdapter.Add(GetText(Resource.String.Lbl_full_time)); arrayAdapter.Add(GetText(Resource.String.Lbl_part_time)); arrayAdapter.Add(GetText(Resource.String.Lbl_internship)); arrayAdapter.Add(GetText(Resource.String.Lbl_volunteer)); arrayAdapter.Add(GetText(Resource.String.Lbl_contract)); dialogList.Title(GetText(Resource.String.Lbl_JobType)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//Get User By >> gender private void FilterButtonOnClick(object sender, EventArgs e) { try { var genderArray = ListUtils.SettingsSiteList.FirstOrDefault()?.Gender; if (genderArray?.Count > 0) { var dialogList = new MaterialDialog.Builder(Activity).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); var arrayAdapter = genderArray.Select(item => Methods.FunString.DecodeString(item.Values.FirstOrDefault())).ToList(); arrayAdapter.Insert(0, GetString(Resource.String.Lbl_Default)); dialogList.Title(GetText(Resource.String.Lbl_Gender)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else { Methods.DisplayReportResult(Activity, "List Gender Not Found, Please check api option "); } } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtCountryOnTouch(object sender, View.TouchEventArgs e) { try { if (e?.Event?.Action != MotionEventActions.Down) { return; } TypeDialog = "Country"; var countriesArray = WoWonderTools.GetCountryList(this); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = countriesArray.Select(item => item.Value).ToList(); dialogList.Title(GetText(Resource.String.Lbl_Location)).TitleColorRes(Resource.Color.primary); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void TxtPositionOnClick(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); DialogType = "Position"; var arrayAdapter = JobCategories.ToList(); dialogList.Title(GetText(Resource.String.Lbl_Position)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtSalaryDateOnTouch(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); TypeDialog = "SalaryDate"; var arrayAdapter = WoWonderTools.GetSalaryDateList(this).Select(item => item.Value).ToList(); dialogList.Title(GetText(Resource.String.Lbl_SalaryDate)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//DeleteSong private void OnMenuDeleteSongOnClick(MoreSongClickEventArgs song) { try { if (!UserDetails.IsLogin) { PopupDialogController dialog = new PopupDialogController(GlobalContext, null, "Login"); dialog.ShowNormalDialog(GlobalContext.GetText(Resource.String.Lbl_Login), GlobalContext.GetText(Resource.String.Lbl_Message_Sorry_signin), GlobalContext.GetText(Resource.String.Lbl_Yes), GlobalContext.GetText(Resource.String.Lbl_No)); return; } if (Methods.CheckConnectivity()) { TypeDialog = "DeleteSong"; MoreSongArgs = song; var dialog = new MaterialDialog.Builder(MainContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialog.Title(MainContext.GetText(Resource.String.Lbl_DeleteSong)); dialog.Content(MainContext.GetText(Resource.String.Lbl_AreYouSureDeleteSong)); dialog.PositiveText(MainContext.GetText(Resource.String.Lbl_Yes)).OnPositive(this); dialog.NegativeText(MainContext.GetText(Resource.String.Lbl_No)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.ItemsCallback(this).Build().Show(); } else { Toast.MakeText(MainContext, MainContext.GetText(Resource.String.Lbl_CheckYourInternetConnection), ToastLength.Short).Show(); } } catch (Exception e) { Console.WriteLine(e); } }
private void MAdapterOnItemLongClick(object sender, ContactsAdapterClickEventArgs e) { try { var position = e.Position; if (position >= 0) { var item = MAdapter.GetItem(position); if (item == null) { return; } if (item.Avatar == "addImage") { return; } Position = e.Position; var dialog = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); dialog.Title(GetString(Resource.String.Lbl_Remove) + " " + WoWonderTools.GetNameFinal(item)); dialog.PositiveText(GetText(Resource.String.Lbl_Yes)).OnPositive(this); dialog.NegativeText(GetText(Resource.String.Lbl_No)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.Build().Show(); } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
public void OnSelection(MaterialDialog p0, View p1, int itemId, ICharSequence itemString) { try { string text = itemString.ToString(); if (text == ActivityContext.GetText(Resource.String.Lbl_Edit)) { //Open Edit Job var intent = new Intent(ActivityContext, typeof(EditJobsActivity)); intent.PutExtra("JobsObject", JsonConvert.SerializeObject(DataInfoObject)); ActivityContext.StartActivityForResult(intent, 246); } else if (text == ActivityContext.GetText(Resource.String.Lbl_Delete)) { DialogType = "Delete"; var dialog = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialog.Title(Resource.String.Lbl_Warning); dialog.Content(ActivityContext.GetText(Resource.String.Lbl_DeleteJobs)); dialog.PositiveText(ActivityContext.GetText(Resource.String.Lbl_Yes)).OnPositive(this); dialog.NegativeText(ActivityContext.GetText(Resource.String.Lbl_No)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.ItemsCallback(this).Build().Show(); } } catch (Exception e) { Console.WriteLine(e); } }
private void TxtCategoryOnClick(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } if (CategoriesController.ListCategoriesPage.Count > 0) { var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = CategoriesController.ListCategoriesPage.Select(item => item.CategoriesName).ToList(); dialogList.Title(GetText(Resource.String.Lbl_SelectCategories)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else { Methods.DisplayReportResult(this, "Not have List Categories Page"); } } catch (Exception exception) { Console.WriteLine(exception); } }
private void FilterButtonOnClick(object sender, EventArgs e) { try { if (CategoriesController.ListCategories.Count > 0) { var dialogList = new MaterialDialog.Builder(Activity).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); var arrayAdapter = CategoriesController.ListCategories.Select(item => Methods.FunString.DecodeString(item.Name)).ToList(); arrayAdapter.Insert(0, GetString(Resource.String.Lbl_Default)); arrayAdapter.Insert(1, GetString(Resource.String.Lbl_MostPopular)); dialogList.Title(GetText(Resource.String.Lbl_SelectCategories)); dialogList.Content(GetText(Resource.String.Lbl_GetArticlesByCategories)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } else { Methods.DisplayReportResult(Activity, "Not have List Categories Blog"); } } catch (Exception exception) { Console.WriteLine(exception); } }
private void PostPrivacyButton_Click(object sender, EventArgs e) { try { TypeDialog = "PostPrivacy"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); arrayAdapter.Add(GetString(Resource.String.Lbl_Everyone)); arrayAdapter.Add(GetString(Resource.String.Lbl_People_i_Follow)); arrayAdapter.Add(GetText(Resource.String.Lbl_People_Follow_Me)); arrayAdapter.Add(GetString(Resource.String.Lbl_No_body)); dialogList.Title(GetText(Resource.String.Lbl_PostPrivacy)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.ItemsCallback(this).Build().Show(); dialogList.AlwaysCallSingleChoiceCallback(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void TxtFromDateOnTouch(object sender, View.TouchEventArgs e) { try { if (e?.Event?.Action != MotionEventActions.Down) { return; } DialogType = "FromDate"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = ExperienceDate.ToList(); dialogList.Title(GetText(Resource.String.Lbl_FromDate)); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }