public static void RunExample1() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Photo photo; TaggedPhoto foodTaggedPhoto, colorTaggedPhoto, tag; BorderedPhoto composition; // Compose a photo with two TaggedPhotos and a blue BorderedPhoto photo = new Photo(); Application.Run(photo); foodTaggedPhoto = new TaggedPhoto(photo, "Food"); colorTaggedPhoto = new TaggedPhoto(foodTaggedPhoto, "Yellow"); composition = new BorderedPhoto(colorTaggedPhoto, Color.Blue); Application.Run(composition); Console.WriteLine(colorTaggedPhoto.ListTaggedPhotos()); // Compose a photo with one TaggedPhoto and a yellow BorderedPhoto photo = new Photo(); tag = new TaggedPhoto(photo, "Jug"); composition = new BorderedPhoto(tag, Color.Yellow); Application.Run(composition); }
static void Main() { // Application.Run acts as a simple client Photo photo; TaggedPhoto foodTaggedPhoto, colorTaggedPhoto, tag; BorderedPhoto composition; // Compose a photo with two TaggedPhotos and a blue BorderedPhoto photo = new Photo(); Application.Run(photo); foodTaggedPhoto = new TaggedPhoto(photo, "Food"); colorTaggedPhoto = new TaggedPhoto(foodTaggedPhoto, "Yellow"); composition = new BorderedPhoto(colorTaggedPhoto, Color.Blue); Application.Run(composition); Console.WriteLine(colorTaggedPhoto.ListTaggedPhotos()); // Compose a photo with one TaggedPhoto and a yellow BorderedPhoto photo = new Photo(); tag = new TaggedPhoto(photo, "Jug"); composition = new BorderedPhoto(tag, Color.Yellow); Application.Run(composition); Console.WriteLine(tag.ListTaggedPhotos()); //added Hominid Hominid hom = new Hominid(); TaggedPhoto personTaggedHominid = new TaggedPhoto(hom, "Littleman"); BorderedPhoto personTaggedAndBordered = new BorderedPhoto(personTaggedHominid, Color.Pink); Application.Run(personTaggedAndBordered); Console.ReadKey(); }
static void Main() { // Application.Run acts as a simple client Photo photo; TaggedPhoto foodTaggedPhoto, colorTaggedPhoto, tag; BorderedPhoto composition; // Compose a photo with two TaggedPhotos and a blue BorderedPhoto photo = new Photo(); foodTaggedPhoto = new TaggedPhoto(photo, "Food"); colorTaggedPhoto = new TaggedPhoto(foodTaggedPhoto, "Yellow"); Application.Run(colorTaggedPhoto); Console.WriteLine(colorTaggedPhoto.ListTaggedPhotos()); // Compose a photo with one TaggedPhoto and a yellow BorderedPhoto photo = new Photo(); composition = new BorderedPhoto(photo, Color.Yellow); Application.Run(composition); // Compose a Hominid with one TaggedPhoto hominid and a yellow BorderedPhoto hominid var hominid = new Hominid(); tag = new TaggedPhoto(hominid, "Shocked!"); Application.Run(tag); Console.WriteLine(tag.ListTaggedPhotos()); }
public static void Demo() { // Application.Run acts as a simple client Photo photo; TaggedPhoto foodTaggedPhoto, colorTaggedPhoto, tag; BorderedPhoto composition; // Compose a photo with two TaggedPhotos and a blue BorderedPhoto photo = new Photo(); Application.Run(photo); foodTaggedPhoto = new TaggedPhoto(photo, "Food"); colorTaggedPhoto = new TaggedPhoto(foodTaggedPhoto, "Yellow"); composition = new BorderedPhoto(colorTaggedPhoto, Color.Blue); Application.Run(composition); Console.WriteLine(colorTaggedPhoto.ListTaggedPhotos()); // Compose a photo with one TaggedPhoto and a yellow BorderedPhoto photo = new Photo(); tag = new TaggedPhoto(photo, "Jug"); composition = new BorderedPhoto(tag, Color.Yellow); Application.Run(composition); }
static void Main() { // Application.Run acts as a simple client Hominid hominid; TaggedPhoto foodTaggedHominid, colorTaggedHominid, tag; BorderedPhoto composition; // Compose a photo with two TaggedPhotos and a blue BorderedPhoto hominid = new Hominid(); Application.Run(hominid); foodTaggedHominid = new TaggedPhoto(hominid, "Hominid 1"); colorTaggedHominid = new TaggedPhoto(foodTaggedHominid, "Blue"); composition = new BorderedPhoto(colorTaggedHominid, Color.Blue); Application.Run(composition); Console.WriteLine(colorTaggedHominid.ListTaggedPhotos()); // Compose a photo with one TaggedPhoto and a yellow BorderedPhoto hominid = new Hominid(); tag = new TaggedPhoto(hominid, "Hominid 2"); composition = new BorderedPhoto(tag, Color.Yellow); Application.Run(composition); Console.WriteLine(tag.ListTaggedPhotos()); }