예제 #1
0
        public static Template GetTemplate_2()
        {
            var template = new Template("Temp2");

            var fonts = new Fonts("Polices_cv")
            {
                new FontElement("Colibri", 9, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, true, true, false),                                                                                //italic, gras, souligné
                new FontElement("Times New Roman", 7, new Color()
                {
                    R = 0, G = 0, B = 150, A = 255
                }, true, true, false, true),
                new FontElement("Tahoma", 6, new Color()
                {
                    R = 0, G = 0, B = 0, A = 255
                }, true, false, false, false),
                new FontElement("Tahoma", 4, new Color()
                {
                    R = 170, G = 0, B = 0, A = 190
                }, false, false, true, false)
            };

            var boite_diplomes    = new BoxText(20, 120, 35, 100, 75, 0, "Diplômes");
            var boite_coordonnées = new BoxText(20, 40, 20, 60, 70, 10, "Coordonnées");
            var boite_langues     = new BoxText(20, 200, 10, 100, 50, 0, "Langues");

            var fond = new BoxBackground(0, 100, 50, 210, 190, 0)
            {
                Fill = new Color()
                {
                    A = 200, R = 255, G = 255, B = 51
                }                                                        // fond jaune
            };

            var fond2 = new BoxBackground(0, 0, 40, 210, 100)
            {
                Fill = new Color()
                {
                    A = 150, R = 255, G = 130
                }                                                //fond orange
            };

            template.Layout = new Layout();
            template.Fonts  = fonts;
            template.Layout.AddTextBox(boite_coordonnées);
            template.Layout.AddTextBox(boite_diplomes);
            template.Layout.AddTextBox(boite_langues);
            template.Layout.AddBackBox(fond);
            template.Layout.AddBackBox(fond2);



            return(template);
        }
예제 #2
0
 /// <summary>
 /// Add a previously created TextBox to Layout
 /// </summary>
 public void AddTextBox(BoxText box)
 {
     TextBoxes.Add(box);
 }
예제 #3
0
        public static Resume GetResumeTest()
        {
            Resume CV;

            var coordonnees = new ElementList <Element>("Coordonnées")
            {
                new Data <string>("Nom", "Clovis", -1, "", true),
                new Data <string>("Téléphone", "+33660606060", -1, "", true),
                new Data <string>("Mél", "*****@*****.**", -1, "", true)
            };

            var competences = new ElementList <Element>("Compétences")
            {
                new ElementList <Element>("Informatique")
                {
                    new Data <string>("C", "C", 2, "", true),
                    new Data <string>("C++", "C++", 1, "", true),
                    new Data <string>("Java", "java", 1, "", true)
                },
                new Data <string>("Business process", "Business Process", 4, "", true)
            };

            var langues = new ElementList <Element>("Langues")
            {
                new Data <string>("Anglais", "anglais", 5, "", true),
                new Data <string>("Allemand", "allemand", 2, "", true),
                new Data <string>("Chinois", "chinois", 1.5, "", true),
            };

            var diplomes = new ElementList <Element>("Diplômes")
            {
                new DataDated <string>("Flying Spaghetti Monster degree", "Flying Spaghetti Monster degree", new DateTime(2017, 12, 24), new DateTime(2017, 12, 24), "Le $1(d)$", -1, "", true),
                new DataDated <string>("Bac", "bac", new DateTime(1992, 11, 14), new DateTime(1992, 11, 14), "Le $1(D)$", -1, "", true)
            };

            var fonts = new Fonts("Polices_cv")
            {
                new FontElement("Tahoma", 7, new Color()
                {
                    R = 0, G = 0, B = 0, A = 255
                }, false, true, false, false),                                                                        //ARGB 0 on voit rien, 255 opaque
                new FontElement("Tahoma", 6, new Color()
                {
                    R = 0, G = 0, B = 0, A = 255
                }, false, false, false, false),
                new FontElement("Tahoma", 5, new Color()
                {
                    R = 0, G = 0, B = 0, A = 255
                }, false, false, false, false),
                new FontElement("Calibri", 5, new Color()
                {
                    R = 0, G = 0, B = 0, A = 190
                })
            };

            var boite_de_langues     = new BoxText(10, 230, 60, 105, 72.5, 0, "Langues"); //boite de texte qui contiendra les competences
            var boite_de_coordonnees = new BoxText(110, 10, 0, 210, 40, 0, "Coordonnées");
            var boite_de_competences = new BoxText(10, 150, 60, 105, 60, 0, "Compétences");
            var boite_de_diplomes    = new BoxText(10, 100, 60, 105, 72.5, 0, "Diplômes");

            var fond = new BoxBackground(0, 70, 10, 210, 60)
            {
                Fill = new Color()
                {
                    A = 255, R = 196, G = 215, B = 237
                } //verte un peu transparente
            };    //boite de fond

            var fond2 = new BoxBackground(115, 150, 30, 160, 73, -40)
            {
                Fill = new Color()
                {
                    A = 255, R = 171, B = 226, G = 200
                } //turquoise ? transparent
            };    //boite de fond

            var fond3 = new BoxBackground(-15, -4, 50, 700, 65, 50)
            {
                Fill = new Color()
                {
                    A = 255, B = 129, G = 93, R = 55
                }
            };

            boite_de_competences.Element = competences;
            boite_de_coordonnees.Element = coordonnees;
            boite_de_langues.Element     = langues;
            boite_de_diplomes.Element    = diplomes;

            CV = new Resume("CV 1")
            {
                Fonts = fonts
            };

            CV.Layout = new Layout();
            CV.Layout.AddBackBox(fond);
            CV.Layout.AddBackBox(fond2);
            CV.Layout.AddBackBox(fond3);
            CV.Layout.AddTextBox(boite_de_competences);
            CV.Layout.AddTextBox(boite_de_coordonnees);
            CV.Layout.AddTextBox(boite_de_langues);
            CV.Layout.AddTextBox(boite_de_diplomes);

            return(CV);
        }
예제 #4
0
        public static Resume GetResumeTest2()
        {
            Resume CV;

            var nom         = new Data <string>("Nom", "Clovis", -1, "", true);
            var titre       = new Data <string>("Titre", "Roi des Francs", -1, "", true);
            var coordonnees = new ElementList <Element>("Coordonnées")
            {
                new Data <string>("Téléphone", "+33660606060", -1, "", true),
                new Data <string>("Mél", "*****@*****.**", -1, "", true),
                new Data <string>("Adresse", "17 rue de la Réussite\n75012 Paris", -1, "", true)
            };

            var objectif = new ElementList <Element>("Objectif")
            {
                new ElementList <Element>("Mon Objectif")
                {
                    new Data <string>("obj", "Je compte unir les Francs, conquérir le nord de la Loire, puis l'Est, et je vaincrai les Burgondes. Mais je ne cesserai pas, et je m'emparerai du Centre et du Sud Ouest de la gaule !", -1, "", true)
                }
            };

            var competences = new ElementList <Element>("Compétences")
            {
                new ElementList <Element>("Diplomatie")
                {
                    new Data <string>("Politique", "Politique", 4, "", true),
                    new Data <string>("Assassinat", "Assassinat", 3, "", true),
                    new Data <string>("Mariage", "Mariage", 2, "", true),
                    new Data <string>("Soudoiement", "Soudoiement", 2, "", true),
                },
            };

            var langues = new ElementList <Element>("Langues")
            {
                new Data <string>("Francique", "Francique", 5, "", true),
                new Data <string>("Français moderne", "Français moderne", 1, "", true),
                new Data <string>("Allemand moderne", "Allemand moderne", 1, "", true),
            };

            var diplomes = new ElementList <Element>("Dynastie")
            {
                new DataDated <string>("Mérovingien", new DateTime(466, 1, 1), default(DateTimeOffset), "Depuis $1(yyy)$", -1, "", true),
            };

            var fonts = new Fonts("Polices_cv")
            {
                new FontElement("Garamond", 5, new Color()
                {
                    R = 0, G = 0, B = 255, A = 255
                }, false, false, false, true),                                                                            //ARGB 0 on voit rien, 255 opaque
                new FontElement("Garamond", 5, new Color()
                {
                    R = 0, G = 0, B = 150, A = 255
                }, false, true, false, false),
                new FontElement("Garamond", 5, new Color()
                {
                    R = 100, G = 100, B = 200, A = 255
                }, true, false, false, false),
                new FontElement("Calibri", 5, new Color()
                {
                    R = 70, G = 70, B = 200, A = 190
                })
            };

            var fonts1 = new Fonts("obj", Windows.UI.Xaml.TextAlignment.Justify)
            {
                new FontElement("Garamond", 5, new Color()
                {
                    R = 168, G = 215, B = 203, A = 255
                }, false, false, false, false),
            };

            var boite_de_nom   = new BoxText(90, 15, 60, 40, 20, 0, "nom");
            var boite_de_titre = new BoxText(80, 28, 60, 40, 10, 0, "titre");
            var boite_d_obj    = new BoxText(15, 50, 60, 70, 40, 0, "obj", fonts1);

            var boite_de_coordonnees = new BoxText(140, 50, 60, 80, 60, 0, "Coordonnées");
            var boite_de_competences = new BoxText(20, 95, 60, 40, 50, 0, "Diplomatie");
            var boite_de_langues     = new BoxText(140, 95, 60, 80, 50, 0, "Langues");
            var boite_de_diplomes    = new BoxText(15, 160, 60, 150, 15, 0, "Dynastie");

            var fond = new BoxBackground(0, 90, 10, 210, 50)
            {
                Fill = new Color()
                {
                    A = 140, G = 255
                } //verte un peu transparente
            };    //boite de fond

            var img   = new DataImage("CV 2_-_profil", true);
            var photo = new BoxBackground(105 - 50 / 2, 90 + 5, 50, 40, 40, 0, BoxBackgroundShape.Ellipse)
            {
                Image = img
            };

            /*var fond2 = new BoxBackground(115, 150, 100, 160, 73, null, -40)
             *          {
             *                  Color = new Color() { A = 190, B = 170, G = 255 } //turquoise ? transparent
             *          }; //boite de fond
             *
             *          var fond3 = new BoxBackground(-15, -4, 100, 700, 65, null, 50)
             *          {
             *                  Color = new Color() { A = 255, B = 200, G = 200, R = 255 }
             *          };*/

            boite_de_nom.Element         = nom;
            boite_de_titre.Element       = titre;
            boite_d_obj.Element          = objectif;
            boite_de_competences.Element = competences;
            boite_de_coordonnees.Element = coordonnees;
            boite_de_langues.Element     = langues;
            boite_de_diplomes.Element    = diplomes;

            CV = new Resume("CV 2")
            {
                Fonts = fonts
            };

            CV.Layout = new Layout();
            CV.Layout.AddBackBox(fond);
            CV.Layout.AddBackBox(photo);
            //CV.Layout.AddBackBox(fond2);
            //CV.Layout.AddBackBox(fond3);

            CV.Layout.AddTextBox(boite_d_obj);
            CV.Layout.AddTextBox(boite_de_nom);
            CV.Layout.AddTextBox(boite_de_titre);
            CV.Layout.AddTextBox(boite_de_competences);
            CV.Layout.AddTextBox(boite_de_coordonnees);
            CV.Layout.AddTextBox(boite_de_langues);
            CV.Layout.AddTextBox(boite_de_diplomes);

            return(CV);
        }
예제 #5
0
        public static Template GetTemplate_4()
        {
            var template = new Template("Black & White");

            var fonts = new Fonts("Polices_cv")
            {
                new FontElement("Colibri", 6, new Color()
                {
                    R = 0, G = 0, B = 0, A = 200
                }, false, false, false, false)
            };

            var fonts_titre = new Fonts("Polices_cv")
            {
                new FontElement("Colibri", 16, new Color()
                {
                    R = 0, G = 0, B = 0, A = 200
                }, false, false, false, false)
            };

            var fonts_petit = new Fonts("Polices_cv")
            {
                new FontElement("Colibri", 6, new Color()
                {
                    R = 0, G = 0, B = 0, A = 200
                }, false, false, false, false)
            };

            var fonts_langues = new Fonts("Polices_cv")
            {
                new FontElement("Colibri", 5, new Color()
                {
                    R = 0, G = 0, B = 0, A = 200
                }, false, false, false, false)
            };

            var fonts_competences = new Fonts("Polices_cv")
            {
                new FontElement("Colibri", 7, new Color()
                {
                    R = 0, G = 0, B = 0, A = 200
                }, false, false, false, false),
                new FontElement("Colibri", 5, new Color()
                {
                    R = 0, G = 0, B = 0, A = 200
                }, false, false, false, false),
                new FontElement("Colibri", 4, new Color()
                {
                    R = 0, G = 0, B = 0, A = 200
                }, false, false, false, false)
            };

            var boite_exp         = new BoxText(57, 229, 20, 82, 32, 0, "Expériences professionnelles");
            var boite_coordonnées = new BoxText(123, 125, 20, 67, 52, 0, "Coordonnées");
            var boite_competences = new BoxText(57, 229, 20, 82, 100, 0, "Diplômes", fonts_competences);
            var boite_tel         = new BoxText(123, 125, 20, 40, 10, 0, "Téléphone", fonts_langues);
            var boite_mel         = new BoxText(67, 136, 20, 46, 10, 0, "Mél", fonts_langues);
            var boite_adresse     = new BoxText(67, 125, 20, 45, 6, 0, "Adresse", fonts_langues);
            var boite_nom         = new BoxText(57, 24, 40, 60, 30, 0, "Nom", fonts_titre);
            var boite_profession  = new BoxText(57, 42, 0, 42, 8, 0, "Profession");
            var boite_diplomes    = new BoxText(58, 164, 0, 82, 100, 0, "Compétences", fonts_competences);
            var fond = new BoxBackground(0, 0, 0, 210, 297, 0)
            {
                Image = new DataImage("Temp4_-_fond", true)
            };

            template.Layout = new Layout();
            template.Fonts  = fonts;
            template.Layout.AddTextBox(boite_nom);
            template.Layout.AddTextBox(boite_tel);
            template.Layout.AddTextBox(boite_mel);
            template.Layout.AddTextBox(boite_adresse);
            template.Layout.AddTextBox(boite_diplomes);
            template.Layout.AddTextBox(boite_profession);
            template.Layout.AddTextBox(boite_competences);
            template.Layout.AddBackBox(fond);

            return(template);
        }
예제 #6
0
        public static Template GetTemplate_3()
        {
            var template = new Template("Green Peace");

            var fonts = new Fonts("Polices_cv")
            {
                new FontElement("Gadugi", 6, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, false, false, false)                                                                              //italic, gras, souligné
            };

            var fonts_titre = new Fonts("Polices_cv")
            {
                new FontElement("Gadugi", 10, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, false, false, false)                                                                               //italic, gras, souligné
            };

            var fonts_petit = new Fonts("Polices_cv")
            {
                new FontElement("Gadugi", 5, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, false, false, false)                                                                              //italic, gras, souligné
            };

            var fonts_petit_droit = new Fonts("Polices_cv", Windows.UI.Xaml.TextAlignment.Right)
            {
                new FontElement("Gadugi", 5, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, false, false, false)                                                                              //italic, gras, souligné
            };

            var fonts_tres_petit = new Fonts("Polices_cv", Windows.UI.Xaml.TextAlignment.Justify)
            {
                new FontElement("Gadugi", 4, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, false, false, false)                                                                              //italic, gras, souligné
            };

            var fonts_langues = new Fonts("Polices_cv")
            {
                new FontElement("Gadugi", 6.5, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, false, false, true),
                new FontElement("Gadugi", 1, new Color()
                {
                    R = 120, G = 0, B = 0, A = 0
                }, false, false, false, false)
            };

            var fonts_corps = new Fonts("Polices_cv", Windows.UI.Xaml.TextAlignment.Right)
            {
                new FontElement("Gadugi", 6.5, new Color()
                {
                    R = 120, G = 0, B = 0, A = 0
                }, false, false, false, true),
                new FontElement("Gadugi", 5, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, false, false, false)
            };

            var fonts_normal = new Fonts("Polices_cv")
            {
                new FontElement("Gadugi", 6.5, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, false, false, false),
                new FontElement("Gadugi", 5, new Color()
                {
                    R = 120, G = 0, B = 0, A = 200
                }, false, false, false, false)
            };

            var boite_diplomes = new BoxText(8, 170, 20, 193, 64, 0, "Diplômes", fonts_normal);
            var boite_études   = new BoxText(8, 200, 20, 193, 64, 0, "Études", fonts_normal);
            var boite_pro      = new BoxText(8, 220, 20, 193, 64, 0, "Expériences professionnelles", fonts_normal);

            var boite_coordonnées2 = new BoxText(134, 45, 20, 67, 30, 0, "Coordonnées", fonts_corps);
            var boite_coordonnées  = new BoxText(157, 38, 20, 67, 52, 0, "Coordonnées", fonts_langues);

            //var boite_coordonnées1 = new BoxText(134, 52, 20, 67, 52, 0, "Nom", fonts_petit_droit);
            //var boite_coordonnées2 = new BoxText(134, 59, 20, 67, 52, 0, "Téléphone", fonts_petit_droit);
            //var boite_coordonnées3= new BoxText(134, 66, 20, 67, 52, 0, "Mél", fonts_petit_droit);

            var boite_langues  = new BoxText(172, 90, 10, 49, 28, 0, "Langues", fonts_langues);
            var boite_langue_1 = new BoxText(144, 108, 10, 29, 28, 0, "Langue 1", fonts_petit);
            var boite_langue_2 = new BoxText(144, 116, 10, 29, 28, 0, "Langue 2", fonts_petit);
            var boite_langue_3 = new BoxText(144, 124, 10, 29, 28, 0, "Langue 3", fonts_petit);
            var boite_langue_4 = new BoxText(144, 132, 10, 29, 28, 0, "Langue 4", fonts_petit);

            var boite_d_obj  = new BoxText(8, 38, 60, 70, 40, 0, "Mon Objectif", fonts_langues);
            var boite_d_obj2 = new BoxText(7, 52, 60, 70, 40, 0, "obj", fonts_tres_petit);


            var boite_compétence_1 = new BoxText(7, 107, 10, 29, 28, 0, "Politique", fonts_petit);
            var boite_compétence_2 = new BoxText(7, 115, 10, 29, 28, 0, "Meurtre", fonts_petit);
            var boite_compétence_3 = new BoxText(7, 123, 10, 29, 28, 0, "Mariage", fonts_petit);
            var boite_compétence_4 = new BoxText(7, 131, 10, 29, 28, 0, "Ruse", fonts_petit);

            var boite_nom         = new BoxText(88, 12, 20, 81, 15, 0, "Nom", fonts_titre);
            var boite_profession  = new BoxText(84, 33, 0, 81, 20, 0, "Profession");
            var boite_competences = new BoxText(7, 90, 0, 50, 64, 0, "Compétences", fonts_langues);

            var img         = new DataImage("profile", true);
            var boite_photo = new BoxBackground(105 - 50 / 2, 90 + 5, 50, 40, 40, 0, BoxBackgroundShape.Ellipse)
            {
                Image = img
            };

            var fond = new BoxBackground(0, 0, 0, 210, 297, 0)
            {
                Image = new DataImage("Temp3_-_fond", true)
            };

            template.Layout = new Layout();
            template.Fonts  = fonts;
            template.Layout.AddTextBox(boite_coordonnées2);
            template.Layout.AddTextBox(boite_coordonnées);

            //template.Layout.AddTextBox(boite_coordonnées1);
            //template.Layout.AddTextBox(boite_coordonnées2);
            //template.Layout.AddTextBox(boite_coordonnées3);
            template.Layout.AddTextBox(boite_diplomes);
            template.Layout.AddTextBox(boite_études);
            template.Layout.AddTextBox(boite_pro);
            template.Layout.AddTextBox(boite_langues);
            template.Layout.AddTextBox(boite_langue_1);
            template.Layout.AddTextBox(boite_langue_2);
            template.Layout.AddTextBox(boite_langue_3);
            template.Layout.AddTextBox(boite_langue_4);
            template.Layout.AddTextBox(boite_compétence_1);
            template.Layout.AddTextBox(boite_compétence_2);
            template.Layout.AddTextBox(boite_compétence_3);
            template.Layout.AddTextBox(boite_compétence_4);
            template.Layout.AddTextBox(boite_nom);
            template.Layout.AddTextBox(boite_d_obj);
            template.Layout.AddTextBox(boite_d_obj2);
            template.Layout.AddTextBox(boite_profession);
            template.Layout.AddTextBox(boite_competences);
            template.Layout.AddBackBox(fond);
            template.Layout.AddBackBox(boite_photo);

            return(template);
        }
예제 #7
0
        public static Template GetTemplate_1()
        {
            var template = new Template("Temp1");


            var fonts = new Fonts("Polices_cv")
            {
                new FontElement("Times New Roman", 7, new Color()
                {
                    R = 255, G = 0, B = 0, A = 100
                }, false, true, true, false),                                                                                        //italic, gras, souligné
                new FontElement("Calibri", 5, new Color()
                {
                    R = 0, G = 255, B = 0, A = 255
                }, true, true, false, true),
                new FontElement("Verdana", 4, new Color()
                {
                    R = 255, G = 0, B = 255, A = 255
                }, true, false, false, false),
                new FontElement("Comic Sans MS", 3, new Color()
                {
                    R = 70, G = 70, B = 200, A = 190
                }, false, false, false, false)
            };
            var boite_competences = new BoxText(75, 80, 50, 105, 75, 0, "Compétences");
            var boite_coordonnées = new BoxText(5, 40, 20, 200, 60, 10, "Coordonnées");
            var boite_etudes      = new BoxText(75, 200, 10, 150, 50, 0, "Études");
            var boite_exp         = new BoxText(75, 250, 10, 150, 50, 0, "Expériences professionnelles");
            var boite_langues     = new BoxText(5, 200, 10, 70, 50, 0, "Langues");
            var boite_diplomes    = new BoxText(75, 130, 20, 130, 50, 0, "Diplômes");

            var fond = new BoxBackground(0, 0, 20, 70, 300, 0)
            {
                Fill = new Color()
                {
                    A = 50, B = 120, G = 130
                }                                               // fond peu transparent qui se trouve sous la boite contact
            };

            var fond2 = new BoxBackground(65, 0, 40, 150, 300)
            {
                Fill = new Color()
                {
                    A = 200, R = 50, G = 120, B = 120
                }
            };

            var fond3 = new BoxBackground(120, 100, 20, 70, 70, 20)
            {
                Fill = new Color()
                {
                    A = 200, R = 255
                }
            };

            template.Layout = new Layout();
            template.Fonts  = fonts;
            template.Layout.AddTextBox(boite_coordonnées);
            template.Layout.AddTextBox(boite_langues);
            template.Layout.AddTextBox(boite_competences);
            template.Layout.AddTextBox(boite_etudes);
            template.Layout.AddTextBox(boite_exp);
            template.Layout.AddTextBox(boite_diplomes);
            template.Layout.AddBackBox(fond);
            template.Layout.AddBackBox(fond2);
            template.Layout.AddBackBox(fond3);

            return(template);
        }