public static Message Create(MessageType type, EasyLabel text) { switch (type) { case MessageType.question: { return(new Question(text)); } case MessageType.answer: { return(new Answer()); } case MessageType.notification: { return(new Notification()); } default: { return(null); } } }
public Question(EasyLabel message, Grid current_page, int margin, string email, string name, int qandaid, string education, EasyLabel easylabel = null) : base(message, qandaid, education) { this.IsAnswer = false; this.message = message; this.current_page = current_page; this.some_margin = margin; this.email = email; this.name = name; this.secondEasyLabel = easylabel; message.current_message.Foreground = new SolidColorBrush(Windows.UI.Colors.Blue); }
public static Message Create(MessageType type, EasyLabel text, Grid current_page, int margin, string email, string name, int qandaid, string education, EasyLabel easylabel = null) //current page is the grid the message has to be drawn to { switch (type) //checks the type of message you want and then returns the apropriate object { case MessageType.question: { return(new Question(text, current_page, margin, email, name, qandaid, education, easylabel)); } case MessageType.answer: { return(new Answer(text, current_page, margin, name, qandaid, education)); } case MessageType.notification: { return(new Notification(text, current_page, margin)); } default: { return(null); //if there is no message we dont want an object } } }
public MessageDecorator(EasyLabel message, int qandaid, string education) { this.message = message; this.qandaid = qandaid; this.education = education; }
public Question(EasyLabel message) : base(message) { this.IsAnswer = false; this.message = message; }
public MessageDecorator(EasyLabel message) { this.message = message; }