public ModelProfileMessage MakeModelProfileMessage(Service.Profile profile, string mes) { DataProvider dp = new DataProvider(); ModelProfileMessage modelProfile = new ModelProfileMessage(); modelProfile.Name = profile.Name; modelProfile.Image = dp.GetImageFromByte(profile.MainImage); modelProfile.ID = profile.ID; modelProfile.Login = profile.Login; modelProfile.status = profile.status; modelProfile.message = mes; return(modelProfile); }
public messagefriends() { this.Title = "Заявки в друзья"; string data1 = Environment.CurrentDirectory + "\\Content\\maets.cur"; var cursor = new Cursor(data1); this.Cursor = cursor; InitializeComponent(); foreach (Service.UserMessage person in ShopWindows.frmail) { who = ShopWindows.client.CheckProfile(person.IDSender); whom = whom.MakeModelProfileMessage(who, person.message); mail.Add(whom); } Lvfriendnew.ItemsSource = mail; }