Exemple #1
0
 public UINews_List(News news, long now)
 {
     this.id            = news.id;
     this.categoryicon  = Images.NewsCategoryAsImage(news.category, news.id.ToString(), News.CategoryAsString(news.category));
     this.headline      = news.headline;
     this.speakicon     = (news.showfrom <= now && now <= news.showuntil) ? Images.SPEAK() : Images.EMPTY;
     this.message       = StringUtils.Shorten(news.message, 100);
     this.showfrom      = DateUtils.ConvertToDateString(news.showfrom);
     this.showuntil     = DateUtils.ConvertToDateString(news.showuntil);
     this.editcmdlink   = Images.EDIT();
     this.deletecmdlink = Images.DELETE();
 }