Esempio n. 1
0
 protected void OnBuzzwordCreated(BuzzyGo.Events.Buzz.BuzzwordCreated e)
 {
     BuzzID = e.BuzzID;
     BuzzwordName = e.BuzzwordName;
     Category = e.Category;
     CreateDate = e.DateCreated;
 }
Esempio n. 2
0
        public ActionResult Create(BuzzyGo.Model.Card.CreateCardViewModel theCard)
        {
            CardBuzzWord[] words = null;
            String wordList = ControllerContext.HttpContext.Request["wordlist"];
            if (!String.IsNullOrWhiteSpace(wordList))
            {
                words = JsonConvert.DeserializeObject<CardBuzzWord[]>(wordList);
            }

            BuzzyGo.Repository.UniqueID.UniqueID uid = GetNewUniqueID();

            BuzzyGo.Web.Utility.CloudHelper.EnqueueCommand(new BuzzyGo.Commands.Card.CreateCard()
            {
                CardID = uid.SequenceID,
                ID = uid.UniqueIdentifier,
                Name = theCard.CardHeader.Name,
                Purpose = theCard.CardHeader.Purpose,
                Words = words
            });

            CloudHelper.LogMessage(0, String.Format("User created a new card {0} (id {1})", theCard.CardHeader.Name, uid.SequenceID.ToString()), "CREATE CARD");

            return RedirectToAction("Index", "Home");
        }
Esempio n. 3
0
        private static void WriteLogToStorage(string myMessage, BuzzyGo.Commands.Logging.LogCommand theLog)
        {
            Trace.TraceInformation("Message text {0}, sent {1} from user {2} on queue id {3}",
                theLog.Message,
                theLog.LogTime.ToString(),
                theLog.UserID.ToString(),
                myMessage);

            BuzzyGo.Repository.Logging.LogEntry log = new BuzzyGo.Repository.Logging.LogEntry(theLog.UserID)
            {
                LogDate = theLog.LogTime,
                Message = theLog.Message,
                MessageType = theLog.MessageType
            };

            BuzzyGo.Repository.Logging.LogEntryDataSource data = new BuzzyGo.Repository.Logging.LogEntryDataSource();
            data.AddLogEntry(log);
        }
Esempio n. 4
0
 protected void OnSquareMarked(BuzzyGo.Events.Card.SquareMarked e)
 {
     CardID = e.CardID;
 }
Esempio n. 5
0
 protected void onCardMarkedAsWinner(BuzzyGo.Events.Card.CardMarkedAsWinner e)
 {
 }
Esempio n. 6
0
 protected void OnCardDeleted(BuzzyGo.Events.Card.CardDeleted e)
 {
 }
Esempio n. 7
0
 protected void OnCardCreated(BuzzyGo.Events.Card.CardCreated e)
 {
     CardID = e.CardID;
     Name = e.Name;
     Purpose = e.Purpose;
     DateCreated = e.DateCreated;
     Squares = e.Squares;
 }