Example #1
0
        public static void RunExample2()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Photo2         photo;
            TaggedPhoto2   foodTaggedPhoto, colorTaggedPhoto, tag;
            BorderedPhoto2 composition;

            // Compose a photo with two TaggedPhotos and a blue BorderedPhoto
            photo = new Photo2();
            Application.Run(photo);

            foodTaggedPhoto  = new TaggedPhoto2(photo, "Food");
            colorTaggedPhoto = new TaggedPhoto2(foodTaggedPhoto, "Yellow");
            composition      = new BorderedPhoto2(colorTaggedPhoto, Color.Blue);
            Application.Run(composition);

            Console.WriteLine(colorTaggedPhoto.ListTaggedPhotos());
            // Compose a photo with one TaggedPhoto and a yellow BorderedPhoto
            photo       = new Photo2();
            tag         = new TaggedPhoto2(photo, "Jug");
            composition = new BorderedPhoto2(tag, Color.Yellow);
            Application.Run(composition);
        }
        void ReleaseDesignerOutlets()
        {
            if (AdSoyadText != null)
            {
                AdSoyadText.Dispose();
                AdSoyadText = null;
            }

            if (AdSoyadText2 != null)
            {
                AdSoyadText2.Dispose();
                AdSoyadText2 = null;
            }

            if (AdSoyadText3 != null)
            {
                AdSoyadText3.Dispose();
                AdSoyadText3 = null;
            }

            if (Hazne1 != null)
            {
                Hazne1.Dispose();
                Hazne1 = null;
            }

            if (Hazne2 != null)
            {
                Hazne2.Dispose();
                Hazne2 = null;
            }

            if (Hazne3 != null)
            {
                Hazne3.Dispose();
                Hazne3 = null;
            }

            if (Photo1 != null)
            {
                Photo1.Dispose();
                Photo1 = null;
            }

            if (Photo2 != null)
            {
                Photo2.Dispose();
                Photo2 = null;
            }

            if (Photo3 != null)
            {
                Photo3.Dispose();
                Photo3 = null;
            }
        }
Example #3
0
        public String GetTextView(Int32 indentLevel)
        {
            String        i  = HttpClientHelper.Indent(indentLevel);
            StringBuilder sb = new StringBuilder()
                               .Append(i).Append("Id:       ").Append(Id)
                               .Append(i).Append("CreatedAt:       ").Append(CreatedAt)
                               .Append(i).Append("UpdatedAt:       ").Append(UpdatedAt)
                               .Append(i).Append("Id_Notable:      ").Append(Id_Notable)
                               .Append(i).Append("NotableType:     ").Append(NotableType)
                               .Append(i).Append("Id_User:         "******"Title:           ").Append(Title)
                               .Append(i).Append("Description:     ").Append(Description)
                               .Append(i).Append("Photo1:          ").Append(Photo1.ToString(indentLevel + 1))
                               .Append(i).Append("Photo2:          ").Append(Photo2.ToString(indentLevel + 1))
                               .Append(i).Append("Photo3:          ").Append(Photo3.ToString(indentLevel + 1))
                               .Append(i).Append("Photo1Md5:       ").Append(Photo1Md5)
                               .Append(i).Append("Photo2Md5:       ").Append(Photo2Md5)
                               .Append(i).Append("Photo3Md5:       ").Append(Photo3Md5)
                               .Append(i).Append("CreatedByUserAt: ").Append(CreatedByUserAt)
                               .Append(i).Append("UpdatedByUserAt: ").Append(UpdatedByUserAt);

            return(sb.ToString());
        }
    private IEnumerator AnimMouth()
    {
        yield return(new WaitForEndOfFrame());

        while (true)
        {
            if (cpt % 2 == 0)
            {
                Photo.SetActive(true);
                Photo2.SetActive(false);
            }

            else
            {
                Photo.SetActive(false);
                Photo2.SetActive(true);
            }

            cpt++;

            yield return(new WaitForSeconds(0.5f));
        }
    }
        public async Task <IActionResult> RegisterReel([FromForm] ReelForRegisterDto reelForRegisterDto)
        {
            var file = reelForRegisterDto.file;

            var uploadResult = new ImageUploadResult();

            if (reelForRegisterDto.CMnf == null)
            {
                return(BadRequest("No manufacturer number "));                                    // pratestuoti paskui ar viskas ok, ne veliau bus ikelta
            }
            if (file != null)
            {
                using (var stream = file.OpenReadStream())
                {
                    var uploadParams = new ImageUploadParams()
                    {
                        File           = new FileDescription(file.Name, stream),
                        Transformation = new Transformation().Width(500).Height(300).Crop("fill").Gravity("face")
                    };

                    uploadResult = _cloudinary.Upload(uploadParams);
                }
            }
            if (reelForRegisterDto.URL != null)
            {
                var uploadParams = new ImageUploadParams()
                {
                    File           = new FileDescription(@"data:image/png;base64," + reelForRegisterDto.URL),
                    Transformation = new Transformation().Width(500).Height(300).Crop("fill").Gravity("face")
                };

                uploadResult = _cloudinary.Upload(uploadParams);
            }


            reelForRegisterDto.PublicId = uploadResult.PublicId;

            var componentass = await _context.Componentass.FirstOrDefaultAsync(u => u.Mnf == reelForRegisterDto.CMnf);

            var ReelToCreate = new Reel
            {
                CMnf          = reelForRegisterDto.CMnf,
                QTY           = reelForRegisterDto.QTY,
                ComponentasId = componentass.Id,
                Location      = "0"
            };

            var CreateReel = await _repo.RegisterReel(ReelToCreate);

            var PhotoToCreate = new Photo2
            {
                PublicId = reelForRegisterDto.PublicId,
                IsMain   = true,
                Url      = uploadResult.Uri.ToString(),
                ReelId   = ReelToCreate.Id
            };

            var createPhoto = await _repo.RegisterPhoto(PhotoToCreate);

            return(StatusCode(201));
        }