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 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);
        }
Exemplo n.º 4
0
        public static Frame Grading_Due_Date_Frame(long unix_grading_due_date)
        {
            var theme = Structure_Label.Theme_Label("Последний срок сдачи");

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

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

            var inside_View = Structure_StackLayout.Inside_Frame_StackLayout();

            inside_View.Children.Add(theme);
            inside_View.Children.Add(date_label);
            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.º 5
0
        public static Frame Last_Change_Frame(long unixTime)
        {
            var theme = Structure_Label.Theme_Label("Последнее изменение");

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

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

            var inside_View = Structure_StackLayout.Inside_Frame_StackLayout();

            inside_View.Children.Add(theme);
            inside_View.Children.Add(date_label);
            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);
        }