private NSMutableAttributedString createASAPAttributed (SpecialistProfileInfos specialistInfo)
		{
			string text1 = TCLocalizabled.getText ("TextMessageConfirmSoonest1");
			string param1 = specialistInfo.Account.Name == null ? "" : specialistInfo.Account.Name;
			string text2 = TCLocalizabled.getText ("TextMessageConfirmSoonest2");
			string param2 = "$" + MUtils.getCost((double)specialistInfo.SpecialistDetail.Specializations [0].CustomerPricing.Minimum);
			string text3 = TCLocalizabled.getText ("TextMessageConfirmSoonest3");
		
			var attributedString = new NSMutableAttributedString (text1 + param1 + text2 + param2 + text3);
			UIFont fontMessage = MUtils.getFontWithSize (false, 14.0f);

			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = UIColor.Black

			}.Dictionary, new NSRange (0, text1.Length));

			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = TCTheme.getInstance.getThemeColor (Theme.TextColorBooking)

			}.Dictionary, new NSRange (text1.Length, param1.Length));
					
			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = TCTheme.getInstance.getThemeColor (Theme.TextColorBooking)

			}.Dictionary, new NSRange ((text1 + param1 + text2).Length, param2.Length));
					
			return attributedString;
		}
		private NSMutableAttributedString createTalknowAttributed (SpecialistProfileInfos specialistInfo)
		{
			string text1 = TCLocalizabled.getText ("TextMessageConfirmTalknow1");
			string param1 = specialistInfo.Account.Name == null ? "" : specialistInfo.Account.Name;
			string text2 = TCLocalizabled.getText ("TextMessageConfirmTalknow2");
			string param2 = "$" + MUtils.getCost((double)specialistInfo.SpecialistDetail.Specializations [0].CustomerPricing.TalkNow);

			string text3 = TCLocalizabled.getText ("TextMessageConfirmTalknow3");
		
			string param3 = "$" + MUtils.getCost ((double)specialistInfo.SpecialistDetail.Specializations [0].CustomerPricing.Minimum);

			string text4 = String.Format (TCLocalizabled.getText ("TextMessageConfirmTalknow4"), MApplication.getInstance ().typeCard);

			var attributedString = new NSMutableAttributedString (text1 + param1 + text2 + param2 + text3 + param3 + text4);
			UIFont fontMessage = MUtils.getFontWithSize (false, 14.0f);

			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = UIColor.Black

			}.Dictionary, new NSRange (0, text1.Length));
					
			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = TCTheme.getInstance.getThemeColor (Theme.TextColorBooking)

			}.Dictionary, new NSRange (text1.Length, param1.Length));

			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = UIColor.Black

			}.Dictionary, new NSRange ((text1 + param1).Length, text2.Length));
					
			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = TCTheme.getInstance.getThemeColor (Theme.TextColorBooking)

			}.Dictionary, new NSRange ((text1 + param1 + text2).Length, param2.Length));

			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = UIColor.Black, 

			}.Dictionary, new NSRange ((text1 + param1 + text2 + param2).Length, text3.Length));

			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = TCTheme.getInstance.getThemeColor (Theme.TextColorBooking), 

			}.Dictionary, new NSRange ((text1 + param1 + text2 + param2 + text3).Length, param3.Length));

			attributedString.SetAttributes (new UIStringAttributes {
				Font = fontMessage,
				ForegroundColor = UIColor.Black, 

			}.Dictionary, new NSRange ((text1 + param1 + text2 + param2 + text3 + param3).Length, text4.Length));

			return attributedString;
		}
示例#3
0
文件: Utils.cs 项目: borain89vn/demo2
		public static Constants.VERIFIED_TYPE getStatusLicense (SpecialistProfileInfos specialist)
		{
			SpecialistRegisterStep3ViewModel specialistDetail = specialist.SpecialistDetail;
			Constants.VERIFIED_TYPE status = Constants.VERIFIED_TYPE.Unlicense;

			if (specialistDetail != null) {
				if (specialistDetail.Specializations [0].LicenceToOperate) {
					if (specialistDetail.Specializations [0].ExpiredDate == null) {
						status = Constants.VERIFIED_TYPE.Unverified;
					} else {
						DateTime? expiredDate = convertDateTime (specialistDetail.Specializations [0].ExpiredDate);
						if (expiredDate == null ||  expiredDate.Value.Date >= DateTime.Now.Date) {
							status = Constants.VERIFIED_TYPE.Verified;
						} else {
							status = Constants.VERIFIED_TYPE.Expired;
						}
					}
				}
			}

			return status;
		}
示例#4
0
		private void initInfoSpecialist (SpecialistProfileInfos info)
		{
			if (info != null && info.SpecialistDetail != null && info.SpecialistDetail.Specializations != null) {
				//ddbien: comment tempt
				//this.lbCostTalknow.Text = "$" + MUtils.getCost ((double)info.SpecialistDetail.Specializations [0].CustomerPricing.TalkNow);
				string price = "$" + MUtils.getCost ((double)info.SpecialistDetail.Specializations [0].CustomerPricing.TalkNow);
				this.btnTalkNow.SetTitle(price,UIControlState.Normal) ;
				this.lbCostAnother.Text = "$" + MUtils.getCost ((double)info.SpecialistDetail.Specializations [0].CustomerPricing.OutOfHour);
				this.lbCostStandard.Text = "$" + MUtils.getCost ((double)info.SpecialistDetail.Specializations [0].CustomerPricing.Standard);
			
				if (info.Account.Status == (int)Constants.LOGIN_STATUS.Expired) {
					this.lbNoteExpire.Hidden = false;
					disableButtons ();
				} else {
					this.viewBook.Frame = new CGRect (0.0f, 0.0f, this.viewBook.Frame.Width, this.viewBook.Frame.Height);
					this.Frame = new CGRect (this.Frame.X, this.Frame.Y, this.viewBook.Frame.Width, this.viewBook.Frame.Height);
				}
			} else {
				disableButtons ();
			}

			this.containView.Frame = new CGRect (this.containView.Frame.X, this.containView.Frame.Y, this.Frame.Width, this.Frame.Height);
		}
示例#5
0
		public async void BeginDownloadingImage (UIViewController controller, UITableView tableView, NSIndexPath path, List<SpecialistProfileInfos> listSpecialist, SpecialistProfileInfos info, bool isCache)
		{
			// Queue the image to be downloaded. This task will execute
			// as soon as the existing ones have finished.
			UIImage data = null;
			if (info.Account.AvatarPath != null)
				data = await GetImageData (info.Account.AvatarPath, true);

			info.SpecialistDetail.ImageAvatar = getImageFrom (data);
			if (controller != null) {
				controller.InvokeOnMainThread (() => {
					TCSearchCellTemplate cell = null;

					cell = tableView.VisibleCells.Where (c => c.Tag == listSpecialist.IndexOf (info)).FirstOrDefault () as TCSearchCellTemplate;
			
					if (cell != null) {
						cell.avatar.Image = getImageFrom (data);
						cell.indicator.StopAnimating ();
						cell.indicator.Color = UIColor.Clear;
					}
				});
			}
		}
		public 	void actionRefreshData (TCActionView owner, SpecialistProfileInfos info)
		{

		}
		private void initActionView (SpecialistProfileInfos info)
		{
			this.actionView = TCActionView.Create ();
			this.actionView.specialistInfo = info;
			this.actionView.iCallId = this.iCallId;
			this.actionView.bookingInfo = this.bookingInfo;
			this.actionView.parentController = this;
			this.actionView.Delegate = this;

			this.actionView.buildInView (this.viewActionSend);

			if (MApplication.getInstance ().isConsultant) {
				this.actionView.displayOnlyFeedback ();
			}
		}
		private void initBookView (SpecialistProfileInfos info)
		{
			this.bookView = TCBookView.Create ();
			this.bookView.specialistInfo = info;
			this.bookView.parentController = this;
			this.bookView.Delegate = this;

			this.bookView.buildInView (this.viewActionBook);
		}
示例#9
0
		public void build (SpecialistProfileInfos specialistInfo)
		{
			// Create lable Title ProfessionalOrTrade
			UILabel lbTitleProfessionalOrTrade = new UILabel ();
			lbTitleProfessionalOrTrade.Frame = new CGRect (paddingRight, paddingTop, frameScreen.Width - paddingRight, heightControl);
			lbTitleProfessionalOrTrade.Text = "PROFESSION";
			lbTitleProfessionalOrTrade.TextColor = TCTheme.getInstance.getThemeColor (Theme.Header);
			lbTitleProfessionalOrTrade.Font = fontTitle;
			this.AddSubview (lbTitleProfessionalOrTrade);

			UILabel lbTextProfessional = new UILabel ();
			lbTextProfessional.Frame = new CGRect (paddingRight, lbTitleProfessionalOrTrade.Frame.Y + lbTitleProfessionalOrTrade.Frame.Height + distanceComponent, frameScreen.Width - paddingRight, heightControl);
			lbTextProfessional.Text = specialistInfo.SpecialistDetail.Specializations [0].ProfessionalOrTrade;
			lbTextProfessional.Font = fontBody;//fontBodyBold
			this.AddSubview (lbTextProfessional);

			// Create Specialisations
			UILabel lbTitleSpecialisation = new UILabel ();
			lbTitleSpecialisation.Frame = new CGRect (paddingRight, lbTextProfessional.Frame.Y + lbTextProfessional.Frame.Height + distanceComponent, frameScreen.Width - paddingRight, heightControl);
			lbTitleSpecialisation.Text = "SPECIALISATIONS";
			lbTitleSpecialisation.TextColor = TCTheme.getInstance.getThemeColor (Theme.Header);
			lbTitleSpecialisation.Font = fontTitle;
			this.AddSubview (lbTitleSpecialisation);

			UILabel lbTexSpecialisation = new UILabel ();
			lbTexSpecialisation.Frame = new CGRect (paddingRight, lbTitleSpecialisation.Frame.Y + lbTitleSpecialisation.Frame.Height + distanceComponent, frameScreen.Width - paddingRight, heightControl);
			lbTexSpecialisation.Text = specialistInfo.SpecialistDetail.Specializations [0].Name;
			lbTexSpecialisation.Font = fontBody;//fontBodyBold
			this.AddSubview (lbTexSpecialisation);

			// Create GST Applies
			UILabel lbTitleGSTApplies = new UILabel ();
			lbTitleGSTApplies.Frame = new CGRect (paddingRight, lbTexSpecialisation.Frame.Y + lbTexSpecialisation.Frame.Height + distanceComponent, frameScreen.Width - paddingRight, heightControl);
			lbTitleGSTApplies.Text = "GST APPLIES";
			lbTitleGSTApplies.TextColor = TCTheme.getInstance.getThemeColor (Theme.Header);
			lbTitleGSTApplies.Font = fontTitle;
			this.AddSubview (lbTitleGSTApplies);

			UILabel lbTextGSTApplies = new UILabel ();
			lbTextGSTApplies.Frame = new CGRect (paddingRight, lbTitleGSTApplies.Frame.Y + lbTitleGSTApplies.Frame.Height + distanceComponent, frameScreen.Width - paddingRight, heightControl);
			lbTextGSTApplies.Text = specialistInfo.SpecialistDetail.Specializations [0].GST ? "Yes" : "No";
			lbTextGSTApplies.Font = fontBody;
			this.AddSubview (lbTextGSTApplies);

			// Create lable short description
			UILabel lbShortDescription = new UILabel ();
			lbShortDescription.Frame = new CGRect (paddingRight, lbTextGSTApplies.Frame.Y + lbTextGSTApplies.Frame.Height + distanceComponent, frameScreen.Width - paddingRight, heightControl);
			lbShortDescription.Text = "SHORT DESCRIPTION";
			lbShortDescription.TextColor = TCTheme.getInstance.getThemeColor (Theme.Header);
			lbShortDescription.Font = fontTitle;
			this.AddSubview (lbShortDescription);

			// Create text short description
			UILabel textShortDescription = new UILabel ();
			textShortDescription.Text = specialistInfo.SpecialistDetail.Description == null ? "" : specialistInfo.SpecialistDetail.Description;
			textShortDescription.Font = fontBody;
			textShortDescription.Lines = 0;
			CGSize size = MUtils.getSizeText (textShortDescription.Text, textShortDescription.Font, frameScreen.Width - paddingRight);
			textShortDescription.Frame = new CGRect (paddingRight, lbShortDescription.Frame.Y + lbShortDescription.Frame.Height + distanceComponent, frameScreen.Width - paddingRight, size.Height);
			this.AddSubview (textShortDescription);

			// Show standard hour
			UILabel lbStandarHours = new UILabel ();
			lbStandarHours.Frame = new CGRect (paddingRight, textShortDescription.Frame.Y + textShortDescription.Frame.Height + distanceComponent, frameScreen.Width - paddingRight, heightControl);
			lbStandarHours.Text = "STANDARD HOURS";
			lbStandarHours.TextColor = TCTheme.getInstance.getThemeColor (Theme.Header);
			lbStandarHours.Font = fontTitle;
			this.AddSubview (lbStandarHours);

			// Create text short description
			List<StandardHour> standardHours = specialistInfo.SpecialistDetail.ListStandardHour;
			UIView textStandardHour = getViewStandardHourFormat (standardHours);
			string textStandarHours = "";

			foreach (StandardHour standarHour in standardHours) {
				if (standarHour.Day != null)
					textStandarHours += standarHour.Day + ": " + standarHour.Start + " - " + standarHour.End + "\u2028";
			}
				
			textStandardHour.Frame = new CGRect (paddingRight, lbStandarHours.Frame.Y + lbStandarHours.Frame.Height + distanceComponent, (float)frameScreen.Width - paddingRight * 2, textStandardHour.Frame.Height);
			this.AddSubview (textStandardHour);

			// Create Detailed biography
			UILabel lbDetailedBiography = new UILabel ();
			lbDetailedBiography.Frame = new CGRect (paddingRight, textStandardHour.Frame.Y + textStandardHour.Frame.Height + distanceComponent, frameScreen.Width, heightControl);
			lbDetailedBiography.Text = "DETAILED BIOGRAPHY";
			lbDetailedBiography.TextColor = TCTheme.getInstance.getThemeColor (Theme.Header);
			lbDetailedBiography.Font = fontTitle;
			this.AddSubview (lbDetailedBiography);

			// Create textView Detailed biography
			UILabel tvDetailedBiography = new UILabel ();

			string textBiography = "";
			if (specialistInfo.SpecialistDetail.Biography != null)
				textBiography = specialistInfo.SpecialistDetail.Biography;
			tvDetailedBiography.Text = textBiography;
			tvDetailedBiography.Font = fontBody;
			tvDetailedBiography.Lines = 0;
			var _size = MUtils.getSizeText (tvDetailedBiography.Text, tvDetailedBiography.Font, frameScreen.Width - paddingRight * 2);

			tvDetailedBiography.Frame = new CGRect (paddingRight, lbDetailedBiography.Frame.Y + lbDetailedBiography.Frame.Height + distanceComponent, (float)frameScreen.Width - paddingRight * 2, _size.Height);
			this.AddSubview (tvDetailedBiography);
			tvDetailedBiography.BackgroundColor = UIColor.Clear;

			// Create lable Title Qualifications
			UILabel lbQualifications = new UILabel ();
			lbQualifications.Frame = new CGRect (paddingRight, tvDetailedBiography.Frame.Y + tvDetailedBiography.Frame.Height + distanceComponent, frameScreen.Width, heightControl);
			lbQualifications.Text = "QUALIFICATIONS";
			lbQualifications.TextColor = TCTheme.getInstance.getThemeColor (Theme.Header);
			lbQualifications.Font = fontTitle;
			this.AddSubview (lbQualifications);

			// Create lable Text Qualifications 
			UILabel textLbQualifications = new UILabel ();

			textLbQualifications.Text = specialistInfo.SpecialistDetail.Qualification;
			textLbQualifications.Lines = 0;
			textLbQualifications.Font = fontBody;
			CGSize qSize = MUtils.getSizeText (textLbQualifications.Text, textLbQualifications.Font, frameScreen.Width - paddingRight);
			textLbQualifications.Frame = new CGRect (paddingRight, lbQualifications.Frame.Y + lbQualifications.Frame.Height + distanceComponent, frameScreen.Width, qSize.Height);
			this.AddSubview (textLbQualifications);

			UILabel lbTitleLanguages = new UILabel ();
			lbTitleLanguages.Frame = new CGRect (paddingRight, textLbQualifications.Frame.Y + textLbQualifications.Frame.Height + distanceComponent, frameScreen.Width - paddingRight, heightControl);
			lbTitleLanguages.Text = "LANGUAGES SPOKEN";
			lbTitleLanguages.TextColor = TCTheme.getInstance.getThemeColor (Theme.Header);
			lbTitleLanguages.Font = fontTitle;
			this.AddSubview (lbTitleLanguages);

			// Create lable Text Languages 
			UILabel textLanguages = new UILabel ();
			textLanguages.Text = specialistInfo.SpecialistDetail.Languages;
			textLanguages.Font = fontBody;
			textLanguages.Lines = 0;

			CGSize lSize = MUtils.getSizeText (textLanguages.Text, textLanguages.Font, frameScreen.Width - paddingRight);
			textLanguages.Frame = new CGRect (paddingRight, (float)lbTitleLanguages.Frame.Y + (float)lbTitleLanguages.Frame.Height + distanceComponent, (float)frameScreen.Width - paddingRight, lSize.Height);
			this.AddSubview (textLanguages);

			this.Frame = new CGRect (0.0f, 0.0f, frameScreen.Width, textLanguages.Frame.Height + textLanguages.Frame.Y + paddingTop);
		}
示例#10
0
		public static MLicenseDTO getLicenseStatus (SpecialistProfileInfos specialist)
		{
			MLicenseDTO licenseDTO = new MLicenseDTO ();
			UIImage image = null;
			UIColor colorText = UIColor.Red;
			CoreSystem.Constants.VERIFIED_TYPE type = CoreSystem.Utils.getStatusLicense (specialist);
		
			switch (type) {
			case Constants.VERIFIED_TYPE.Expired:
				image = UIImage.FromBundle ("expired_icon");
				break;
			case Constants.VERIFIED_TYPE.Unverified:
				image = UIImage.FromBundle ("unverified_icon");
				break;
			case Constants.VERIFIED_TYPE.Verified:
				image = UIImage.FromBundle ("verified_icon");
				colorText = UIColor.Green;
				break;
			default:
				image = UIImage.FromBundle ("unlicense_icon");
				colorText = TCTheme.getInstance.getThemeColor (Theme.SearchTextBlue);
				break;
			}

			string description = GetDescriptionFromEnum (type);
			licenseDTO.text = description;
			licenseDTO.image = image;
			licenseDTO.colorText = colorText;

			return licenseDTO;
		}
		public void onSuccessGetSpecInfo (SpecialistProfileInfos specInfo)
		{
			this.RunOnUiThread (() => {
				llProgress.Visibility = ViewStates.Gone;
				if(specInfo != null) {
					constants.specialistInfo = specInfo;
					constants.specialistInfo.isLoaded = true;
					setDataToView();
				} else {
					if(popupNotice == null) {
						popupNotice = new PopupNoticeInfomation(this);
						popupNotice.noticeDelegate = this;
					}
					popupNotice.showNoticeDialogToDestroy(GetString(Resource.String.title_notice),GetString(Resource.String.cannot_get_data));
				}
			});
		}
示例#12
0
		public void getProfileSuccess (TCProfileSpecialistHelper helper, SpecialistProfileInfos info)
		{
			this.specialistInfo = info;
			initInfoSpecialist (this.specialistInfo);
			if (this.Delegate != null) {
				this.Delegate.bookRefreshData (info);
				this.Delegate.finishBookRequest ();
			}
		}
示例#13
0
		public void setFavouriteStatus (SpecialistProfileInfos specInfo)
		{
			this.specialistInfo = specInfo;

			if (specInfo.IsFavourite) {
				this.btnFavorite.SetImage (UIImage.FromBundle ("favourite_selected_icon.png"), UIControlState.Normal);
			} else {
				this.btnFavorite.SetImage (UIImage.FromBundle ("favourite_unselected_icon.png"), UIControlState.Normal);
			}
		}
		private void loadInfoSpecialist(SpecialistProfileInfos info)
		{
			this.actionView.setFavouriteStatus (info);
			if (this.specialistInfo.SpecialistDetail.ImageAvatar != null) {
				this.avatar.Image = specialistInfo.SpecialistDetail.ImageAvatar;
				this.acIndicator.Color = UIColor.Clear;
			} else {
				TCAsyncImage.getInstance ().BeginDownloadingAvatar (this, this.avatar, this.acIndicator, info.Account.AvatarPath, true);
			}

			MLicenseDTO lDto = MUtils.getLicenseStatus (info);
			this.imageLicense.Image = lDto.image;
			this.lbLicense.Text = lDto.text;
			this.lbLicense.TextColor = lDto.colorText;

			this.lbOnTime.Text = String.Format (TCLocalizabled.getText("TextLableOntime"), info.SpecialistDetail.OnTime, info.SpecialistDetail.TotalConsultation);

			if (info.ConnectionFee == 0) {
				this.lbMiniCharge.Text = String.Format(TCLocalizabled.getText("TextMinimumChargeExpert"), MUtils.getCost((double)info.SpecialistDetail.Specializations[0].CustomerPricing.Minimum));
			} else {
				this.lbMiniCharge.Text = String.Format(TCLocalizabled.getText("TextMinimumAndConnectionFeeExpert"), MUtils.getCost((double)info.SpecialistDetail.Specializations[0].CustomerPricing.Minimum), MUtils.getCost((double)info.ConnectionFee));
			}

			this.imageRate.Image = MUtils.getRatingImage (info.SpecialistDetail.RatingRatio);
			string strProximity = MUtils.getProximity (info.Proximity);
			this.lbDistance.Text = strProximity + " km";
			this.lbStatusConsultant.Text = CoreSystem.Utils.getStatusConsultant (info.Account.CurrentAvailabilityStatus);

			this.profileView = new TCProfileView (this);
			this.profileView.BackgroundColor = UIColor.Clear;
			this.profileView.build (info);

			CGRect tFrame = this.viewDescription.Frame;
			tFrame.Width = profileView.Frame.Width;
			tFrame.Height = profileView.Frame.Height; 
			this.viewDescription.Frame = tFrame;

			this.viewDescription.AddSubview (this.profileView);

			this.scrollView.ContentSize = new CGSize (0.0f, viewDescription.Frame.Y + viewDescription.Frame.Height + 20.0f);
		}
示例#15
0
		public SpecialisationView(Context context, SpecialistProfileInfos specInfos):base(context){
			this.specInfos = specInfos;
			this.context = context;
			Init ();
		}			
示例#16
0
		public void getProfileSuccess (TCProfileSpecialistHelper helper, SpecialistProfileInfos info)
		{
			if (this.Delegate != null) {
				this.Delegate.actionRefreshData (this, info);
				this.Delegate.finishActionRequest (this, ACTION_INDEX.DEFAULT);
			}
		}
示例#17
0
		// Get Cell DTO
		public static MCellDTO getCellSearchDTO (UITableView tableView, SpecialistProfileInfos specialist)
		{
			MCellDTO cellDto = new MCellDTO ();
			nfloat height = 0.0f;
			TCSearchCellTemplate cell = null;

			if (specialist != null) {
				if (specialist.SpecialistDetail.Specializations [0].IsApplyNoMinimumCharge) {
					if (specialist.SpecialistDetail.Description != null && specialist.SpecialistDetail.Description.Length < 55) {
						height = 135.0f;
						cell = (TCSearchCellFour)tableView.DequeueReusableCell (TCSearchCellFour.Key);
						if (cell == null) {
							cell = TCSearchCellFour.Create ();
							cell.BackgroundColor = TCTheme.getInstance.getThemeColor (Theme.BackgroundBody);
						}
					} else {
						height = 150.0f;
						cell = (TCSearchCellTwo)tableView.DequeueReusableCell (TCSearchCellTwo.Key);
						if (cell == null) {
							cell = TCSearchCellTwo.Create ();
							cell.BackgroundColor = TCTheme.getInstance.getThemeColor (Theme.BackgroundBody);
						}
					}
				} else if (specialist.SpecialistDetail.Description != null && specialist.SpecialistDetail.Description.Length < 55) {
					height = 145.0f;
					cell = (TCSearchCellThree)tableView.DequeueReusableCell (TCSearchCellThree.Key);
					if (cell == null) {
						cell = TCSearchCellThree.Create ();
						cell.BackgroundColor = TCTheme.getInstance.getThemeColor (Theme.BackgroundBody);
					}
				} else {
					cell = (TCSearchCellOne)tableView.DequeueReusableCell (TCSearchCellOne.Key);
					if (cell == null) {
						cell = TCSearchCellOne.Create ();
						cell.BackgroundColor = TCTheme.getInstance.getThemeColor (Theme.BackgroundBody);
					}
					;
					height = 155.0f;
				}
			} 

			cellDto.height = height;
			cellDto.cell = cell;

			return cellDto;
		}
		public void bookRefreshData (SpecialistProfileInfos info)
		{
		}
		public void bookRefreshData(SpecialistProfileInfos info)
		{
			this.specialistInfo = info;
			this.specialistInfo.isLoaded = true;
			this.profileView.RemoveFromSuperview ();
			this.loadInfoSpecialist (this.specialistInfo);
			info.isLoaded = true;
			TCSearchSpecialistViewController searchSpecialistVC = (TCSearchSpecialistViewController)TCViewIdentity.getInstance.getObjectForKey ("TCSearchSpecialistViewController");
			TCNotificationCenter.defaultCenter.postNotification(MUtils.generateKeySearchSpecialist (searchSpecialistVC), this.specialistInfo);

		}
		public void getProfileSuccess (TCProfileSpecialistHelper helper, SpecialistProfileInfos info)
		{
			this.specialistInfo = info;

			initActionView (this.specialistInfo);
			initBookView (this.specialistInfo);

			loadLatsetBookingInfo ();
		}
		public 	void actionRefreshData(TCActionView owner, SpecialistProfileInfos info)
		{
			if (this.profileView != null)
				this.profileView.RemoveFromSuperview ();

			this.loadInfoSpecialist (info);
		}
		public void getProfileSuccess (TCProfileSpecialistHelper helper, SpecialistProfileInfos info)
		{
			this.specialistInfo = info;
			this.specialistInfo.isLoaded = true;
			initBookView (this.specialistInfo);
			initActionView (this.specialistInfo);
			loadInfoSpecialist (this.specialistInfo);

			this.loadingView.dismiss ();
			TCSearchSpecialistViewController searchSpecialistVC = (TCSearchSpecialistViewController)TCViewIdentity.getInstance.getObjectForKey ("TCSearchSpecialistViewController");
			TCNotificationCenter.defaultCenter.postNotification(MUtils.generateKeySearchSpecialist (searchSpecialistVC), this.specialistInfo);
		}
示例#23
0
		public void onSuccessGetSpecInfo (SpecialistProfileInfos specInfo)
		{
			this.RunOnUiThread (() => {
				constants.specialistInfo = specInfo;
				if(constants.specialistInfo != null) {
					llActionBooking.Visibility = ViewStates.Visible;

					GetBookingInfo getBookingInfo = new GetBookingInfo (this);
					getBookingInfo.actionDelegate = this;
					getBookingInfo.getBookingInfo (constants.bookingInfo.Id);

					if(constants.specialistInfo.Account.Status == (int)Constants.LOGIN_STATUS.Expired){
						tvExpiredNotice.Visibility = ViewStates.Visible;
						llSoonest.Enabled = false;
						llStandard.Enabled = false;
						llAnother.Enabled = false;
						llTalknow.Enabled = false;
					}

					if (constants.specialistInfo.IsFavourite) {
						imgFavorite.SetImageResource (Resource.Drawable.ic_favorite_selected);
					}
					if (constants.specialistInfo != null && constants.specialistInfo.SpecialistDetail != null) {
						tvStandardCost.Text = Utils.getCost((double)constants.specialistInfo.SpecialistDetail.Specializations [0].CustomerPricing.Standard);
						tvAnotherCost.Text = Utils.getCost((double)constants.specialistInfo.SpecialistDetail.Specializations [0].CustomerPricing.OutOfHour);
						tvTalkNowCost.Text = Utils.getCost((double)constants.specialistInfo.SpecialistDetail.Specializations [0].CustomerPricing.TalkNow);
					} else {
						tvStandardCost.Text = "N/A";
						tvAnotherCost.Text = "N/A";
						tvTalkNowCost.Text = "N/A";
					}
				} else {
					popupNotice.showNoticeDialogToDestroy(GetString(Resource.String.title_notice),GetString(Resource.String.cannot_get_data));
				}
			});
		}