public static Frame File_Ready_For_Upload_Frame(string fileName) { var inside_View = Structure_StackLayout.Inside_Frame_StackLayout(); var inside_File_View = Structure_StackLayout.Inside_Frame_View_Orientation(StackOrientation.Horizontal); //Картинка должна не так но нет времени var file_image = Structure_Image.Fake_File_Type_Image("document_64.png"); inside_File_View.Children.Add(file_image); var file_name_label = Structure_Label.File_Name_Label(fileName); inside_File_View.Children.Add(file_name_label); inside_View.Children.Add(inside_File_View); 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); }
public static Frame Answer_files_frame(List <File> files) { var theme = Structure_Label.Theme_Label("Ответ в виде файла"); var inside_View = Structure_StackLayout.Inside_Frame_StackLayout(); inside_View.Children.Add(theme); foreach (var item in files) { /* * var download_File_Circle = new Download_File_Progress(); * download_File_Circle.WidthRequest = 25; * download_File_Circle.HeightRequest = 25; * * * var URL = item.fileurl + "?&token=" + Variables.token_user; * var download_File = new Download_File(URL, download_File_Circle); */ var file_name_label = Structure_Label.File_Name_Label(item.filename); var file_image = Structure_Image.File_Type_Image(item.mimetype); var inside_File_View = Structure_StackLayout.Inside_Frame_View_Orientation(StackOrientation.Horizontal); var tapGestureRecognizer = new TapGestureRecognizer(); tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandProperty, "downloadSubmissionFile"); var binding = new Binding(); binding.Source = item.fileurl; tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandParameterProperty, binding); inside_File_View.GestureRecognizers.Add(tapGestureRecognizer); inside_File_View.Children.Add(file_image); inside_File_View.Children.Add(file_name_label); /* * inside_File_View.Children.Add(download_File); * inside_File_View.Children.Add(download_File_Circle); */ inside_View.Children.Add(inside_File_View); } 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); }
public static Frame Edit_Comment_On_Grade_Frame( ) { var inside_View = Structure_StackLayout.Inside_Frame_StackLayout(); var theme_And_Image_View = Structure_StackLayout.Inside_Frame_View_Orientation(StackOrientation.Horizontal); var theme = Structure_Label.Theme_Label("Отзыв в виде комментария"); theme_And_Image_View.Children.Add(theme); var image_Go_Edit_Page = Structure_Image.Custom_Image("edit_comment.png", 24, 24, LayoutOptions.EndAndExpand, LayoutOptions.FillAndExpand); theme_And_Image_View.Children.Add(image_Go_Edit_Page); inside_View.Children.Add(theme_And_Image_View); var tapGestureRecognizer = new TapGestureRecognizer(); /* * Решил передавать параметр на новую страницу по другому * var binding = new Binding(); * binding.Source = Grading_Participants.commentLabel.Text; * tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandParameterProperty, binding); */ tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandProperty, "goToEditCommentOnGrade"); image_Go_Edit_Page.GestureRecognizers.Add(tapGestureRecognizer); inside_View.Children.Add(Grading_Participants.commentLabel); 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); }
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); }
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); }
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); }
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); }