protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.my_profile); var btnChangePass = FindViewById<Button> (Resource.Id.btnChangePass); var btnSignOut = FindViewById<Button> (Resource.Id.btnSignOut); btnUpdateProfile = FindViewById<Button> (Resource.Id.btnUpdateProfile); myProfileActivity = this; btnUpdateProfile.Click += (sender, e) => { utilsAndroid.onStartUserProfile(this); isLoadStatusCurrentUser = true; }; btnChangePass.Click += (sender, e) => { Intent intent = new Intent(this, typeof(ChangePasswordActivity)); StartActivity(intent); }; btnSignOut.Click += (sender, e) => { if(popupConfirm == null){ popupConfirm = new PopUpConfirm(this); popupConfirm.actionConfirmDelegate = this; } popupConfirm.showConfirmDialog(GetString(Resource.String.sign_out_title), GetString(Resource.String.signout_confirm), "Yes", "No"); }; TCNotificationCenter.defaultCenter.addObserver (this, constants.kGetStatusCurrentUser, new TCSelector(onGetStatusCurrentUser)); }
protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.customer_calling_layout); bloaded = false; ActionBar.NavigationMode = ActionBarNavigationMode.Standard; ActionBar.SetTitle(Resource.String.calling_title); ActionBar.SetDisplayShowTitleEnabled (false); ActionBar.SetDisplayHomeAsUpEnabled(true); ActionBar.SetDisplayShowHomeEnabled (true); setHeadingTitle (Resource.String.calling_title); callingActivity = this; llProgress = FindViewById<LinearLayout> (Resource.Id.llProgressBar); llProgress.Visibility = ViewStates.Gone; tvName = FindViewById<TextView> (Resource.Id.tv_name_spec_calling); tvTimeDuration = FindViewById<TextView> (Resource.Id.tv_time_customer_calling); tvCostDuration = FindViewById<TextView> (Resource.Id.tv_cost_customer_calling); img_upfile = FindViewById<ImageView> (Resource.Id.img_upfile_calling); var avatar = FindViewById<ImageView> (Resource.Id.img_avatar_customer_calling); llFileAttach = FindViewById<LinearLayout> (Resource.Id.ll_file_attach_customer_calling); // Follow up action llGrFollowUpAction = FindViewById<LinearLayout> (Resource.Id.llGrFollowUpAction); imgRatingFollowUp = FindViewById<ImageView> (Resource.Id.imgRatingFolowUp); imgFavoriteFollowUp = FindViewById<ImageView> (Resource.Id.imgFavoriteFolowUp); imgEmailFollowUp = FindViewById<ImageView> (Resource.Id.imgEmailFollowUp); imgWaiveFeeFollowUp = FindViewById<ImageView> (Resource.Id.imgWaiveFeeFollowUp); imgTranscribeFollowUp = FindViewById<ImageView> (Resource.Id.imgTranscribeFollowUp); imgUpPhotoFollowUp = FindViewById<ImageView> (Resource.Id.imgUpPhotoFollowUp); imgReplayFollowUp = FindViewById<ImageView> (Resource.Id.imgReplayFollowUp); llRatingFollowUp = FindViewById<LinearLayout> (Resource.Id.llRatingFollowUp); llFavoriteFollowUp = FindViewById<LinearLayout> (Resource.Id.llFavoriteFollowUp); llEmailFollowUp = FindViewById<LinearLayout> (Resource.Id.llEmailFollowUp); llWaiveFollowUp = FindViewById<LinearLayout> (Resource.Id.llWaiveFeeFollowUp); llTransribeFollowUp = FindViewById<LinearLayout> (Resource.Id.llTranscribeFollowUp); llUpphotoFollowUp = FindViewById<LinearLayout> (Resource.Id.llUploadPhotoFollowUp); llReplayFollowUp = FindViewById<LinearLayout> (Resource.Id.llReplayFollowUp); tvWaiveFeeNotice = FindViewById<TextView> (Resource.Id.tv_notice_waived_calling); UrlImageViewHelper.UrlImageViewHelper.SetUrlDrawable (avatar, HttpConstants.BASE_URL + constants.durationInfo.AvatarPath, Resource.Drawable.special_home, constants.iTimeLoading, this); tvName.Text = constants.durationInfo.UserFullName; llGrFollowUpAction.Visibility = ViewStates.Gone; uploadPhoto = new UploadPhoto(this); uploadPhoto.actionUploadPhotoDelegate = this; deleteFile = new Teleconsult.Android.DeleteFile (this); deleteFile.deleteFileAction = this; // Action Background bgUpfile = new Background (this, Resource.Drawable.camera, Resource.Drawable.camera_pressed); img_upfile.SetBackgroundDrawable (bgUpfile); img_upfile.Click += (sender, e) => { if(uploadPhoto == null){ uploadPhoto = new UploadPhoto(this); uploadPhoto.actionUploadPhotoDelegate = this; } uploadPhoto.selectActionUpload(); }; Background bgRating = new Background (this, Resource.Drawable.icon_feedback, Resource.Drawable.icon_feedback_pressed); imgRatingFollowUp.SetBackgroundDrawable (bgRating); imgRatingFollowUp.Click += (sender, e) => { if(isFeeback) { if(dialogFeedbackReview == null){ dialogFeedbackReview = new RatingFeedbackReview(this); } dialogFeedbackReview.showFeedbackReview(iRatingNumber, sFeedBackContent); } else { if(dialogFeedback == null){ dialogFeedback = new RatingFeedbackUI(this, callId); dialogFeedback.actionRatingDelegate = this; } dialogFeedback.showRatingFeedback(); } }; imgFavoriteFollowUp.Click += (sender, e) => { if (isFavorite) { if(dialogFavorite == null){ dialogFavorite = new FavoriteUI(this); dialogFavorite.actionFavoriteDelegate = this; } dialogFavorite.removeFavoriteRequest(specId); } else { if(dialogFavorite == null){ dialogFavorite = new FavoriteUI(this); dialogFavorite.actionFavoriteDelegate = this; } dialogFavorite.addToFavouriteRequest(specId); } }; Background bgEmail = new Background (this, Resource.Drawable.ic_emailprofile, Resource.Drawable.ic_emailprofile_pressed); imgEmailFollowUp.SetBackgroundDrawable (bgEmail); imgEmailFollowUp.Click += (sender, e) => { SendEmailUI dialog = new SendEmailUI(this); dialog.actionDelegate = this; dialog.showEmailDialog(specId); }; Background bgWaivefee = new Background (this, Resource.Drawable.ic_waive, Resource.Drawable.ic_waive_pressed); imgWaiveFeeFollowUp.SetBackgroundDrawable (bgWaivefee); imgWaiveFeeFollowUp.Click += (sender, e) => { if(dtEndWaiveFee != null && dtEndWaiveFee.AddMinutes (Constants.pTimeWaiveFee) >= Utils.getDateTimeNow (MApplication.getInstance ().timezoneName)){ if (popupConfirm == null) { popupConfirm = new PopUpConfirm (this); popupConfirm.actionConfirmDelegate = this; } popupConfirm.showConfirmDialog (GetString(Resource.String.waive_fee_title), GetString(Resource.String.waive_fee_content), "Yes", "No"); } else { popupNotice.showNoticeDialog(GetString(Resource.String.waive_fee_expired_title), GetString(Resource.String.waive_fee_expired)); imgWaiveFeeFollowUp.Enabled = false; imgWaiveFeeFollowUp.SetBackgroundResource(Resource.Drawable.ic_waive_disable); imgWaiveFeeFollowUp.SetImageResource(Resource.Drawable.ic_waive_disable); } }; Background bgTranscribe = new Background (this, Resource.Drawable.ic_transcribe, Resource.Drawable.ic_transcribe_pressed); imgTranscribeFollowUp.SetBackgroundDrawable (bgTranscribe); imgTranscribeFollowUp.Click += (sender, e) => { TranscribeRequest transcribe = new TranscribeRequest(this); transcribe.transcribeDelegate = this; transcribe.getTranscribe(callId, recordUrl); }; Background bgUpphoto = new Background (this, Resource.Drawable.camera, Resource.Drawable.camera_pressed); imgUpPhotoFollowUp.SetBackgroundDrawable (bgUpphoto); imgUpPhotoFollowUp.Click += (sender, e) => { if(uploadPhoto == null){ uploadPhoto = new UploadPhoto(this); uploadPhoto.actionUploadPhotoDelegate = this; } uploadPhoto.selectActionUpload(); }; Background bgReplay = new Background (this, Resource.Drawable.ic_replay, Resource.Drawable.ic_replay_pressed); imgReplayFollowUp.SetBackgroundDrawable (bgReplay); imgReplayFollowUp.Click += (sender, e) => { if(recordUrl != null){ if(!recordUrl.Equals("")){ Intent intent = new Intent(this, typeof(PlayAudioManager)); intent.PutExtra(constants.pPathAudioFile, recordUrl); StartActivity(intent); } else { popupNotice.showNoticeDialog(GetString(Resource.String.title_notice), GetString(Resource.String.replay_not_exist_notice)); } } else { popupNotice.showNoticeDialog(GetString(Resource.String.title_notice), GetString(Resource.String.replay_not_exist_notice)); } }; popupNotice = new PopupNoticeInfomation (this); popupNotice.noticeDelegate = this; updateCallStart (constants.durationInfo); TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostStopCall, new TCSelector (updateCallStop)); TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostFolloUp, new TCSelector (onFollowUpAction)); TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostUploadFileSuccess, new TCSelector (onUploadFileSuccess)); TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostDeleteFileSuccess, new TCSelector (onDeleteFileSuccess)); }
public override bool OnOptionsItemSelected (IMenuItem item) { base.OnOptionsItemSelected (item); switch (item.ItemId) { case Resource.Id.viewInvoice: if(invoice == null){ if(invoiceRequest == null){ invoiceRequest = new GetInvoiceRequest(this); invoiceRequest.viewInvoiceDelegate = this; } invoiceRequest.getInvoice(constants.bookingInfo.Id); } else { startViewInvoice(invoice); } break; case Resource.Id.uploadFile: if(uploadPhoto == null){ uploadPhoto = new UploadPhoto(this); uploadPhoto.actionUploadPhotoDelegate = this; } uploadPhoto.selectActionUpload(); break; case Resource.Id.talkReplay: onTalkReplay (); break; case Resource.Id.transcript: onTranscript (); break; case Resource.Id.waiveFee: if (Utils.isDisableWaivedFee (constants.bookingInfo)) { popupNotice.showNoticeDialog(GetString(Resource.String.waive_fee_expired_title), GetString(Resource.String.waive_fee_expired)); _menu.GetItem (0).SubMenu.GetItem (4).SetVisible (false); } else { if (popupConfirm == null) { popupConfirm = new PopUpConfirm (this); popupConfirm.actionConfirmDelegate = this; } popupConfirm.showConfirmDialog (GetString (Resource.String.waive_fee_title), GetString (Resource.String.waive_fee_content), "Yes", "No"); } break; case global::Android.Resource.Id.Home: if (constants.isRemoveObserverTalkNow) { TCNotificationCenter.defaultCenter.removeObserver (this, Constants.kUpdateTalkNowStep); TCNotificationCenter.defaultCenter.removeObserver (this, constants.kDeferSuccess); constants.isRemoveObserverTalkNow = false; } TCNotificationCenter.defaultCenter.removeObserver (this, Constants.kPostUploadFileSuccess); TCNotificationCenter.defaultCenter.removeObserver (this, Constants.kPostDeleteFileSuccess); Finish (); break; default: break; } return true; }
private void showNoticeUpdateProfile(){ if(popupConfirm == null){ popupConfirm = new PopUpConfirm(this); popupConfirm.actionConfirmDelegate = this; } popupConfirm.showConfirmDialog(GetString(Resource.String.require_update_profile_title), GetString(Resource.String.require_update_profile_content), "Yes", "No"); }