Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }