Exemple #1
0
        /// <summary>
        /// Adds a new news entry to the list of news.
        /// </summary>
        /// <param name="authorName"></param>
        /// <param name="datePosted"></param>
        /// <param name="content"></param>
        /// <param name="colorCode"></param>
        public void AddNewsEntry(string authorName, string datePosted, string content, string colorCode)
        {
            NewsEntry ne = new NewsEntry();

            ne.Author    = authorName;
            ne.Content   = content;
            ne.Date      = datePosted;
            ne.ColorCode = colorCode;
            if (_newsEntries == null)
            {
                _newsEntries = new List <NewsEntry>();
            }
            _newsEntries.Add(ne);
            _newsEntries.Sort();
            Save();
        }
Exemple #2
0
 /// <summary>
 /// Adds a new news entry to the list of news.
 /// </summary>
 /// <param name="authorName"></param>
 /// <param name="datePosted"></param>
 /// <param name="content"></param>
 /// <param name="colorCode"></param>
 public void AddNewsEntry(string authorName, string datePosted, string content, string colorCode)
 {
     NewsEntry ne = new NewsEntry();
     ne.Author = authorName;
     ne.Content = content;
     ne.Date = datePosted;
     ne.ColorCode = colorCode;
     if (_newsEntries == null)
         _newsEntries = new List<NewsEntry>();
     _newsEntries.Add(ne);
     _newsEntries.Sort();
     Save();
 }