/// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IDataService dataService)
        {
            _dataService = dataService;
            _dataService.GetData(
                (item, error) =>
                {
                    if (error != null)
                    {
                        // Report error here
                        return;
                    }

                    WelcomeTitle = item.Title;
                });

            _dataService.GetDefaultMailMessage(
                (item, error) =>
                {
                    if (error != null)
                    {
                        // Report error here
                        return;
                    }

                    MainMailMessage = item;
                });

            SendMainCommand = new RelayCommand(OnSendMail);
            AboutMeCommand = new RelayCommand(OnAboutMe);
        }
 public void GetDefaultMailMessage(Action<MailMessage, Exception> callback)
 {
     var msg = new MailMessage();
     msg.ToAddress = "*****@*****.**";
     msg.FromAddress = "*****@*****.**";
     msg.Body = "Wow, is this going to work?";
     if (callback != null) callback(msg, null);
 }
        public void SubmitMessage(MailMessage message)
        {
            var msgStr = string.Format("{0}A mew EMail: {0}To: {1}{0} From:{2}{0} Subject:{3}{0} Body:{4}",
                Environment.NewLine, message.ToAddress, message.FromAddress, message.Subject, message.Body);

            Console.WriteLine(msgStr);
            Trace.WriteLine(msgStr);
        }