From 2b387fb5626a57e3a6473eed66816df80152cd49 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 10 Mar 2012 22:14:25 +0400 Subject: refactoring, tags --- Juick/ViewModels/MessageViewModel.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'Juick/ViewModels/MessageViewModel.cs') diff --git a/Juick/ViewModels/MessageViewModel.cs b/Juick/ViewModels/MessageViewModel.cs index 3a324c4..e120c5d 100644 --- a/Juick/ViewModels/MessageViewModel.cs +++ b/Juick/ViewModels/MessageViewModel.cs @@ -2,6 +2,7 @@ using System.ComponentModel; using System.Net; using System.Windows.Media.Imaging; +using System.Linq; using Juick.Api; namespace Juick.ViewModels @@ -19,10 +20,15 @@ namespace Juick.ViewModels RID = message.Rid; Username = message.User.UName; MessageText = HttpUtility.HtmlDecode(message.Body); + + if (message.Tags != null) + { + MessageText = string.Join(", ", message.Tags) + Environment.NewLine + MessageText; + } } private int _mid; /// - /// Sample ViewModel property; this property is used in the view to display its value using a Binding. + /// Sample _viewModelBase property; this property is used in the view to display its value using a Binding. /// /// public int MID @@ -43,7 +49,7 @@ namespace Juick.ViewModels private int _rid; /// - /// Sample ViewModel property; this property is used in the view to display its value using a Binding. + /// Sample _viewModelBase property; this property is used in the view to display its value using a Binding. /// /// public int RID @@ -63,7 +69,7 @@ namespace Juick.ViewModels } private string _username; /// - /// Sample ViewModel property; this property is used in the view to display its value using a Binding. + /// Sample _viewModelBase property; this property is used in the view to display its value using a Binding. /// /// public string Username @@ -112,7 +118,7 @@ namespace Juick.ViewModels private string _messageText; /// - /// Sample ViewModel property; this property is used in the view to display its value using a Binding. + /// Sample _viewModelBase property; this property is used in the view to display its value using a Binding. /// /// public string MessageText @@ -133,7 +139,7 @@ namespace Juick.ViewModels private string _status; /// - /// Sample ViewModel property; this property is used in the view to display its value using a Binding. + /// Sample _viewModelBase property; this property is used in the view to display its value using a Binding. /// /// public string Status -- cgit v1.2.3