public MessageDto GetMessage(MessageTyp messageTyp) { switch (messageTyp) { case MessageTyp.AboutPage: { return(new MessageDto() { Message = "Your application description page." }); } case MessageTyp.ContactPage: { var messageDto = new MessageDto(); messageDto.Message = "Your contact page."; //TODO Object Initializer return(messageDto); } case MessageTyp.IndexPage: { var messageDto = new MessageDto(); messageDto.Message = "Welcome!"; return(messageDto); } } var x = GetMessage(messageTyp); return(new MessageDto() { Message = "Lorem ipsum dolor sit amet." }); }
public MessageBoxWindow(MessageTyp typ, string message) { this.InitializeComponent(); #if DEBUG this.AttachDevTools(); #endif this.Title = typ.ToString(); var textBox = this.Get <TextBlock>("textBox"); textBox.Text = message; }