Exemplo n.º 1
0
        public EditProfilePage(User currentUser)
        {
            Title     = AppResources.EditProfile;
            Model     = currentUser;
            ImagePath = null;
            if (!string.IsNullOrEmpty(Model.ProfileImagePath))
            {
                ImageData imageData = AppModel.Instance.Images.Items.Find(temp => temp.ServerPath.Equals(Model.ProfileImagePath));
                ImagePath = imageData != null ? imageData.ImagePath : null;
            }

            CreateUserData data = new CreateUserData
            {
                Name         = currentUser.Name,
                Email        = currentUser.Email,
                Password     = null,
                UserType     = currentUser.Id,
                Job          = currentUser.Job,
                Phone        = currentUser.Phone,
                ProfileImage = ImagePath
            };
            FillUserDataView fillData = new FillUserDataView(data, AppResources.SaveProfileButton, false);

            fillData.Apply += OnSaveUserProfile;
            var layout = new ContentView {
                Content = fillData, Padding = new Thickness(0, 10, 0, 0)
            };

            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, false, true);

            //Content = new ScrollView { Content = layout };
            //Content = new ScrollView { Content = bgLayout };

            Content = bgLayout;
        }
Exemplo n.º 2
0
        public SignUpView() : base()
        {
            Title = AppResources.LoginCreateUser;
            NavigationPage.SetHasNavigationBar(this, false);
            BackgroundColor = AppResources.SignUpBgColor;


            var layout = new StackLayout {
                Padding = new Thickness(0, 20, 0, 0)
            };

            //layout.Children.Add (new Image { Source = ImageLoader.Instance.GetImage(AppResources.SignUpHeaderImage, false) });

            FillUserDataView fillDataView = new FillUserDataView(new CreateUserData(), AppResources.LoginCreateUser, true);

            fillDataView.Apply += OnApplyData;
            layout.Children.Add(fillDataView);

            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, false, true);

            //Content = new ScrollView {Content = bgLayout };
            Content = new ContentView {
                Content = bgLayout
            };
        }
Exemplo n.º 3
0
        public ProfileContentView(Parameters parameters)
        {
            Model = parameters.UserModel;
            var layout = new StackLayout {
                VerticalOptions = LayoutOptions.FillAndExpand
            };
            var userHeaderView = new UserHeaderView(Model, false);

            if (parameters.OnSaveChanges != null)
            {
                userHeaderView.EditUserProfile += parameters.OnSaveChanges;
            }

            layout.Children.Add(userHeaderView);

            var badgeView = new BadgeGridView(Model);

            layout.Children.Add(badgeView);

            /*
             *          if (parameters.IsBtnEnabled)
             *          {
             *                  var historyView = new ProfileHistoryView (AppModel.Instance.CurrentContactListWrapper);
             *                  layout.Children.Add (historyView);
             *          }
             */

            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, true, true);

            // Content = new ScrollView { Content = layout, BackgroundColor = AppResources.UserBackgroundColor };
            //Content = new ScrollView { Content = bgLayout };
            Content = new ContentView {
                Content = bgLayout
            };
        }
Exemplo n.º 4
0
        public FavoriteEventsPage() : base()
        {
            Title           = AppResources.FavoriteEvents.ToUpper();
            BackgroundColor = AppResources.AgendaPageBackgroundColor;
            GetItemSource();


            _wrapper          = new FavoriteEventListWrapper();
            _favEventListView = new ListView
            {
                HasUnevenRows          = true,
                IsGroupingEnabled      = true,
                GroupHeaderTemplate    = new DataTemplate(typeof(EventGroupItem)),
                BackgroundColor        = Color.Transparent,
                SeparatorVisibility    = SeparatorVisibility.None,
                ItemTemplate           = new DataTemplate(typeof(EventCell)),
                RefreshCommand         = _wrapper.RefreshCommand,
                IsPullToRefreshEnabled = false,
                ItemsSource            = FavEventListWrapper,
                //ItemsSource = FavEventList,
                BindingContext = _wrapper
            };


            _favEventListView.SetBinding <EventListWrapper>(ListView.IsRefreshingProperty, vm => vm.IsBusy, BindingMode.OneWay);
            _favEventListView.ItemSelected += OnItemSelected;

            var pageLayout = new StackLayout
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                Orientation       = StackOrientation.Vertical
            };

            var infoBox = new Label
            {
                HeightRequest   = 40,
                TextColor       = Color.White,
                Text            = "Monte sua programação selecionando eventos favoritos.",
                FontSize        = 12,
                BackgroundColor = AppResources.MenuColor
            };


            if (FavEventListWrapper.Count < 1)
            {
                pageLayout.Children.Add(infoBox);
            }


            pageLayout.Children.Add(_favEventListView);
            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, pageLayout, true, true);

            Content = bgLayout;

            /*
             * if (AppModel.Instance.CurrentUser != null)
             *  UserController.Instance.DownloadFavouriteEvents();
             *///*//
        }
Exemplo n.º 5
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            /*
             *          var searchBarView = new SearchBarView ();
             *          searchBarView.Clear += OnSearchClear;
             *          searchBarView.Search += OnSearch;
             */

            _listWrapper = new ExhibitorsListWrapper();

            ExhibitorsWrapper = AppModel.Instance.ExhibitorsWrapper;

            /*
             * if (ExhibitorsWrapper == null)
             * {
             *  AppModel.Instance.SponsorTypes.UpdateData(LocalData.getLocalSponsorList());
             *  AppModel.Instance.Exhibitors.UpdateData(LocalData.getLocalExhibitorList());
             *  ExhibitorsWrapper = new ExhibitorsDataWrapper(AppModel.Instance.SponsorTypes, AppModel.Instance.Exhibitors, false);
             * }*/
            _groupListView = new ListView {
                HasUnevenRows       = false,
                RowHeight           = 60,
                IsGroupingEnabled   = true,
                GroupHeaderTemplate = new DataTemplate(typeof(ExhibitorGroupItem)),
                SeparatorVisibility = SeparatorVisibility.None,
                ItemTemplate        = new DataTemplate(typeof(ExhibitorViewCell)),

                RefreshCommand         = _listWrapper.RefreshCommand,
                IsPullToRefreshEnabled = true,
                ItemsSource            = ExhibitorsWrapper,
                BindingContext         = _listWrapper
            };
            _groupListView.SetBinding <ExhibitorsListWrapper> (ListView.IsRefreshingProperty, vm => vm.IsBusy, BindingMode.OneWay);

            var layout = new StackLayout
            {
                Padding  = new Thickness(20),
                Children = { _groupListView }
                //Children = {searchBarView, _groupListView}
            };

            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, false, true);

            Content = bgLayout;

            _groupListView.BeginRefresh();



            _groupListView.BeginRefresh();
        }
Exemplo n.º 6
0
        public WallPage()
        {
            Title           = AppResources.Wall;
            BackgroundColor = AppResources.WallPageBackgroundColor;

            var wrapper = new WallListWrapper();

            _wallPostListView = new ListView {
                HasUnevenRows          = true,
                ItemTemplate           = new DataTemplate(typeof(WallPostCell)),
                SeparatorVisibility    = SeparatorVisibility.None,
                BackgroundColor        = Color.Transparent,
                RefreshCommand         = wrapper.RefreshCommand,
                IsPullToRefreshEnabled = true,
                ItemsSource            = AppModel.Instance.WallPostsWrapper,
                BindingContext         = wrapper
            };

            _wallPostListView.SetBinding <WallListWrapper> (ListView.IsRefreshingProperty, vm => vm.IsBusy, BindingMode.OneWay);

            var listContent = new ContentView {
                Content       = _wallPostListView,
                Padding       = new Thickness(Border, Border, Border, 0),
                HeightRequest = AppProvider.Screen.Height
            };

            Button postButton = new Button {
                BackgroundColor = AppResources.MenuColor,
                WidthRequest    = AppProvider.Screen.Width,
                Text            = AppResources.PostOnWall,
                TextColor       = Color.White,
                BorderRadius    = 0
            };

            postButton.Clicked += OnPostClicked;

            var layout = new StackLayout()
            {
                Orientation = StackOrientation.Vertical,
                Children    = { listContent, postButton }
            };

            BGLayoutView bgLayout = new BGLayoutView(AppResources.InteractBgImage, layout, true, true);

            //Content = new ScrollView {Content = bgLayout };
            Content = new ContentView {
                Content = bgLayout
            };


            Content = bgLayout;
        }
Exemplo n.º 7
0
        public EventActionsView(UserEventActionsModel model)
        {
            Model = model;
            Title = AppResources.EventsActionHeader;

            /*
             * var topItemLayout = new StackLayout { Padding = new Thickness (0, 5, 0, 5), BackgroundColor = AppResources.SpeecherBgColor};
             *          topItemLayout.Children.Add (GetBoxWithHeader (AppResources.EventsActionHeader, 25, 17));
             */


            var layout = new StackLayout {
                BackgroundColor = AppResources.SpeecherBgColor
            };

            //layout.Children.Add (topItemLayout);

            AddLikedItemView(Model.Items[0], layout);
            AddLikedItemView(Model.Items[1], layout);

            layout.Children.Add(new ContentView {
                Content = new Label {
                    Text      = AppResources.Speakers,
                    FontSize  = 20,
                    TextColor = AppResources.EventActionsTextColor
                },
                Padding = new Thickness(40, 10, 0, 0)
            });
            layout.Children.Add(GetSeparator(new Thickness(0, 8, 0, 0)));

            for (int i = 2; i < Model.Items.Count; i++)
            {
                AddLikedItemView(Model.Items[i], layout);
            }

            layout.Children.Add(CreateQuestionsBlock());

            //BGLayoutView bgLayout = new BGLayoutView(AppResources.InteractBgImage, layout, true, true);
            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, true, true);

            //Content = new ScrollView {Content = bgLayout };
            Content = new ContentView {
                Content = bgLayout
            };

            UserController.Instance.UpdateEventUserVotes(Model);
        }
Exemplo n.º 8
0
        public RatingPage()
        {
            Model = new RatingListModel();
            Model.ItemsChanged += OnItemsChanged;

            BackgroundColor = Color.Transparent;

            Title = AppResources.ProfileRatingBtnHeader;

            var wrapper = new RatingListWrapper(Model);

            _listView = new ListView {
                HasUnevenRows       = false,
                RowHeight           = 60,
                ItemTemplate        = new DataTemplate(typeof(RatingUserCell)),
                SeparatorVisibility = SeparatorVisibility.None,
                BackgroundColor     = Color.Transparent,
                ItemsSource         = Model.Items,

                RefreshCommand         = wrapper.RefreshCommand,
                IsPullToRefreshEnabled = true,
                BindingContext         = wrapper
            };
            _listView.SetBinding <RatingListWrapper> (ListView.IsRefreshingProperty, vm => vm.IsBusy, BindingMode.OneWay);

            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, new ContentView {
                Content = _listView
            }, true, true);

            //, Padding = new Thickness(10)
            // BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, false, true);


            Content = new ScrollView {
                Content = bgLayout
            };
        }
Exemplo n.º 9
0
        public EventDetailView(EventData data)
        {
            Data = data;

            Title = AppResources.EventDetailsHeader.ToUpper();
            //BackgroundColor = AppResources.AgendaPageBackgroundColor;
            BackgroundColor = Color.Transparent;

            StackLayout layout = new StackLayout()
            {
                VerticalOptions = LayoutOptions.StartAndExpand
            };

            EventView eventView = new EventView();

            eventView.BindingContext = Data;
            layout.Children.Add(eventView);

            if (!Data.FreeAttending && (!string.IsNullOrEmpty(Data.PointsImagePath) || !string.IsNullOrEmpty(Data.SponsorImagePath)))
            {
                var whiteBoxLayout = new AbsoluteLayout {
                    Padding = new Thickness(0, -10, 0, 0)
                };
                whiteBoxLayout.Children.Add(new BoxView
                {
                    WidthRequest    = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width),
                    HeightRequest   = 10,
                    BackgroundColor = Color.Transparent
                });

                var imagesStackLayout = new StackLayout
                {
                    Orientation  = StackOrientation.Horizontal,
                    WidthRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width),
                    Spacing      = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width) - 60 * 2,
                    Padding      = new Thickness(5)
                };

                /*
                 * if (!string.IsNullOrEmpty(Data.PointsImagePath))
                 * {
                 *
                 *  var pointsImage = new DownloadedImage(AppResources.DefaultPointsImage) { HeightRequest = 50 };
                 *  pointsImage.UpdateAtTime = Data.UpdatedAtTime;
                 *  pointsImage.ServerImagePath = Data.PointsImagePath;
                 *  imagesStackLayout.Children.Add(pointsImage);
                 *
                 * }
                 */
                if (!string.IsNullOrEmpty(Data.SponsorImagePath.Trim()))
                {
                    var sponsorImage = new DownloadedImage(AppResources.DefaultSponsorImage)
                    {
                        HeightRequest = 50
                    };
                    sponsorImage.UpdateAtTime    = Data.UpdatedAtTime;
                    sponsorImage.ServerImagePath = Data.SponsorImagePath;
                    imagesStackLayout.Children.Add(sponsorImage);
                }

                whiteBoxLayout.Children.Add(imagesStackLayout);
                layout.Children.Add(whiteBoxLayout);
            }

            var descriptionContent = new ContentView()
            {
                Content = new Label
                {
                    FontSize  = 11,
                    TextColor = Color.Black,
                    Text      = Data.Description
                },
                Padding = new Thickness(10, 10, 0, 0)
            };

            layout.Children.Add(descriptionContent);

            foreach (Speaker speecherData in Data.Speechers)
            {
                layout.Children.Add(GetSpeecherItem(speecherData));
            }

            if (!Data.FreeAttending)
            {
                var absoluteBtnLayout = new AbsoluteLayout
                {
                    HorizontalOptions = LayoutOptions.Center,
                    Padding           = new Thickness(0, 0, 0, 20)
                };

                var eventsActionBtn = new Button
                {
                    //BorderRadius = 25,
                    BorderColor     = AppResources.SpeecherTextColor,
                    BorderWidth     = 1,
                    HeightRequest   = 40,
                    WidthRequest    = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width * 3) / 4),
                    BackgroundColor = AppResources.SpeecherBgColor
                };
                absoluteBtnLayout.Children.Add(eventsActionBtn);

                var btnLabel = new Label
                {
                    WidthRequest = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width * 3) / 4) - 20,
                    Text         = AppResources.EventsActionBtnHeader,
                    TextColor    = AppResources.MenuColor,
                    FontSize     = 15,

                    IsEnabled = true,
                };
                absoluteBtnLayout.Children.Add(btnLabel, new Point(50, 6));

                if (Device.OS == TargetPlatform.iOS)
                {
                    TapGestureRecognizer gesture = new TapGestureRecognizer();
                    gesture.Tapped += OnEventsActionsClicked;
                    absoluteBtnLayout.GestureRecognizers.Add(gesture);
                }
                else
                {
                    eventsActionBtn.Clicked += OnEventsActionsClicked;
                }

                layout.Children.Add(absoluteBtnLayout);
            }

            ScrollView sView = new ScrollView();

            sView.Content = layout;
            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, sView, true, true);

            //Content = new ScrollView {Content = bgLayout };
            Content = new ContentView {
                Content = bgLayout
            };
            //Content = new ScrollView { Content = layout };
        }
Exemplo n.º 10
0
        public LoginView() : base()
        {
            LeftBorder = AppProvider.Screen.ConvertPixelsToDp(20);

            var layout = new StackLayout {
                BackgroundColor = Color.Transparent
            };

            BoxView transpSpace = new BoxView();

            transpSpace.Color         = Color.Transparent;
            transpSpace.WidthRequest  = 1;
            transpSpace.HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 4);

            layout.Children.Add(transpSpace);

            layout.Children.Add(GetEntry(Keyboard.Email, AppResources.LoginEmailDefaultEntry, AppResources.LoginEmailImage, 15, false, 15, out _emailEntry));
            layout.Children.Add(GetEntry(Keyboard.Url, AppResources.LoginPasswordDefaultEntry, AppResources.LoginPasswordImage, 10, true, 10, out _passwordEntry));

            var loginBtn = new Button
            {
                BorderRadius = 5,
                //HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height/10),
                WidthRequest    = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width / 4) * 3),
                HeightRequest   = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 14),
                TextColor       = Color.White,
                BackgroundColor = AppResources.MenuColor,
                Text            = AppResources.Login,
                FontSize        = 16
            };

            loginBtn.Clicked += OnLoginClicked;
            layout.Children.Add(new ContentView {
                Padding = new Thickness(LeftBorder, 10, LeftBorder, 0), HorizontalOptions = LayoutOptions.Center, Content = loginBtn
            });

            /**
             * skipLoginBtn retirado e substituido por login Linkedin
             */
            Image loginLinkedInBtn = new Image()
            {
                Source            = ImageLoader.Instance.GetImage(AppResources.LoginBtLinkedin, false),
                HeightRequest     = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 12),
                WidthRequest      = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width / 4) * 3),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions   = LayoutOptions.CenterAndExpand
            };

            var loginLinkedInRecognizer = new TapGestureRecognizer();

            //Binding events
            loginLinkedInRecognizer.Tapped += OnLinkedinSignupClicked;
            //Associating tap events to the image buttons
            loginLinkedInBtn.GestureRecognizers.Add(loginLinkedInRecognizer);

            layout.Children.Add(loginLinkedInBtn);

            var stackLayout = new StackLayout {
                Spacing = 5, Orientation = StackOrientation.Horizontal, Padding = new Thickness(0, 30, 0, 0)
            };

            var forgetPasswordLayout = new ContentView
            {
                BackgroundColor = AppResources.MenuColor,
                HeightRequest   = 40,
                WidthRequest    = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width / 2),
                Content         = new Label
                {
                    FontSize  = 16,
                    Text      = AppResources.LoginForgetPassword,
                    TextColor = Color.White,
                    XAlign    = TextAlignment.Center,
                    YAlign    = TextAlignment.Center
                },
                HorizontalOptions = LayoutOptions.Fill
            };
            var forgetPassRecognizer = new TapGestureRecognizer();

            forgetPassRecognizer.Tapped += OnForgetPasswordClicked;
            forgetPasswordLayout.GestureRecognizers.Add(forgetPassRecognizer);

            var signupLayout = new StackLayout
            {
                VerticalOptions = LayoutOptions.Center,
                HeightRequest   = 40,
                BackgroundColor = AppResources.MenuColor,
                Orientation     = StackOrientation.Horizontal,
                WidthRequest    = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width / 2 - 10)
            };

            signupLayout.Children.Add(new ContentView
            {
                Content = new Image
                {
                    Source        = ImageLoader.Instance.GetImage(AppResources.SignUpButtonImage, false),
                    HeightRequest = 35
                },
                Padding = new Thickness(10, 5, 10, 5)
            });
            signupLayout.Children.Add(new Label
            {
                FontSize  = 16,
                Text      = AppResources.LoginCreateUser,
                TextColor = Color.White,
                XAlign    = TextAlignment.Center,
                YAlign    = TextAlignment.Center
            });

            var signupRecognizer = new TapGestureRecognizer();

            signupRecognizer.Tapped += OnSignUpClicked;
            signupLayout.GestureRecognizers.Add(signupRecognizer);

            stackLayout.Children.Add(forgetPasswordLayout);
            stackLayout.Children.Add(signupLayout);

            layout.Children.Add(stackLayout);

            BGLayoutView bgLayout = new BGLayoutView(AppResources.LoginBgImage, layout, true, true);

            //Content = new ScrollView { Content = layout };
            Content = new ScrollView {
                Content = bgLayout
            };
        }
Exemplo n.º 11
0
        public MediaPage() : base()
        {
            Title  = AppResources.Midia;
            layout = new StackLayout {
                BackgroundColor = Color.Transparent
            };

            // _mediaList = GetMediaList();

            MediaItem mi1 = new MediaItem("Cultura que inova e se transforma - Lilian Guimarães");

            mi1.MediaType = MediaType.Video;
            mi1.ImagePath = AppResources.MidiaImage1;
            mi1.Url       = "https://www.youtube.com/watch?v=Ec-drZPLRco";

            MediaItem mi2 = new MediaItem("Geraldo Carbone no CONARH 2016 - Os próximos anos do Brasil");

            mi2.MediaType = MediaType.Video;
            mi2.ImagePath = AppResources.MidiaImage2;
            mi2.Url       = "https://www.youtube.com/watch?v=5HgKtL3SEwY";

            MediaItem mi3 = new MediaItem("CONARH 2016 - O que faz a ética...E o que faz a falta dela");

            mi3.MediaType = MediaType.Video;
            mi3.ImagePath = AppResources.MidiaImage3;
            mi3.Url       = "https://www.youtube.com/watch?v=ngN5CImS_bA";

            MediaItem mi4 = new MediaItem("Astrid Fontenelle convida você para o CONARH 2016!!");

            mi4.MediaType = MediaType.Video;
            mi4.ImagePath = AppResources.MidiaImage4;
            mi4.Url       = "https://www.youtube.com/watch?v=dMJhu-5GXdY";



            StackLayout mdL1 = getMediaItemView(mi1.Title, mi1.ImagePath, mi1.Url);
            var         MediaClickRecognizer1 = new TapGestureRecognizer();

            MediaClickRecognizer1.Tapped += OpenMedia1;
            mdL1.GestureRecognizers.Add(MediaClickRecognizer1);

            StackLayout mdL2 = getMediaItemView(mi2.Title, mi2.ImagePath, mi2.Url);
            var         MediaClickRecognizer2 = new TapGestureRecognizer();

            MediaClickRecognizer2.Tapped += OpenMedia2;
            mdL2.GestureRecognizers.Add(MediaClickRecognizer2);

            StackLayout mdL3 = getMediaItemView(mi3.Title, mi3.ImagePath, mi3.Url);
            var         MediaClickRecognizer3 = new TapGestureRecognizer();

            MediaClickRecognizer3.Tapped += OpenMedia3;
            mdL3.GestureRecognizers.Add(MediaClickRecognizer3);

            StackLayout mdL4 = getMediaItemView(mi4.Title, mi4.ImagePath, mi4.Url);
            var         MediaClickRecognizer4 = new TapGestureRecognizer();

            MediaClickRecognizer4.Tapped += OpenMedia4;
            mdL4.GestureRecognizers.Add(MediaClickRecognizer4);


            var mediaLayout = new StackLayout
            {
                Orientation = StackOrientation.Vertical,
                Spacing     = 5,
                Padding     = new Thickness(0)
            };

            //if (Device.OS != TargetPlatform.iOS)
            //{
            mediaLayout.Children.Add(new ContentView {
                Content = mdL1
            });
            mediaLayout.Children.Add(new ContentView {
                Content = mdL2
            });
            mediaLayout.Children.Add(new ContentView {
                Content = mdL3
            });
            mediaLayout.Children.Add(new ContentView {
                Content = mdL4
            });

            //}

            /*
             * else
             * {
             *  var MediaBtn1 = new Button
             *  {
             *      BorderRadius = 5,
             *      //HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height/10),
             *      WidthRequest = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width / 4) * 3),
             *      HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 14),
             *      TextColor = Color.White,
             *      BackgroundColor = AppResources.MenuColor,
             *      Text = AppResources.OpenVideoMedia,
             *      FontSize = 16
             *  };
             *  MediaBtn1.Clicked += OpenMedia1;
             *
             *  var MediaBtn2 = new Button
             *  {
             *      BorderRadius = 5,
             *      //HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height/10),
             *      WidthRequest = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width / 4) * 3),
             *      HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 14),
             *      TextColor = Color.White,
             *      BackgroundColor = AppResources.MenuColor,
             *      Text = AppResources.OpenVideoMedia,
             *      FontSize = 16
             *  };
             *  MediaBtn2.Clicked += OpenMedia2;
             *
             *  var MediaBtn3 = new Button
             *  {
             *      BorderRadius = 5,
             *      //HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height/10),
             *      WidthRequest = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width / 4) * 3),
             *      HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 14),
             *      TextColor = Color.White,
             *      BackgroundColor = AppResources.MenuColor,
             *      Text = AppResources.OpenVideoMedia,
             *      FontSize = 16
             *  };
             *  MediaBtn3.Clicked += OpenMedia3;
             *
             *  mediaLayout.Children.Add(new ContentView { Content = mdL1 });
             * // mediaLayout.Children.Add(MediaBtn1);
             *  mediaLayout.Children.Add(new ContentView { Content = mdL2 });
             * // mediaLayout.Children.Add(MediaBtn2);
             *  mediaLayout.Children.Add(new ContentView { Content = mdL3 });
             *  //mediaLayout.Children.Add(MediaBtn3);
             * }
             */
            layout.Children.Add(mediaLayout);


            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, true, true);

            Content = new ScrollView {
                Content = bgLayout
            };
        }
Exemplo n.º 12
0
        public LinkedInLoginView() : base()
        {
            LeftBorder = AppProvider.Screen.ConvertPixelsToDp(20);

            var layout = new StackLayout {
                BackgroundColor = Color.Transparent
            };

            BoxView transpSpace = new BoxView();

            transpSpace.Color         = Color.Transparent;
            transpSpace.WidthRequest  = 1;
            transpSpace.HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 4);

            layout.Children.Add(transpSpace);

            Image LinkedinLogo = new Image()
            {
                Source            = ImageLoader.Instance.GetImage(AppResources.LinkedinLogo, false),
                HeightRequest     = AppProvider.Screen.ConvertPixelsToDp(94),
                HorizontalOptions = LayoutOptions.Center
            };

            if (Device.OS == TargetPlatform.iOS)
            {
                LinkedinLogo.HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 8);
                LinkedinLogo.WidthRequest  = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width * 3) / 4);
            }
            layout.Children.Add(LinkedinLogo);

            var fs = new FormattedString();

            string firstPart  = "Para concluir o seu cadastro, por favor entre com uma senha ";
            string secondPart = "para o aplicativo Conarh 2016. ";
            string thirdPart  = "As outras informações do seu cadastro já foram importadas do Linkedin.";


            fs.Spans.Add(new Span {
                Text = firstPart, ForegroundColor = Color.Black, FontSize = 16
            });
            fs.Spans.Add(new Span {
                Text = secondPart, ForegroundColor = Color.Black, FontSize = 16
            });
            fs.Spans.Add(new Span {
                Text = thirdPart, ForegroundColor = Color.Black, FontSize = 16
            });

            var labelTerms = new Label
            {
                FormattedText = fs,
            };


            layout.Children.Add(LinkedinLogo);
            layout.Children.Add(new ContentView {
                Content = labelTerms, Padding = new Thickness(10, 5, 10, 5)
            });



            layout.Children.Add(GetEntry(Keyboard.Url, AppResources.LoginPasswordDefaultEntry, AppResources.LoginPasswordImage, 10, true, 10, out _passwordEntry));

            var loginBtn = new Button
            {
                BorderRadius    = 5,
                WidthRequest    = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width / 4) * 3),
                HeightRequest   = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 14),
                TextColor       = Color.White,
                BackgroundColor = AppResources.MenuColor,
                Text            = AppResources.Login,
                FontSize        = 16
            };

            loginBtn.Clicked += OnLoginClicked;
            layout.Children.Add(new ContentView {
                Padding = new Thickness(LeftBorder, 10, LeftBorder, 0), HorizontalOptions = LayoutOptions.Center, Content = loginBtn
            });


            BGLayoutView bgLayout = new BGLayoutView(AppResources.LoginBgImage, layout, true, true);

            Content = new ScrollView {
                Content = bgLayout
            };
        }
Exemplo n.º 13
0
        public SpeecherDetailView(Speaker data, Color eventColor)
        {
            Data  = data;
            Title = Data.Name;

            var absoluteLayout = new AbsoluteLayout {
            };

            absoluteLayout.Children.Add(new BoxView {
                WidthRequest    = AppProvider.Screen.Width,
                HeightRequest   = FirstItemHeight,
                BackgroundColor = AppResources.AgendaPageBackgroundColor
            });

            absoluteLayout.Children.Add(new BoxView {
                WidthRequest    = 10,
                HeightRequest   = FirstItemHeight,
                BackgroundColor = eventColor
            });

            absoluteLayout.Children.Add(new BoxView {
                WidthRequest    = AppProvider.Screen.Width,
                HeightRequest   = SecondItemHeight,
                BackgroundColor = AppResources.SpeecherBgColor
            }, new Point(0, FirstItemHeight));

            absoluteLayout.Children.Add(new Label {
                FontSize  = 80,
                Text      = AppResources.BioHeader,
                TextColor = AppResources.SpeecherTextColor
            }, new Point(150, 23));

            _speecherImage = new DownloadedImage(AppResources.DefaultUserImage)
            {
                HeightRequest = FirstItemHeight,
                WidthRequest  = FirstItemHeight,
                Aspect        = Aspect.AspectFill
            };

            absoluteLayout.Children.Add(_speecherImage, new Point(10, 0));

            var stackTextLayout = new StackLayout {
                Padding = new Thickness(PaddingLeftFisrtLabel, 10, 0, 0)
            };

            stackTextLayout.Children.Add(new Label {
                FontSize  = 12,
                XAlign    = TextAlignment.Start,
                Text      = AppResources.Speakers.ToUpper(),
                TextColor = eventColor
            });

            stackTextLayout.Children.Add(new Label {
                FontAttributes = FontAttributes.Bold,
                FontSize       = 15,
                XAlign         = TextAlignment.Start,
                Text           = Data.Name,
                TextColor      = eventColor
            });

            absoluteLayout.Children.Add(stackTextLayout, new Point(0, FirstItemHeight));

            var descriptionContent = new ContentView {
                Content = new ContentView {
                    Content = new Label {
                        FontSize  = 11,
                        XAlign    = TextAlignment.Start,
                        Text      = Data.Bio,
                        TextColor = Color.Black
                    },
                    Padding = new Thickness(PaddingLeftFisrtLabel, PaddingLeftFisrtLabel / 2, PaddingLeftFisrtLabel, PaddingLeftFisrtLabel / 2)
                },
                BackgroundColor = AppResources.AgendaPageBackgroundColor
            };

            var stackLayout = new StackLayout {
                BackgroundColor = AppResources.AgendaPageBackgroundColor
            };

            stackLayout.Children.Add(absoluteLayout);
            stackLayout.Children.Add(descriptionContent);
            ScrollView scrollView = new ScrollView()
            {
                Content = stackLayout
            };

            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, scrollView, true, true);

            //Content =  {Content = stackLayout};
            Content = new ContentView {
                Content = bgLayout
            };
        }
Exemplo n.º 14
0
        public ConnectionPage()
        {
            Title           = AppResources.Connect;
            BackgroundColor = Color.Transparent;

            CurrentModel = AppModel.Instance.CurrentConnectionsWrapper;
            PendingConnectionsDataWrapper = GetPendingConnectionsDataWrapper();
            UserController.Instance.UpdateProfileData(CurrentModel.LoginedUser);

            searchBarView         = new SearchBarView();
            searchBarView.Clear  += OnSearchClear;
            searchBarView.Search += OnSearch;

            _wrapper     = new ConnectListWrapper(CurrentModel);
            UserListView = new ListView
            {
                RefreshCommand         = _wrapper.RefreshCommand,
                HasUnevenRows          = true,
                ItemTemplate           = new DataTemplate(typeof(ConnectionCell)),
                SeparatorVisibility    = SeparatorVisibility.None,
                IsPullToRefreshEnabled = false,
                ItemsSource            = GetItemsSource(),
                //ItemsSource = CurrentModel,
                BindingContext = _wrapper
            };
            UserListView.SetBinding <ConnectListWrapper>(ListView.IsRefreshingProperty, vm => vm.IsBusy, BindingMode.OneWay);

            var buttonLayout = new StackLayout
            {
                Orientation       = StackOrientation.Horizontal,
                Spacing           = 0,
                HorizontalOptions = LayoutOptions.Fill,
                Children          =
                {
                    new ContentView {
                        Content = GetButton(AppResources.ProfileAllContacsBtnHeader, AppResources.MenuColor, OnAllContactsClicked), WidthRequest = AppProvider.Screen.Width / 3
                    },
                    new ContentView {
                        Content = GetButton(AppResources.ProfilePendingContacsBtnHeader, AppResources.AgendaCongressoColor, OnPendingContactsClicked), WidthRequest = AppProvider.Screen.Width / 3
                    },
                    new ContentView {
                        Content = GetButton(AppResources.ProfileRatingBtnHeader, AppResources.AgendaExpoColor, OnRankingClicked), WidthRequest = AppProvider.Screen.Width / 3
                    },
                },
                Padding = new Thickness(0)
            };

            lowerLayout = new StackLayout
            {
                Orientation = StackOrientation.Vertical,
            };
            GetLowerLayoutChidren(selectedContactedList);

            StackLayout layout = new StackLayout
            {
                Orientation = StackOrientation.Vertical,
                Children    =
                {
                    new UserHeaderView(CurrentModel.LoginedUser, false, false, false),
                    buttonLayout,
                    lowerLayout
                }
            };

            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, true, true);

            // BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, false, true);

            //Content = layout;
            Content = bgLayout;
        }
Exemplo n.º 15
0
        public WallCreatePostPage()
        {
            _fakeImagePath = Path.Combine(AppProvider.IOManager.DocumentPath, "wallfakeImage.jpeg");

            Title = AppResources.WallCreatePost;

            BackgroundColor = Color.Transparent;

            var layout = new StackLayout  {
                Orientation     = StackOrientation.Vertical,
                BackgroundColor = AppResources.AgendaExpoColor,
                //BackgroundColor = Color.Transparent,
                Padding = new Thickness(Border),
                Spacing = 5
            };

            var topLayout = new StackLayout  {
                Orientation = StackOrientation.Horizontal
            };
            var userImage = new DownloadedImage(AppResources.DefaultUserImage)
            {
                WidthRequest  = 40,
                HeightRequest = 40
            };

            userImage.UpdateAtTime    = AppModel.Instance.CurrentUser.User.UpdatedAtTime;
            userImage.ServerImagePath = AppModel.Instance.CurrentUser.User.ProfileImagePath;

            topLayout.Children.Add(userImage);

            var userNameLabel = new Label {
                TextColor = Color.White, FontSize = 15, XAlign = TextAlignment.Start
            };

            userNameLabel.Text = AppModel.Instance.CurrentUser.User.Name;

            topLayout.Children.Add(userNameLabel);

            layout.Children.Add(topLayout);

            _postImage = new Image {
                WidthRequest = PostImageWidth, IsVisible = false, Aspect = Aspect.AspectFit
            };
            layout.Children.Add(_postImage);

            float btnWidth = (AppProvider.Screen.Width - Border) / 2;

            Button btnUpload = new Button {
                BackgroundColor = AppResources.MenuColor,
                WidthRequest    = btnWidth,
                HeightRequest   = 40,
                Text            = AppResources.WallPostButtonUpload,
                TextColor       = Color.White,
                BorderRadius    = 0
            };

            btnUpload.Clicked += OnUploadClicked;
            layout.Children.Add(btnUpload);

            _postTextField = new EditorControl(string.Empty)
            {
                HeightRequest   = EditorHeight,
                WidthRequest    = AppProvider.Screen.Width - Border * 2,
                BackgroundColor = Color.White
            };

            layout.Children.Add(_postTextField);

            btnPost = new Button {
                BackgroundColor = AppResources.MenuColor,
                WidthRequest    = btnWidth,
                Text            = AppResources.WallPostButtonPost,
                TextColor       = Color.White,
                BorderRadius    = 0
            };
            btnPost.Clicked += OnPostClicked;;
            layout.Children.Add(btnPost);

            ScrollView scrollView = new ScrollView()
            {
                Content = layout
            };


            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, scrollView, true, true);

            Content = new ContentView {
                Content = bgLayout
            };


//            Content = new ScrollView() {Content = layout};
        }
Exemplo n.º 16
0
        public ResetEmailView()
        {
            // LeftBorder = AppProvider.Screen.ConvertPixelsToDp(20);

            var layout = new StackLayout {
                BackgroundColor = Color.Transparent
            };

            BoxView transpSpace = new BoxView();

            transpSpace.Color         = Color.Transparent;
            transpSpace.WidthRequest  = 1;
            transpSpace.HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 8);

            layout.Children.Add(transpSpace);

            Label ResetEmailLabel = new Label()
            {
                HorizontalTextAlignment = TextAlignment.Center,
                TextColor = AppResources.MenuColor,
                FontSize  = 16,
                Text      = AppResources.LoginForgetPasswordEnterEmail,
            };

            layout.Children.Add(ResetEmailLabel);

            layout.Children.Add(GetEntry(Keyboard.Email, AppResources.LoginEmailDefaultEntry, AppResources.LoginEmailImage, 15, false, 15, out _emailEntry));

            var ResetBtn = new Button
            {
                BorderRadius = 5,
                //HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height/10),
                WidthRequest    = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width / 4) * 3),
                HeightRequest   = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 14),
                TextColor       = Color.White,
                BackgroundColor = AppResources.MenuColor,
                Text            = AppResources.EventsActionPostQuestion,
                FontSize        = 16
            };

            /*
             * var TESTEBtn = new Button
             * {
             *  BorderRadius = 5,
             *  //HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height/10),
             *  WidthRequest = AppProvider.Screen.ConvertPixelsToDp((AppProvider.Screen.Width / 4) * 3),
             *  HeightRequest = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Height / 14),
             *  TextColor = Color.White,
             *  BackgroundColor = AppResources.MenuColor,
             *  Text = "teste",
             *  FontSize = 16
             * };
             */


            ResetBtn.Clicked += OnResetClicked;
//            TESTEBtn.Clicked += OnTestClicked;
            layout.Children.Add(new ContentView {
                Padding = new Thickness(10, 10, 10, 0), HorizontalOptions = LayoutOptions.Center, Content = ResetBtn
            });
            //layout.Children.Add(new ContentView { Padding = new Thickness(10, 10, 10, 0), HorizontalOptions = LayoutOptions.Center, Content = TESTEBtn });

            BGLayoutView bgLayout = new BGLayoutView(AppResources.DefaultBgImage, layout, true, true);

            //Content = new ScrollView { Content = layout };
            Content = new ScrollView {
                Content = bgLayout
            };
        }