コード例 #1
0
        /// <summary>
        /// Generates a list containing Grids with message info.
        /// </summary>
        /// <param name="maxWidth">passed to CreateMessagePanel to calculate height with</param>
        /// <returns>a list with all the messages in a grid</returns>
        private List <Grid> CreateMessagePanels(double maxWidth)
        {
            var list = new List <Grid>();

            // Adding all items to the list by creating grid for them.
            _messageController.GetOffenceSocialMediaMessages((wpfDelict.DataContext as Offence).ID).ForEach(m => list.AddRange(CreateMessagePanel(m, maxWidth)));
            return(list);
        }
コード例 #2
0
 /// <summary>
 /// This method creates a single string from all elements within the list of found SocialMediaItems
 /// </summary>
 /// <param name="offence"></param>
 /// <returns>string</returns>
 public void DisplayMessages(Offence offence, ListView wpfLVMessages, int mediatype = 0)
 {
     wpfLVMessages.ItemsSource = _controller.GetOffenceSocialMediaMessages(offence.ID, mediatype);
 }