Exemplo n.º 1
0
        static void Main(string[] args)
        {
            string f = "image/";

            IAvatarFolder folder = new AvatarFolder(f);

            int width = 250;

            IEmail email = new Email("*****@*****.**");

            IAvatarConfiguration configuration =
                new AvatarConfiguration(
                    email,
                    folder,
                    width,
                    AvatarImageExtension.Jpeg,
                    AvatarRating.R);

            IAvatar avatar = new Avatar(configuration);

            if (avatar.Exists() == false)
            {
                avatar.Save();
                System.Console.WriteLine("Foto gravada com sucesso !!!");
            }
            else
            {

                System.Console.WriteLine("Foto existente !!!");
            }

            System.Console.ReadKey();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            IAvatarFolder folder = new AvatarFolder("image/");
            IEmail email = new Email("*****@*****.**");
            IAvatarConfiguration configuration =
                new AvatarConfiguration(email, folder, 250, AvatarImageExtension.Jpeg, AvatarRating.R);
            IAvatar avatar = new Avatar(configuration);

            if (avatar.Exists() == false)
            {
                avatar.Save();
                Console.WriteLine("Foto gravada com sucesso !!!");
            }
            else
            {
                Console.WriteLine("Foto existente: {0}", avatar.Path());
            }
            Console.ReadKey();
        }