public Document(String id, String t, Author a, bool c) { Title = t; ID = id; Author = a.Name+" "+a.FirstName ; Copyright = c.ToString(); }
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; }
public Text(String i,String t, Author a, bool c) : base(i,t, a, c) { }
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); }
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); }
public Book(String i, String t, Author a, bool c, string e, int p) : base(i, t, a, c) { Editor = e; publicationYear = p; }
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(); }
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(); }
public Author(Author a) { Name = a.Name; FirstName = a.FirstName; }
public Document() { Title = "Sans titre"; author = new Author("UnknownName", "UnknownFirstName"); copyright = false; }
public Article(String i, String t, Author a, bool c, Review r) : base(i, t, a, c) { review = r; }