Esempio n. 1
0
        void lstUsedColors_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (lstUsedColors.SelectedItem != null)
            {
                HubColor        item  = (HubColor)lstUsedColors.SelectedItem;
                SolidColorBrush brush = new SolidColorBrush(item.Color);



                if (optBrushColor.IsChecked == true)
                {
                    drawCanvas.BrushColor           = item.Color;
                    optBrushColor.Background        = brush;
                    optBrushColor.BackgroundChecked = brush;
                    optBrushColor.BorderBrush       = brush;
                    VM.Message("Brush Color Changed", false);
                }
                else if (optBackColor.IsChecked == true)
                {
                    drawCanvas.Background          = brush;;
                    optBackColor.Background        = brush;
                    optBackColor.BackgroundChecked = brush;
                    optBackColor.BorderBrush       = brush;
                    VM.Message("Background Color Changed", false);
                }
            }
        }
Esempio n. 2
0
 public Comment(string Author, string Content, HubColor Color)
 {
     this.ThreadId = ThreadId;
     this.Author   = Author;
     this.Content  = Content;
     this.Color    = Color;
 }
Esempio n. 3
0
 public Board(int Id, string Title, string Desc, HubColor Color)
 {
     this.Id    = Id;
     this.Title = Title;
     this.Desc  = Desc;
     this.Color = Color;
 }
Esempio n. 4
0
        public ActionResult Reply(int id, string comment, HubColor color)
        {
            if (User.IsInRole("Banned"))
            {
                return(HttpNotFound());// banned users can't post replies.
            }
            Thread thread = db.Threads.Find(id);

            if (thread == null)
            {
                System.Diagnostics.Debug.WriteLine("nulled");
                return(HttpNotFound());
            }
            thread.AddComment(db, new Models.Hub.Comment(User.Identity.Name, comment, color));
            TempData["thread"] = thread.Id;
            return(RedirectToAction("Details"));
        }