Exemplo n.º 1
0
        //determines when an assigment is added to the list
        public static async Task NewAssignmentAdded()
        {
            //I have the old list, get a new list and compare sizes
            List <Assignment> refreshedTasks = await StudentInfoHandler.GetTodolist().ConfigureAwait(false);

            List <Assignment> newTasks = new List <Assignment>();

            //if there is a change grab the assignment that was last added to the list

            if (currentList.Count != refreshedTasks.Count)
            {
                foreach (Assignment item in refreshedTasks)
                {
                    if (!currentList.Contains(item))
                    {
                        newTasks.Add(item);
                    }
                }
                isUpdateable = true;
            }

            refreshedList = refreshedTasks;

            if (newTasks.Count != 0)
            {
                NotificationBalloonTips.NewAssignmentPopUp(newTasks);
            }
        }
Exemplo n.º 2
0
        protected async Task TotalSetUp()
        {
            lbl_Name.Content = "Welcome, " + name;
            dateBox.Content  = "Date: " + DateTime.Now.ToString("MMMM dd, yyyy");
            classes          = await StudentInfoHandler.GetCurrentClasses().ConfigureAwait(false);

            totalAssignments = await StudentInfoHandler.GetTodolist().ConfigureAwait(false);
        }
Exemplo n.º 3
0
        public async Task Run()
        {
            studentInfo = new StudentInfoHandler(token);

            await LoadData().ConfigureAwait(false);

            DisplayText();
        }
Exemplo n.º 4
0
        public MainWindow(string token)
        {
            this.Token  = token;
            studentInfo = new StudentInfoHandler(token);

            LoadData().Wait();
            DisplayText();

            InitializeComponent();
        }
Exemplo n.º 5
0
        ////////LOGIC /////////////////////
        #region API Logic
        protected async Task RetrieveData()
        {
            UserName_lbl.Content = "Welcome, " + User;
            Date_lbl.Content     = "Today's Date : " + DateTime.Now.ToString("MMM dd, yyyy");

            currentCoursesJson = await StudentInfoHandler.GetCurrentClasses().ConfigureAwait(false);

            currentAssignmentsJson = await StudentInfoHandler.GetTodolist().ConfigureAwait(false);

            currentEnrollmentsJson = await StudentInfoHandler.GetStudentEnrollment().ConfigureAwait(false);
        }