Example #1
0
        private void AddEvent()
        {
            Console.WriteLine("What type of vent to you wish to add?\n" +
                              "1. Golf\n" +
                              "2. Bowling\n" +
                              "3. Amusment Park\n" +
                              "4. Concert");

            string eventInput  = Console.ReadLine();
            int    outingParse = int.Parse(eventInput);

            EventClass.EventType eventType = (EventClass.EventType)Enum.ToObject(typeof(EventClass.EventType), outingParse);


            Console.WriteLine("Enter the name of the outting.");
            string eventName = Console.ReadLine();

            Console.WriteLine("How many people are attending?");
            int peopleAttending = int.Parse(Console.ReadLine());

            Console.WriteLine("When is the event? Format: YYYY, MM, DD");
            DateTime dateOnly  = DateTime.Parse(Console.ReadLine());
            DateTime dateEntry = dateOnly.Date;

            Console.WriteLine("What is the cost per person?");
            decimal costPerPerson = decimal.Parse(Console.ReadLine());

            EventClass newEvent = new EventClass(eventName, peopleAttending, costPerPerson, dateOnly, eventType);

            _eventRepo.CreateNewEvent(newEvent);
        }
Example #2
0
 public void LogEvent(EventConfig config, string title, string content, EventClass.EventType type, Color color)
 {
     EventQueue.Add(new EventClass(config.GuildId, config, title, content, type, color));
 }