public StudentGroupPreview(string studentGroupTitle, IViewNavigateService navigateService) { _navigateService = navigateService; InitializeComponent(); _studentGroupTitle = studentGroupTitle; CardTitle.DataContext = _studentGroupTitle; _group = DataProvider.UserGroupRepository.Read(studentGroupTitle); // TODO: Remove? if (_group == null) { _group = new UserGroup(studentGroupTitle) { ProblemsPacks = new List <ProblemsPack> { //new ProblemPackInfo("A", TaskPackStorage.TasksAGroup), //new ProblemPackInfo("B", TaskPackStorage.TasksBGroup) } }; DataProvider.UserGroupRepository.Create(_group); } Task.Run(() => GetUserProfileData()); //ThreadingTools.ExecuteUiThread(() => StudentList.ItemsSource = studentsData); //StudentList.SelectionChanged += LimpUserStatistic; }
public ProblemPackWindow(string packTitle, UserGroup group, IViewNavigateService navigateService) { _navigateService = navigateService; Group = group; PackTitle = packTitle; InitializeComponent(); Panel.Children.Add(new ProblemTaskPreview(this, "A")); }
public StudentPackBlockPreview(UserGroup userGroup, IViewNavigateService navigateService) { _navigateService = navigateService; InitializeComponent(); _userGroup = userGroup; foreach (ProblemsPack pack in userGroup.ProblemsPacks) { var taskPreview = new ProblemTasksPreview(_userGroup, pack.Title, _navigateService); PackListPanel.Children.Add(taskPreview); PanelViewer.ScrollToRightEnd(); } }
public NavigateButton(string viewName, IViewNavigateService navigateService, UserControl block) { InitializeComponent(); if (block is ResultGridBlock) { //TODO: Omg icon.Source = new ImageSourceConverter().ConvertFromString( "pack://application:,,,/LimpStats.Client;component/icons/iconTable-03.png") as ImageSource; } _navigateService = navigateService; CurrentControl = block; OpenViewButton.DataContext = viewName; }
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); }
public StudentGroupBlockPreview(IViewNavigateService navigateService) { _navigateService = navigateService; InitializeComponent(); UpdateUi(); }