private void Update()
 {
     ThreadingTools.ExecuteUiThread(() => Panel.Children.Clear());
     CardTitle.DataContext = _group.Title;
     foreach (LimpUser user in _group.Users)
     {
         ThreadingTools.ExecuteUiThread(() => Panel.Children.Add(new StudentSettingsControl(user, _group, _updateParentView)));
     }
 }
 private void Update()
 {
     ThreadingTools.ExecuteUiThread(() => Panel.Children.Clear());
     CardTitle.DataContext = _pack.Title;
     foreach (var problem in _pack.Problems)
     {
         ThreadingTools.ExecuteUiThread(() => Panel.Children.Add(new ProblemSettingsControl(_group, _pack, problem, _updateParentView)));
     }
 }
Example #3
0
        private void GetUserProfileData()
        {
            var studentsData = ProfilePreviewData.GetProfilePreview(_group);

            foreach (var currRes in studentsData)
            {
                ThreadingTools.ExecuteUiThread(() => Panel.Children.Add(new UserResPrewiew(currRes.Username, currRes.Points)));
            }
        }
        public void UpdateUi()
        {
            ThreadingTools.ExecuteUiThread(() => GroupListPanel.Children.Clear());
            List <UserGroup> groups = DataProvider.UserGroupRepository.ReadAll();

            foreach (UserGroup group in groups)
            {
                var preview = new StudentGroupPreview(group.Title, _navigateService);
                ThreadingTools.ExecuteUiThread(() => GroupListPanel.Children.Add(preview));
            }
        }
        public void UpdateUi()
        {
            ThreadingTools.ExecuteUiThread(() => GroupListPanel.Children.Clear());
            List <UserGroup> groups = DataProvider.UserGroupRepository.ReadAll();

            foreach (UserGroup group in groups)
            {
                var settings = new StudentGroupSettings(group, UpdateUi);
                ThreadingTools.ExecuteUiThread(() => GroupListPanel.Children.Add(settings));
            }
        }
Example #6
0
        public void UpdateUi()
        {
            ThreadingTools.ExecuteUiThread(() => PackListPanel.Children.Clear());
            var packs = DataProvider.UserGroupRepository.Read(_group.Title).ProblemsPacks;

            foreach (var pack in packs)
            {
                var settings = new ProblemPackSettings(_group, pack, UpdateUi);
                ThreadingTools.ExecuteUiThread(() => PackListPanel.Children.Add(settings));
            }
        }
        public void UpdateUi()
        {
            ThreadingTools.ExecuteUiThread(() => PackListPanel.Children.Clear());
            var packs = DataProvider.UserGroupRepository.Read(_userGroup.Title).ProblemsPacks;

            foreach (var pack in packs)
            {
                var settings = new ProblemTasksPreview(_userGroup, pack.Title, _navigateService);
                ThreadingTools.ExecuteUiThread(() => PackListPanel.Children.Add(settings));
            }
        }
Example #8
0
        public void Update()
        {
            ThreadingTools.ExecuteUiThread(() => UpdateButton.IsEnabled = false);

            MultiThreadParser.LoadProfiles(_group);

            IEnumerable <ProfilePreviewData> studentsData = ProfilePreviewData.GetProfilePackPreview(_group, PackTitle);

            ThreadingTools.ExecuteUiThread(() => Panel.Children.Clear());

            foreach (var currRes in studentsData)
            {
                ThreadingTools.ExecuteUiThread(() => Panel.Children.Add(new UserResPrewiew(currRes.Username, currRes.Points)));
            }
            ThreadingTools.ExecuteUiThread(() => UpdateButton.IsEnabled = true);
        }
Example #9
0
        private void Update()
        {
            ThreadingTools.ExecuteUiThread(() => UpdateButton.IsEnabled = false);

            MultiThreadParser.LoadProfiles(_group);
            IEnumerable <ProfilePreviewData> studentsData = ProfilePreviewData.GetProfilePreview(_group);

            ThreadingTools.ExecuteUiThread(() => Panel.Children.Clear());
            foreach (var currRes in studentsData)
            {
                ThreadingTools.ExecuteUiThread(() => Panel.Children.Add(new UserResPrewiew(currRes.Username, currRes.Points)));
            }

            //  ThreadingTools.ExecuteUiThread(() => StudentList.ItemsSource = studentsData);
            ThreadingTools.ExecuteUiThread(() => UpdateButton.IsEnabled = true);

            DataProvider.UserGroupRepository.Update(_group);
            //JsonBackupManager.SaveCardUserList(_group, _studentGroupTitle);
        }
Example #10
0
        public ProblemTasksPreview(UserGroup users, string packTitle, IViewNavigateService navigateService)
        {
            _navigateService = navigateService;

            InitializeComponent();


            _group                = users;
            PackTitle             = packTitle;
            CardTitle.DataContext = packTitle;

            if (_group.ProblemsPacks.Capacity != 0)
            {
                var studentsData = ProfilePreviewData.GetProfilePackPreview(_group, packTitle);

                foreach (var currRes in studentsData)
                {
                    ThreadingTools.ExecuteUiThread(() =>
                                                   Panel.Children.Add(new UserResPrewiew(currRes.Username, currRes.Points)));
                }
            }// ThreadingTools.ExecuteUiThread(() => StudentList.ItemsSource = studentsData);
        }