//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); } }
//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); } }
//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); } }
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); } }
//CallToAction private void TxtCallToActionOnTouch(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 = "CallToAction"; var arrayAdapter = CallToAction.ToList(); dialogList.Title(GetText(Resource.String.Lbl_CallToAction)); 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); } }
//Privacy private void PrivacyEditTextOnClick(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } TypeDialog = "Privacy"; var dialogList = new MaterialDialog.Builder(Activity).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); var arrayAdapter = AppTools.GetPrivacyList(Activity).Select(item => item.Value).ToList(); dialogList.Title(GetText(Resource.String.Lbl_Privacy)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//Edit Or Delete Comment private void MAdapterOnItemLongClick(object sender, CommentAdapterClickEventArgs e) { try { var position = e.Position; if (position > -1) { ItemComments = MAdapter.GetItem(position); if (ItemComments != null) { TypeDialog = "MoreComment"; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(Activity).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); if (ItemComments.IsCommentOwner && UserDetails.IsLogin) { arrayAdapter.Add(Activity.GetText(Resource.String.Lbl_Delete)); arrayAdapter.Add(Activity.GetText(Resource.String.Lbl_Edit)); } arrayAdapter.Add(Activity.GetText(Resource.String.Lbl_Copy)); dialogList.Items(arrayAdapter); dialogList.PositiveText(Activity.GetText(Resource.String.Lbl_Close)).OnPositive(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 (text == GetText(Resource.String.Lbl_Edit)) { //Open Edit Job var intent = new Intent(this, typeof(EditJobsActivity)); intent.PutExtra("JobsObject", JsonConvert.SerializeObject(DataInfoObject)); StartActivityForResult(intent, 246); } else if (text == GetText(Resource.String.Lbl_Delete)) { DialogType = "Delete"; 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_DeleteJobs)); dialog.PositiveText(GetText(Resource.String.Lbl_Yes)).OnPositive(this); dialog.NegativeText(GetText(Resource.String.Lbl_No)).OnNegative(this); dialog.AlwaysCallSingleChoiceCallback(); dialog.ItemsCallback(this).Build().Show(); } } catch (Exception e) { Console.WriteLine(e); } }
//Location private void LocationLayoutOnClick(object sender, EventArgs e) { try { //string[] countriesArray = Context.Resources.GetStringArray(Resource.Array.countriesArray); var countriesArray = ListUtils.SettingsSiteList.FirstOrDefault()?.Countries; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(Context).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); if (countriesArray != null) { arrayAdapter.AddRange(countriesArray.Select(item => Methods.FunString.DecodeString(item.Values.FirstOrDefault()?.Name))); } dialogList.Title(GetText(Resource.String.Lbl_Location)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//Categories private void LayoutCategoriesOnClick(object sender, EventArgs e) { try { switch (CategoriesController.ListCategoriesJob.Count) { case > 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)).TitleColorRes(Resource.Color.primary); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); break; } default: Methods.DisplayReportResult(Activity, "Not have List Categories Job"); break; } } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
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) { Console.WriteLine(exception); } }
//Country private void EdtCountryOnClick(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } string[] countriesArray = Resources.GetStringArray(Resource.Array.countriesArray); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = countriesArray.ToList(); dialogList.Title(GetText(Resource.String.Lbl_Location)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//Genres private void GenresEditTextOnClick(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } TypeDialog = "Genres"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = ListUtils.GenresList.Select(item => item.CateogryName).ToList(); dialogList.Title(GetText(Resource.String.Lbl_Genres)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtSubCategoriesOnTouch(object sender, View.TouchEventArgs e) { try { if (e?.Event?.Action != MotionEventActions.Down) { return; } switch (CategoriesController.ListCategoriesGroup.Count) { case > 0: { TypeDialog = "SubCategories"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = new List <string>(); var subCat = CategoriesController.ListCategoriesGroup.FirstOrDefault(a => a.CategoriesId == CategoryId)?.SubList; arrayAdapter = subCat?.Count switch { > 0 => subCat.Select(item => item.Lang).ToList(), _ => arrayAdapter }; dialogList.Title(GetText(Resource.String.Lbl_SelectCategories)).TitleColorRes(Resource.Color.primary); dialogList.Items(arrayAdapter); dialogList.NegativeText(GetText(Resource.String.Lbl_Close)).OnNegative(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); break; }
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) { Methods.DisplayReportResultTrack(exception); } }
private void TxtJobTypeOnTouch(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 = "JobType"; var arrayAdapter = WoWonderTools.GetJobTypeList(this).Select(item => item.Value).ToList(); dialogList.Title(GetText(Resource.String.Lbl_JobType)).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); } }
//Category private void CategoryEditTextOnClick(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } TypeDialog = "Category"; 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(); dialogList.Title(GetText(Resource.String.Lbl_Category)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//Character private void EdtCharacterOnClick(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } TypeDialog = "Character"; //string[] characterArray = Application.Context.Resources.GetStringArray(Resource.Array.CharacterArray); var characterArray = ListUtils.SettingsSiteList.FirstOrDefault()?.Character; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); if (characterArray != null) { arrayAdapter.AddRange(characterArray.Select(item => Methods.FunString.DecodeString(item.Values.FirstOrDefault()))); } dialogList.Title(GetText(Resource.String.Lbl_Character)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
//AgeRestriction private void AgeRestrictionEditTextOnClick(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } TypeDialog = "AgeRestriction"; var dialogList = new MaterialDialog.Builder(Activity).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); var arrayAdapter = new List <string> { GetString(Resource.String.Lbl_AgeRestrictionText0), GetString(Resource.String.Lbl_AgeRestrictionText1) }; dialogList.Title(GetText(Resource.String.Lbl_AgeRestriction)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(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); } }
private void TxtCategoryOnTouch(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } if (CategoriesController.ListCategoriesJob.Count > 0) { TypeDialog = "Categories"; var dialogList = new MaterialDialog.Builder(this).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(this, "Not have List Categories Job"); } } catch (Exception exception) { Console.WriteLine(exception); } }
private void GenderEditTextOnTouch(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); } }
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) { 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); } }
//Event Show More : DeleteSong , EditSong , GoSong , Copy Link , Report .. public void OnMoreClick(MoreSongClickEventArgs args, string namePage = "") { try { NamePage = namePage; MoreSongArgs = args; var arrayAdapter = new List <string>(); var dialogList = new MaterialDialog.Builder(MainContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); if (MoreSongArgs.SongsClass.UserId == UserDetails.UserId && UserDetails.IsLogin) { arrayAdapter.Add(MainContext.GetText(Resource.String.Lbl_DeleteSong)); arrayAdapter.Add(MainContext.GetText(Resource.String.Lbl_EditSong)); } if (UserDetails.IsLogin) { arrayAdapter.Add(MainContext.GetText(Resource.String.Lbl_ReportSong)); } arrayAdapter.Add(MainContext.GetText(Resource.String.Lbl_Copy)); dialogList.Title(MainContext.GetText(Resource.String.Lbl_Songs)); dialogList.Items(arrayAdapter); dialogList.PositiveText(MainContext.GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void BtnAddPhoneNumberOnClick(object sender, EventArgs e) { try { FullNumber = TxtNumber2.Text; if (Regex.IsMatch(FullNumber, "^\\+?(\\d[\\d-. ]+)?(\\([\\d-. ]+\\))?[\\d-. ]+\\d$") && FullNumber.Length >= 10) { if (!string.IsNullOrEmpty(FullNumber)) { Intent intent = new Intent(ActivityContext, typeof(VerificationCodeActivity)); intent.PutExtra("Number", FullNumber); ActivityContext.StartActivityForResult(intent, 125); AddPhoneNumberWindow.Hide(); AddPhoneNumberWindow.Dismiss(); } } else { var dialog = new MaterialDialog.Builder(ActivityContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialog.Title(Resource.String.Lbl_Warning); dialog.Content(FullNumber + " " + ActivityContext.GetText(Resource.String.Lbl_ISNotValidNumber)); dialog.PositiveText(ActivityContext.GetText(Resource.String.Lbl_Ok)).OnPositive((materialDialog, action) => { dialog.Dispose(); }); 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 TxtRelationshipOnTouch(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } string[] relationshipArray = Application.Context.Resources.GetStringArray(Resource.Array.RelationShipArray); var dialogList = new MaterialDialog.Builder(this); var arrayAdapter = relationshipArray.ToList(); dialogList.Title(GetText(Resource.String.Lbl_ChooseRelationshipStatus)); dialogList.Items(arrayAdapter); dialogList.PositiveText(GetText(Resource.String.Lbl_Close)).OnPositive(this); dialogList.AlwaysCallSingleChoiceCallback(); dialogList.ItemsCallback(this).Build().Show(); } catch (Exception exception) { Console.WriteLine(exception); } }
private void TxtWithdrawMethodOnTouch(object sender, View.TouchEventArgs e) { try { if (e.Event.Action != MotionEventActions.Down) { return; } TypeDialog = "WithdrawMethod"; var dialogList = new MaterialDialog.Builder(this).Theme(AppSettings.SetTabDarkTheme ? AFollestad.MaterialDialogs.Theme.Dark : AFollestad.MaterialDialogs.Theme.Light); var arrayAdapter = new List <string> { GetText(Resource.String.Btn_Paypal), GetText(Resource.String.Lbl_Bank) }; dialogList.Title(GetText(Resource.String.Lbl_WithdrawMethod)); 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); } }
//DeletePost public void OnMenuDeletePostOnClick(MoreFeedClickEventArgs feed) { try { if (Methods.CheckConnectivity()) { TypeDialog = "DeletePost"; MoreFeedArgs = feed; var dialog = new MaterialDialog.Builder(MainContext).Theme(AppSettings.SetTabDarkTheme ? Theme.Dark : Theme.Light); dialog.Title(MainContext.GetText(Resource.String.Lbl_DeletePost)); dialog.Content(MainContext.GetText(Resource.String.Lbl_AreYouSureDeletePost)); 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); } }