コード例 #1
0
ファイル: Presentation.cs プロジェクト: drXploit/CIS162AD
 // check changed, update boxes
 private void radioButton1_CheckedChanged(object sender, EventArgs e)
 {
     if (MagazineRadio.Checked)
     {
         detailsBox.Text  = aMagazine.ToString();
         hardCopyBox.Text = aMagazine.GetHardCopyOption();
     }
 }
コード例 #2
0
ファイル: Presentation.cs プロジェクト: drXploit/CIS162AD
 private void PresentationFormLoad(object sender, EventArgs e)
 {
     // instantation of ReadingMaterial derived classes
     onlineArticle = new Online("How to play guitar", "John", "Michaels", "Infinite Publishing Company", new DateTime(2016, 10, 09), "guitars.com/howtoplay");
     aMagazine     = new Magazine("Sports Illustrated", "Hugh", "Guhsportsfan", "Sports Illustrated Publishing", new DateTime(2018, 05, 03), "May", 2018, new DateTime(2019, 05, 01));
     aBook         = new Book("The End of the World", "Contessa", "Jackson", "Doomsday Publishing", new DateTime(2013, 02, 14), "A1203Z2334", true);
     // fill the initial box values since aMagazine is the one selected
     detailsBox.Text  = aMagazine.ToString();
     hardCopyBox.Text = aMagazine.GetHardCopyOption();
 }