コード例 #1
0
        public CompanyCategoryListPage(Company company, Location location = null)
        {
            InitializeComponent();

            _instance = this;
            _location = location;

            if (Device.RuntimePlatform == "Android")
            {
                frmXaml.CornerRadius = 30;
            }

            _seletedCategory = string.Empty;
            _company         = company;

            if (_company.HasMessageNotRead)
            {
                imgChat.Source = "ic_chat_msg";
            }

            lblName.Text         = _location.Name;
            lblAddress.Text      = company.Address;
            lblPhone.Text        = company.Cellphone;
            imgUser.Source       = _location.ImageUri;
            lblInfoDistance.Text = company.DistanceString;
            lblAvaliacoes.Text   = "(" + _company.TotalRating + AppResource.textRatings;

            ColorPage();
        }
コード例 #2
0
        public CompanyOrderPage(Company company, Product product)
        {
            InitializeComponent();

            if (Device.RuntimePlatform == "Android")
            {
                frmXaml.CornerRadius = 30;
            }

            NavigationPage.SetHasNavigationBar(this, false);

            _company = company;
            _product = product;

            if (!product.ShowPrice)
            {
                stkPriceTotal.IsVisible = false;
                stkAddMore.IsVisible    = false;
            }

            imgHeart.Source    = product.IsFavorited ? "ic_heart_detail" : "ic_heart_detail_off";
            imgStar.Source     = product.ProductStarImage;
            lblAvaliacoes.Text = "(" + product.TotalRating + " " + AppResource.textRatings;
            lblName.Text       = product.Name;
            imgUser.Source     = product.ImageUri;

            lblProductDesc.Text = product.Description;
            lblProductName.Text = product.Name;

            CultureInfo cult = company.CurrencyType.ToCultureInfo();

            lblPriceUnitario.Text = string.Format(cult, AppResource.lblOrderPriceUnid, product.Price);
            lblTotalPrice.Text    = string.Format(cult, AppResource.lblOrderPrice, product.Price);

            if (CompanyCategoryListPage.GetInstance().InformativeWithoutPrice)
            {
                stkObservation.IsVisible = false;
                stkPriceTotal.IsVisible  = false;
                grdAdd.IsVisible         = false;
                grdConfirm.IsVisible     = false;
            }

            ColorPage();
        }