Ejemplo n.º 1
0
        void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            HelperLabel hl = (HelperLabel)e.Item as HelperLabel;

            ((ListView)sender).SelectedItem = null;
            Navigation.PushAsync(new HelperProfilePage(hl));
        }
Ejemplo n.º 2
0
        void Handle_ItemSelected(object sender, SelectedItemChangedEventArgs e)
        {
            HelperLabel hl = (HelperLabel)e.SelectedItem as HelperLabel;

            ((ListView)sender).SelectedItem = null;
            Navigation.PushAsync(new HelperProfilePage(hl));
        }
Ejemplo n.º 3
0
 public HelperProfilePage(HelperLabel hl)
 {
     InitializeComponent();
     IsLoading           = false;
     BindingContext      = this;
     _currenthelperlabel = hl;
     Pageload(hl);
 }
Ejemplo n.º 4
0
 private void Pageload(HelperLabel hl)
 {
     HelperName.Text     = hl.Name;
     HelperLanguage.Text = hl.Language;
     HelperRating.Text   = hl.Rating;
     HelperTags.Text     = "";
     HelperBio.Text      = "";
     HelperPrice.Text    = hl.Baseprice;
     HelperImage.Source  = hl.ImageUrl;
 }
        public List <HelperLabel> BindingHelpersConvert(List <UserPro> helpers)
        {
            List <HelperLabel> newhelpers = new List <HelperLabel>();

            if (AppResources.Culture.Name == "zh-CN")
            {
                foreach (UserPro helper in helpers)
                {
                    HelperLabel tmp = new HelperLabel();
                    tmp.HelperID        = helper.UserID;
                    tmp.Name            = helper.FirstName + "  " + helper.LastName;
                    tmp.Rating          = StarNoToStarSign(helper.Rating);
                    tmp.Language        = "语言: 普通话";// + helper.FLanguage + "/" + helper.SLanguage;
                    tmp.Baseprice       = "$" + helper.PriceSign + " 起价";
                    tmp.Location        = "8 miles away";
                    tmp.MatchedTag      = "";
                    tmp.StatusColor     = StatusColorConverter(helper.Status);
                    tmp.StatusText      = StatusTextConverter(helper.Status);;
                    tmp.LocationIconUrl = "https://s3-us-west-1.amazonaws.com/image.cycbis.com/Icon/LocationPinIcon.png";
                    tmp.ImageUrl        = helper.Icon;
                    tmp.ChatID          = helper.ChatID;
                    tmp.Bio             = helper.Bio;
                    newhelpers.Add(tmp);
                }
            }
            else
            {
                foreach (UserPro helper in helpers)
                {
                    HelperLabel tmp = new HelperLabel();
                    tmp.HelperID        = helper.UserID;
                    tmp.Name            = helper.FirstName + "  " + helper.LastName;
                    tmp.Rating          = StarNoToStarSign(helper.Rating);
                    tmp.Language        = "Language: " + helper.FLanguage + "/" + helper.SLanguage;
                    tmp.Baseprice       = "$" + helper.PriceSign + " starting cost";
                    tmp.Location        = "8 miles away";
                    tmp.MatchedTag      = "";
                    tmp.StatusColor     = StatusColorConverter(helper.Status);
                    tmp.StatusText      = StatusTextConverter(helper.Status);;
                    tmp.LocationIconUrl = "https://s3-us-west-1.amazonaws.com/image.cycbis.com/Icon/LocationPinIcon.png";
                    tmp.ImageUrl        = helper.Icon;
                    tmp.ChatID          = helper.ChatID;
                    tmp.Bio             = helper.Bio;
                    newhelpers.Add(tmp);
                }
            }

            return(newhelpers);
        }
        private void Pageload(HelperLabel hl)
        {
            HelperName.Text     = hl.Name;
            HelperLanguage.Text = hl.Language;
            HelperRating.Text   = hl.Rating;
            HelperTags.Text     = uih.GetTagsByID(hl.HelperID);
            HelperBio.Text      = hl.Bio;
            HelperPrice.Text    = hl.Baseprice;
            HelperImage.Source  = hl.ImageUrl;

            /*List<ReviewLabelContent> reviewsList = bcc.BindingReviewssConvert(uih.GetReviewsList(hl.HelperID));
             * ReviewerName1.Text = reviewsList[0].ReviewerName;
             * ReviewerRating1.Text = reviewsList[0].ReviewerRating;
             * ReviewerContent1.Text = reviewsList[0].ReviewerContent;
             * ReviewerName2.Text = reviewsList[1].ReviewerName;
             * ReviewerRating2.Text = reviewsList[1].ReviewerRating;
             * ReviewerContent2.Text = reviewsList[1].ReviewerContent;
             * ReviewerName3.Text = reviewsList[2].ReviewerName;
             * ReviewerRating3.Text = reviewsList[2].ReviewerRating;
             * ReviewerContent3.Text = reviewsList[2].ReviewerContent;*/
        }
Ejemplo n.º 7
0
        public List <HelperLabel> BindingHelpersConvert(List <UserPro> helpers)
        {
            List <HelperLabel> newhelpers = new List <HelperLabel>();
            HelperLabel        tmp        = new HelperLabel();

            foreach (UserPro helper in helpers)
            {
                tmp.HelperID        = helper.UserID;
                tmp.Name            = helper.FirstName + "  " + helper.LastName;
                tmp.Rating          = StarNoToStarSign(helper.Rating);
                tmp.Language        = "Language: " + helper.FLanguage + "/" + helper.SLanguage;
                tmp.Baseprice       = "$" + helper.PriceSign + " starting cost";
                tmp.Location        = "8 miles away";//TODO:应该绑定为真实数据
                tmp.StatusColor     = StatusColorConverter(helper.Status);
                tmp.StatusText      = StatusTextConverter(helper.Status);;
                tmp.LocationIconUrl = "https://s3-us-west-1.amazonaws.com/image.cycbis.com/Icon/LocationPinIcon.png";
                tmp.ImageUrl        = helper.Icon;
                newhelpers.Add(tmp);
            }
            return(newhelpers);
        }
Ejemplo n.º 8
0
 public HelperProfilePage(HelperLabel hl)
 {
     InitializeComponent();
     _currenthelperlabel = hl;
     Pageload(hl);
 }