Exemplo n.º 1
0
        public static Frame Grader_Frame(Users graderInf, double timeGrading)
        {
            var theme = Structure_Label.Theme_Label("Оценено");

            var grader = Structure_Label.Theme_Label(
                graderInf.fullname);

            var text_Date = Function.Text_Unix_Time_In_Date_Time(
                timeGrading, "d MMMM yyyy г., HH:mm");

            var time_grade = Structure_Label.Custom_Label(
                text_Date, Color.Gray, 16);

            var profile_image = Structure_Image.Image_Profile(graderInf.profileimageurl);

            var vertical_stack = Structure_StackLayout.Inside_Frame_View_Orientation(
                StackOrientation.Vertical);

            vertical_stack.Children.Add(grader);
            vertical_stack.Children.Add(time_grade);

            var horizontal_stack = Structure_StackLayout.Inside_Frame_View_Orientation(
                StackOrientation.Horizontal);

            horizontal_stack.Children.Add(profile_image);
            horizontal_stack.Children.Add(vertical_stack);

            var inside_View = Structure_StackLayout.Inside_Frame_StackLayout();

            inside_View.Children.Add(theme);
            inside_View.Children.Add(horizontal_stack);

            var inside_Frame = Inside_Frame(inside_View);

            var view = Structure_StackLayout.View_Frame();

            view.Children.Add(inside_Frame);

            var view_Frame = View_Frame(view);

            return(view_Frame);
        }
Exemplo n.º 2
0
        public static Frame List_Submissions_Information_Frame(Mod_assign_list_participants participant)
        {
            Function.Check_Answer_Status_For_List(participant.submitted, participant.requiregrading);

            var insideView = Structure_StackLayout.Inside_Frame_View_Orientation(StackOrientation.Horizontal);;

            var tapGestureRecognizer = new TapGestureRecognizer();

            tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandProperty, "goToGradingParticipantsPage");
            var binding = new Binding();

            binding.Source = participant.id;
            tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandParameterProperty, binding);
            insideView.GestureRecognizers.Add(tapGestureRecognizer);

            var participantsView = Structure_StackLayout.Inside_Frame_StackLayout();

            var profile_image = Structure_Image.Image_Profile(participant.profileimageurl);

            var fullName = Structure_Label.Custom_Label(participant.fullname, Color.Black, 18);

            var sumbission_status_label = Structure_Label.Response_Status_Frame_Label(
                Variables.submission_status, Variables.submission_color);

            participantsView.Children.Add(fullName);
            participantsView.Children.Add(sumbission_status_label);

            insideView.Children.Add(profile_image);
            insideView.Children.Add(participantsView);

            var inside_Frame = Inside_Frame(insideView);

            var view = Structure_StackLayout.View_Frame();

            view.Children.Add(inside_Frame);

            var view_Frame = View_Frame(view);

            return(view_Frame);
        }
Exemplo n.º 3
0
        public static Frame Comment_on_the_answer_frame(Comment comment)
        {
            var inside_View = Structure_StackLayout.Inside_Frame_StackLayout();

            var commentatorView = Structure_StackLayout.Inside_Frame_View_Orientation(StackOrientation.Horizontal);

            var urlImage      = Function.Take_Image_Url_From_String(comment.avatar);
            var profile_image = Structure_Image.Image_Profile(urlImage);

            commentatorView.Children.Add(profile_image);

            var commentatorInfoView = Structure_StackLayout.Inside_Frame_StackLayout();

            var nameOfСommentator = Structure_Label.Theme_Label(comment.fullname);

            commentatorInfoView.Children.Add(nameOfСommentator);

            var textDate = Function.Text_Unix_Time_In_Date_Time(
                comment.timecreated, "d MMMM yyyy г., HH:mm");
            var dateOfComment = Structure_Label.Description_Label(textDate);

            commentatorInfoView.Children.Add(dateOfComment);

            commentatorView.Children.Add(commentatorInfoView);

            var commentText = Structure_Label.Tag_Label(comment.content, Color.Black, 18);

            inside_View.Children.Add(commentatorView);
            inside_View.Children.Add(commentText);

            var inside_Frame = Inside_Frame(inside_View);

            var view = Structure_StackLayout.View_Frame();

            view.Children.Add(inside_Frame);

            var view_Frame = View_Frame(view);

            return(view_Frame);
        }
Exemplo n.º 4
0
        public static Frame Participants_Information_Frame(string submissionStatus, string gradingStatus,
                                                           string imageURL, string fullname)
        {
            Function.Submission_Color(
                submissionStatus,
                Variables.submissionInfo.lastattempt.submissionsenabled);
            Function.Grading_Color(gradingStatus);

            var insideView = Structure_StackLayout.Inside_Frame_View_Orientation(StackOrientation.Horizontal);

            var participantsView = Structure_StackLayout.Inside_Frame_StackLayout();

            var profile_image = Structure_Image.Image_Profile(imageURL);

            var fullName = Structure_Label.Custom_Label(fullname, Color.Black, 18);

            var sumbission_status_label = Structure_Label.Response_Status_Frame_Label(
                Variables.submission_status, Variables.submission_color);

            var grading_status_label = Structure_Label.Response_Status_Frame_Label(
                Variables.grading_status, Variables.grading_color);

            participantsView.Children.Add(fullName);
            participantsView.Children.Add(sumbission_status_label);
            participantsView.Children.Add(grading_status_label);

            insideView.Children.Add(profile_image);
            insideView.Children.Add(participantsView);

            var inside_Frame = Inside_Frame(insideView);

            var view = Structure_StackLayout.View_Frame();

            view.Children.Add(inside_Frame);

            var view_Frame = View_Frame(view);

            return(view_Frame);
        }