private async void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            var news = await NewsService.DetailAsync(id);

            B.Content = news.Id;
            T.Text    = news.Title;
            var detail = news.Content;
            var cc     = await news.CommentsAsync();

            detail = string.Join(Environment.NewLine, from temp in cc select temp.Content);

            // var detail =
            //    "@赤狐(zcm123)<br/>@叶鹏<br/><fieldset class=\"comment_quote\"><legend>引用</legend>300000000元都能花了,那为何ui设计的还不如3000元网站,细节啊。</fieldset><br/>3k求源码。";

            //    +"<select>" +
            //    "<option>a</option>" +
            //    "<option>b</option>" +
            //    "<option>b</option>" +
            //    "<option>b</option>" +
            //    "<option>b</option>" +
            //    "</select>" +
            //    "ffffffffffffffff<b>wwwwwwwwwwww</b>";

            HtmlRenderHelper.SetHtml(R, news.Content);


            id = news.PrevNews.Value;
        }
示例#2
0
 public BaseCRUDController(DataAccessContext context)
 {
     _context           = context;
     htmlRenderHelper   = new HtmlRenderHelper(_context);
     imageDataContext   = new DataContext <Image>(_context);
     fileUploadService  = new FileUploadService(_context, imageDataContext);
     dataContext        = new DataContext <T>(_context);
     commentDataContext = new DataContext <Comment>(_context);
     historyHtmlBuilder = new HistoryHtmlBuilder(_context);
 }
 public HomeController(DataAccessContext context)
 {
     _context = context;
     htmlRenderHelper = new HtmlRenderHelper(_context);
     dataContext = new DataContext<House>(_context);
     houseSettingsDataContext = new DataContext<HouseSettings>(_context);
     messageDataContext = new DataContext<Message>(_context);
     houseStatusDataContext = new DataContext<HouseStatus>(_context);
     historyHtmlBuilder = new HistoryHtmlBuilder(_context);
 }