Пример #1
0
 public Document(String id, String t, Author a, bool c)
 {
     Title = t;
     ID = id;
     Author =  a.Name+" "+a.FirstName ;
     Copyright = c.ToString();
 }
Пример #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;
 }
Пример #3
0
 public Text(String i,String t, Author a, bool c)
     : base(i,t, a, c)
 {
 }
Пример #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);
 }
Пример #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);
 }
Пример #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;
 }
Пример #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();
        }
Пример #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();
        }
Пример #9
0
 public Author(Author a)
 {
     Name = a.Name;
     FirstName = a.FirstName;
 }
Пример #10
0
 public Document()
 {
     Title = "Sans titre";
     author = new Author("UnknownName", "UnknownFirstName");
     copyright = false;
 }
Пример #11
0
 public Article(String i, String t, Author a, bool c, Review r)
     : base(i, t, a, c)
 {
     review = r;
 }