Esempio n. 1
0
        public ProductLine(string v)
        {
            this.v = v;
            string[] arrCols = v.Split('|');
            this.EAN                = arrCols[27];
            this.ProductId          = arrCols[27];
            this.ProductTilte       = arrCols[1];
            this.ProductDescription = arrCols[3];
            this.Medias             = arrCols[5];

            this.ClassificationValue = Program.Globals.classificationValue;
            this.VendorID            = Program.Globals.vendorId;
            this.ComColor            = arrCols[14].Trim();
            this.ComColorCode        = (arrCols[14].IndexOf("fonc") > 0) ? "V087505" : "V087506";
            this.SapEspCodeValue     = arrCols[13].Trim();
            this.SapEspCode          = GenericColors.find(this.SapEspCodeValue);
            this.prodHeightCodeValue = arrCols[15].Trim();
            this.prodHeightCode      = GenericColors.find(this.prodHeightCodeValue);
            this.BrandCode           = Program.Globals.productCode;
            //Attributs media
            string[] arrMedia = Medias.Split(' ');
            for (int i = 0; i < arrMedia.Length; i++)
            {
                var mElt = new MediaElt();
                mElt.MediaURL = arrMedia[i];
                string image = mElt.MediaURL.Split('/')[mElt.MediaURL.Split('/').Length - 1];
                mElt.MediaEncoding   = image.Substring(image.IndexOf('.') + 1);
                mElt.ChecksumType    = "MD5";
                mElt.MediaType       = "Photo";
                mElt.Checksum        = MD5Hash(mElt.MediaURL);
                mElt.PublicationRank = (i + 1).ToString();
                listMedias.Add(mElt);
            }
        }
Esempio n. 2
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string YouTubeId = "pA1OaRb9Cb0";

            try
            {
                YouTubeUri url = await YouTube.GetVideoUriAsync(YouTubeId, YouTubeQuality.Quality360P);

                MediaElt.Source = url.Uri;
                MediaElt.Play();
            }
            catch (Exception)
            {
                // TODO show error (video uri not found)
            }
        }