Ejemplo n.º 1
0
 public Document(String id, String t, Author a, bool c)
 {
     Title = t;
     ID = id;
     Author =  a.Name+" "+a.FirstName ;
     Copyright = c.ToString();
 }
Ejemplo n.º 2
0
 public Multimedia(String i, String t, Author a, bool c, int mA,int  sA, int hV,int mV,int  sV, string ttle)
     : base(i,t, a, c)
 {
     Sound = new Duration(0,mA,sA);
     Image = new Duration(hV,mV,sV);
     Text_title = ttle;
 }
Ejemplo n.º 3
0
 public Text(String i,String t, Author a, bool c)
     : base(i,t, a, c)
 {
 }
Ejemplo n.º 4
0
 public Audio(String i, String t, Author a, bool c,int m,int s)
     : base(i,t, a, c)
 {
     Duration = new Duration(0,m,s);
 }
Ejemplo n.º 5
0
 public Video(String i,String t, Author a, bool c, int h,int m,int s)
     : base(i ,t , a, c)
 {
     Duration = new Duration(h,m,s);
 }
Ejemplo n.º 6
0
 public Book(String i, String t, Author a, bool c, string e, int p)
     : base(i, t, a, c)
 {
     Editor = e;
     publicationYear = p;
 }
Ejemplo n.º 7
0
        void butt_Add_Article_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            bool copyR = this.chkB_CopyR.Checked; //Copyright
            string[] authName = this.txtAuthor.Text.Split(' '); //Nom et Prénom de l'auteur
            Author auth = new Author(authName[0], authName[1]); //Auteur du document

            if (this.id_current_doc == "")
            {
                Random rand = new Random();
                /***INFOS DOCUMENT***/
                string generatedId = "" + controller.Model.AllDocuments.Count + this.txtTitle.Text.Substring(0, 3) + rand.Next(100); //ID auto générée
                controller.AddNewDocument(new Article(generatedId, this.txtTitle.Text, auth, copyR, new Review(this.userControl11.txt_R_title.Text, this.userControl11.txt_E_Name.Text, this.userControl11.spin_R_numb.Text)));
            }
            else
            {
                controller.UpdateAllInfos(new Article(this.id_current_doc, this.txtTitle.Text, auth, copyR, new Review(this.userControl11.txt_R_title.Text, this.userControl11.txt_E_Name.Text, this.userControl11.spin_R_numb.Text)));
            }
            this.Dispose();
        }
Ejemplo n.º 8
0
        void butt_Add_Video_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            bool copyR = true; //Copyright
            string[] authName = this.txtAuthor.Text.Split(' '); //Nom et Prénom de l'auteur
            Author auth = new Author(authName[0], authName[1]); //Auteur du document

            if (this.id_current_doc == "")
            {
                Random rand = new Random();
                /***INFOS DOCUMENT***/
                string generatedId = "" + controller.Model.AllDocuments.Count + this.txtTitle.Text.Substring(0, 3) + rand.Next(100); //ID auto générée

                controller.AddNewDocument(new Video(generatedId, this.txtTitle.Text, auth, copyR, (int)this.userControl11.spin_Hours_Video.Value, (int)this.userControl11.spin_Minutes_Video.Value, (int)this.userControl11.spin_Secondes_Video.Value));
            }
            else
            {
                controller.UpdateAllInfos(new Video(this.id_current_doc, this.txtTitle.Text, auth, copyR, (int)this.userControl11.spin_Hours_Video.Value, (int)this.userControl11.spin_Minutes_Video.Value, (int)this.userControl11.spin_Secondes_Video.Value));
            }
            this.Dispose();
        }
Ejemplo n.º 9
0
 public Author(Author a)
 {
     Name = a.Name;
     FirstName = a.FirstName;
 }
Ejemplo n.º 10
0
 public Document()
 {
     Title = "Sans titre";
     author = new Author("UnknownName", "UnknownFirstName");
     copyright = false;
 }
Ejemplo n.º 11
0
 public Article(String i, String t, Author a, bool c, Review r)
     : base(i, t, a, c)
 {
     review = r;
 }