Esempio n. 1
0
 /// <summary>
 /// Change the color theme used on the canvas
 /// </summary>
 public void SetTheme(CommentTheme theme)
 {
     RemoveFromClassList("theme-" + this.theme);
     AddToClassList("theme-" + theme);
     this.theme   = theme;
     Target.Theme = theme;
 }
Esempio n. 2
0
        public ActionResult Comment(CommentTheme commentModel)
        {
            var theme   = _dal.Get <Theme>(commentModel.ThemeId);
            var comment = new Comment
            {
                Text    = commentModel.Text,
                Opinion = commentModel.Opinion
            };

            R.Commented(_identity.Author, theme, comment);
            _dal.Attach(comment);

            return(RedirectToAction("Index", new { themeId = theme.Id }));
        }