예제 #1
0
        //make different objects for each type, be able to access all
        async public void getEventsInCalendar(GlobalData gd, int CalendarID)                     //gets all events for a specific calendar
        {
            events = await(ServerHandeler.getCalendar(gd));

            /*events = new ObservableCollection<EventObject>();        //instantiates events ObservableCollection that will notify when events are added, removed, and refreshed
             *
             * //HARD-CODED, WILL CHANGE
             *
             * events.Add(new EventObject { name = "AppearOnAll", eventID = events.Count, userid = 1, startDate= todayWithTime, endDate= todayWithTime, AdditionalInfo = "HELLO I AM ADDITIONAL INFO WHO ARE YOU" });     //adds the first event to the page
             * if(CalendarID == 0)                                 //adds the following events to the View Calendar page
             * {
             *  events.Add(new EventObject { name = "Party", eventID = events.Count, userid = 0, startDate = todayWithTime, endDate = todayWithTime, AdditionalInfo = "haha. connor throwing a party." });     //adds the  event to the View Calendar page
             * }
             * if(CalendarID == 1)                                                            //adds the following options to the New Event page
             * {
             *  events.Add(new EventObject { name = "Schedule New Guests", eventID = events.Count, userid = 1, startDate = todayWithTime, endDate = todayWithTime, AdditionalInfo = "" });        //adds the Schedule New Guests to the New Event page
             *  events.Add(new EventObject { name = "Schedule Chore", eventID = events.Count, userid = 1, startDate = todayWithTime, endDate = todayWithTime, AdditionalInfo = "" });             //adds the Schedule Chore to the New Event page
             *  events.Add(new EventObject { name = "Reserve Laundry Machines", eventID = events.Count, userid = 0, startDate = todayWithTime, endDate = todayWithTime, AdditionalInfo = "" });   //adds the Reserve Laundry Machines to the New Event page
             *  events.Add(new EventObject { name = "Reserve Quiet Time", eventID = events.Count, userid = 1, startDate = todayWithTime, endDate = todayWithTime, AdditionalInfo = "" });         //adds the Reserve Quiet Time to the New Event page
             * }*/
        }
예제 #2
0
 public async Task refreshUser(int ID)
 {
     currentUser = await(ServerHandeler.getUserInfo(ID));
     await(refreshApartment());
 }
예제 #3
0
        /// <summary>
        /// Fills the Message with the necessary data.
        /// </summary>
        /// <param name="apartmentID"></param>
        async public Task getItemsInMessage(GlobalData gd)
        {
            messages = new List <MessageObject>();

            messages = await(ServerHandeler.getMessages(gd));
        }