示例#1
0
        public FrontClubMember(Account clubMember, int friendship)
        {
            this.friendship = friendship;
            ch = new ColorHandler();
            Id = clubMember.Id;
            this.Emoji = clubMember.Emoji;
            this.Username = clubMember.Username;
            NotFriends = false;
            AreFriends = !NotFriends;
            UserColor = clubMember.Color;
            FriendIndicator = ch.fromStringToColor("yellow");

            switch (this.friendship)
            {
                case 0:
                    NotFriends = true;
                    AreFriends = false;
                    break;
                case 1:
                    FriendIndicator = ch.fromStringToColor("yellow");
                    break;
                case 2:
                    FriendIndicator = ch.fromStringToColor("green");
                    break;
                default:

                    break;
            }

        }
示例#2
0
        public FriendsPage(List<FrontFriends> friendsList)
        {
            this.friendsList = friendsList;
            displayedFriends = friendsList;
            Title = "Friends";
            ch = new ColorHandler();
            Entry searchBar = new Entry
            {
                Placeholder = "Search",
                BackgroundColor = ch.fromStringToColor("white"),
                TextColor = ch.fromStringToColor("black")

            };
            searchBar.Completed += SearchBar_Completed;
            ListView listView = new ListView
            {
                ItemsSource = displayedFriends,
                ItemTemplate = new DataTemplate(typeof(FriendsListViewCell)),
                RowHeight = 75
            };
            listView.ItemSelected += ListView_ItemSelected;

            BackgroundColor = ch.fromStringToColor("lightGray");
            Content = new StackLayout
            {
                Children =
                {
                    searchBar,
                    listView
                }
            };
        }
        public FriendSettingsPage()
        {
            ch = new ColorHandler();
            Title = "User Settings";
            BackgroundColor = ch.fromStringToColor("lightGray");
            TableView tableView = new TableView
            {
                Root = new TableRoot()
            };
            TableSection tSection = new TableSection();
            tableView.Root.Add(tSection);
            TextCell removeFriendCell = new TextCell
            {
                Text = "Remove Friend",
                TextColor = ch.fromStringToColor("gray"),

            };
            removeFriendCell.Tapped += RemoveFriendCell_Tapped;
            TextCell reportTextCell = new TextCell
            {
                Text = "Report",
                TextColor = ch.fromStringToColor("gray"),


            };
            reportTextCell.Tapped += ReportTextCell_Tapped;
            tSection.Add(removeFriendCell);
            tSection.Add(reportTextCell);
            Content = tableView;
        }
示例#4
0
        public AddTagsPage()
        {
            //  addedTags = new List<FrontTag>();
            ch = new ColorHandler();
            tagEntry = new Entry
            {
                Placeholder = "Add Tags",
                BackgroundColor = Color.White,
                TextColor = Color.Black
            };
            tagEntry.Completed += TagEntry_Completed;
            ListView listView = new ListView
            {

                ItemsSource = addedTags,
                ItemTemplate = new DataTemplate(typeof(TagViewCell))

            };

            Content = new StackLayout
            {
                Children = {
                    tagEntry,
                    listView

                },
                BackgroundColor = ch.fromStringToColor("gray")
            };
        }
        public TabbedMainClubPages(List<Club> clubList, List<Club> memberClubList, List<Club> popularClubs, List<Club> newestClubs, List<string> pendingInviteList, List<string> firstLineCommentList)
        {
            ch = new ColorHandler();
            BackgroundColor = ch.fromStringToColor("purple");
            

            // BarTintColor = ch.fromStringToColor("purple");
            NavigationPage.SetHasNavigationBar(this, true);
            // NavigationPage.SetTitleIcon(CurrentPage,"CloudIcon.png");


            this.ToolbarItems.Add(new ToolbarItem
            {
                Icon = "Settings_Top.png",


                Order = ToolbarItemOrder.Primary,
                Command = new Command(() => menuPopup()),

            });
            csp = new ClubSearchPage(clubList, memberClubList, popularClubs, newestClubs, pendingInviteList, firstLineCommentList);
            mcp = new MyClubsPage(memberClubList, firstLineCommentList);
            pp = new ProfilePage();
            this.Children.Add(csp);
            this.Children.Add(mcp);
            this.Children.Add(pp);
            this.Title = "Explore";


            CurrentPageChanged += TabbedMainClubPages_CurrentPageChanged;

        }
示例#6
0
        public FrontFriends(Account account, bool inSameClub)
        {
            ch = new ColorHandler();
            Emoji = account.Emoji;
            Username = account.Username;
            Id = account.Id;
            if (inSameClub)
            {
                SharedClubIndicator = ch.fromStringToColor("green");
            }
            else
            {
                SharedClubIndicator = ch.fromStringToColor("green");
            }

        }
示例#7
0
        public Tutorial1Page()
        {
            //Michael's debug function
          //  DebugDatabase();


            this.Padding = new Thickness(0, Device.OnPlatform(10, 0, 0), 0, 0);
            //  Title = "";
            ColorHandler ch = new ColorHandler();
            BackgroundColor = ch.fromStringToColor("purple");
            
            Image cloudImage = new Image
            {
                Aspect = Aspect.AspectFit,
                Source = ImageSource.FromFile("Cloud.png"),
                VerticalOptions = LayoutOptions.End,
                HorizontalOptions = LayoutOptions.Center,
                Scale = .7
            };
          

            Label headerLabel = new Label
            {
                Text = "Welcome To CloudClub",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center,
                FontAttributes = FontAttributes.Bold,
                FontSize = 42,
                FontFamily = Device.OnPlatform(iOS: "MarkerFelt-Thin", Android: "Roboto", WinPhone: "Comic Sans MS"),
                TextColor = Color.White                
            };
            Label informerLabel = new Label
            {
                Text = "The newest innovation in dynamic group chatting",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center,
                FontAttributes = FontAttributes.Bold,
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                TextColor = Color.White
            };

         
            Content = new StackLayout
            {
                Children = {
                    cloudImage,
                    headerLabel,
                    informerLabel
                },
                BackgroundColor = Color.FromRgb(210,61,235),
                Spacing = 50,
                Padding = new Thickness(20,0,20,20),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Center
            };
        }
示例#8
0
        public NewsPageViewCell()
        {
            ch = new ColorHandler();
            Image imgNotification = new Image
            {
                Aspect = Aspect.AspectFit,
                HeightRequest = 50,
                HorizontalOptions = LayoutOptions.Start,
                VerticalOptions = LayoutOptions.Center

            };
            imgNotification.SetBinding(Image.SourceProperty, "NotificationImage");
            Label lNotificaton = new Label
            {
                TextColor = ch.fromStringToColor("black"),
                FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center
            };
            lNotificaton.SetBinding(Label.TextProperty, "Text");
            Label lTimeSpan = new Label
            {
                TextColor = ch.fromStringToColor("black"),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.CenterAndExpand
            };
            lTimeSpan.SetBinding(Label.TextProperty, "Time");

            var sLayout = new StackLayout
            {
                Children =
                {
                    imgNotification,
                    lNotificaton,
                    lTimeSpan
                },
                Orientation = StackOrientation.Horizontal,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                Padding = new Thickness(7, 0, 7, 0)
            };
            View = sLayout;
        }
 public CarouselTutorialPageRedo()
 {
     ch = new ColorHandler();
     this.BackgroundColor = ch.fromStringToColor("purple");
     this.Title = "Tutorial";
     NavigationPage.SetHasNavigationBar(this, false);
     this.Children.Add(new Tutorial1Page());
     this.Children.Add(new Tutorial2Page());
     this.Children.Add(new Tutorial3Page());
     this.Children.Add(new Tutorial4PageRedo());
 }
        public SettingsNotificationspage()
        {
            ch = new ColorHandler();
            Title = "Notifications";

            var dailyRankSwitch = new SwitchCell
            {
                Text = "Daily Rank",
                On = false

            };
            dailyRankSwitch.OnChanged += async (sender, e) =>
            {
                if (dailyRankSwitch.On)
                {
                    await App.dbWrapper.EnableRankingNotification();


                }
                else
                {
                    await App.dbWrapper.DisableRankingNotification();
                }
            };
            var usersNearYouSwitch = new SwitchCell
            {
                Text = "Users Near You"

            };
            usersNearYouSwitch.OnChanged += async (sender, e) =>
            {
                throw new NotImplementedException();
            };

            Content = new StackLayout
            {
                Children =
                {
                    new TableView
                    {
                        BackgroundColor = ch.fromStringToColor("white"),
                        Root = new TableRoot
                        {
                            new TableSection
                            {
                                dailyRankSwitch,
                                usersNearYouSwitch
                            }
                        }
                    }
                }
            };
        }
示例#11
0
        public ContactUsPage()
        {
            ch = new ColorHandler();
            Title = "Contact Us";

            Editor = new Editor
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Fill,
                HeightRequest = 200,
                //  Placeholder = "Message",
                //  TextColor = ch.fromStringToColor("black"),
                BackgroundColor = ch.fromStringToColor("white")
            };
            Button bCancel = new Button
            {
                Text = "X",
                TextColor = ch.fromStringToColor("white"),
                BackgroundColor = ch.fromStringToColor("lightGray"),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand,
                HeightRequest = 100
            };
            bCancel.Clicked += BCancel_Clicked;
            Button bSend = new Button
            {
                Text = "Send",
                TextColor = ch.fromStringToColor("white"),
                BackgroundColor = ch.fromStringToColor("green"),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand,
                HeightRequest = 100
            };
            bSend.Clicked += BSend_Clicked;

            Content = new StackLayout
            {
                Children =
                {
                    Editor,
                    new StackLayout
                    {
                        Children =
                        {
                            bCancel,
                            bSend
                        },
                        Orientation = StackOrientation.Horizontal,
                        HorizontalOptions = LayoutOptions.FillAndExpand,
                        Spacing =10,
                        Padding = new Thickness(10,10,10,10)
                    }
                },
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand,
                Padding = new Thickness(0, 0, 0, 70),
                BackgroundColor = ch.fromStringToColor("purple")
            };
        }
示例#12
0
        public FriendProfilePage(Account user, int activeFriendRequest, FriendRequest friendRequest = null)
        {
            //activeFriendRequest key 0 = not friends 1 = pending request from them 2 =friends 3= pending request from you

            ch = new ColorHandler();
            this.activeFriendRequest = activeFriendRequest;
            this.friendRequest = friendRequest;
            this.user = user;
            BackgroundColor = ch.fromStringToColor("purple");
            this.ToolbarItems.Add(new ToolbarItem
            {
                Icon = "Settings_Top.png",

                Order = ToolbarItemOrder.Primary,
                Command = new Command(() => menuPopup())
            });

            this.Padding = new Thickness(0, Device.OnPlatform(10, 0, 0), 0, 0);
            updateView();

        }
示例#13
0
 public FriendsListViewCell()
 {
     ch = new ColorHandler();
     Image userEmoji = new Image
     {
         Aspect = Aspect.AspectFit,
         WidthRequest = 50,
         HorizontalOptions = LayoutOptions.Center
     };
     userEmoji.SetBinding(Image.SourceProperty, "UserEmoji");
     var lUserName = new Label
     {
         HorizontalOptions = LayoutOptions.Center,
         VerticalOptions = LayoutOptions.Center
     };
     lUserName.SetBinding(Label.TextProperty, "Username");
     lUserName.SetBinding(Label.TextColorProperty, "Color", converter: new ColorConverter());
     Button friendshipIndicator = new Button // TODO: custom renderer
     {
         HeightRequest = 50,
         WidthRequest = 50,
         HorizontalOptions = LayoutOptions.CenterAndExpand,
         VerticalOptions = LayoutOptions.Center
     };
     friendshipIndicator.SetBinding(Button.BackgroundColorProperty, "SharedClubIndicator");
     View = new StackLayout
     {
         Children =
         {
             userEmoji,
             lUserName,
             friendshipIndicator
         },
         BackgroundColor = ch.fromStringToColor("white"),
         Orientation = StackOrientation.Horizontal,
         HorizontalOptions = LayoutOptions.CenterAndExpand
     };
 }
示例#14
0
        public CloudsPage(List<Cloud> cloudList, List<string> savedClouds)
        {
            ch = new ColorHandler(); 
            var tableSection = new TableSection();

            for (int i = 0; i < savedClouds.Count; i++)
            {
                bool saved = false;
                for (int j = 0; j < cloudList.Count; j++)
                {
                    if (savedClouds[i].Equals(cloudList[j].Title))
                    {
                        saved = true;
                    }

                }


                var s = new SwitchCell
                {
                    Text = savedClouds[i],
                    On = saved

                };
                s.OnChanged += S_OnChanged;
                tableSection.Add(s);
            }

            var cloudSwitchTable = new TableView
            {
                Root = new TableRoot(),
                BackgroundColor = ch.fromStringToColor("white")

            };
            cloudSwitchTable.Root.Add(tableSection);
            Content = cloudSwitchTable;
        }
示例#15
0
        public ClubSearchPage(List<Club> clubList, List<Club> clubMemberList, List<Club> popularClubs, List<Club> newestClubs, List<string> pendingInviteList, List<string> firstLineCommentList)
        {
            ch = new ColorHandler();
            this.firstLineCommentList = firstLineCommentList;
            this.pendingInviteList = pendingInviteList;
            this.clubList = clubList;
            this.clubMemberList = clubMemberList;
            this.popularClubs = popularClubs;
            this.newestClubs = newestClubs;
            BackgroundColor = ch.fromStringToColor("purple");
            this.Icon = "ClubSearch_TabView.png";
            this.Padding = new Thickness(0, Device.OnPlatform(10, 0, 0), 0, 0);
            returnedSearchedClubs = new List<Club>();
            System.Diagnostics.Debug.WriteLine(firstLineCommentList.Count.ToString());
            System.Diagnostics.Debug.WriteLine(clubMemberList.Count.ToString());


            MessagingCenter.Subscribe<ClubSearchViewCell, string>(this, "Hi", async (sender, arg) => {

                var clubId = (string)arg;
                var answer = await DisplayAlert("Report", "Do you really want to report this club?", "Yes", "No");
                if (answer)
                {
                    await App.dbWrapper.CreateClubReport(clubId, App.dbWrapper.GetUser().Id);
                }


                //DisplayAlert("Report", "This club has been reported.","Ok");
            });




            Content = generatePopularPage();

        }
示例#16
0
        public SettingsPage()
        {
            Title = "Settings";
            ch = new ColorHandler();

            var cloudsTCell = new TextCell
            {
                Text = "Clouds",
                TextColor = ch.fromStringToColor("black")
            };
            cloudsTCell.Tapped += async (sender, e) =>
            {
                var location = await App.dbWrapper.GetLocation();
                var cloudsList = await App.dbWrapper.GetAvailableClouds(location[0],location[1]);
                this.getSavedClouds();
                await Navigation.PushAsync(new CloudsPage(cloudsList,savedCloudList));

            };

            var notificationsTCell = new TextCell
            {
                Text = "Notifications",
                TextColor = ch.fromStringToColor("black")
            };
            notificationsTCell.Tapped += (sender, e) =>
            {
                Navigation.PushAsync(new SettingsNotificationspage());
            };

            var tutorialTCell = new TextCell
            {
                Text = "Tutorial",
                TextColor = ch.fromStringToColor("black")
            };
            tutorialTCell.Tapped += (sender, e) =>
            {

                Navigation.PushAsync(new CarouselTutorialPageRedo());
            };
            var contactUsTCell = new TextCell
            {
                Text = "Contact Us",
                TextColor = ch.fromStringToColor("black")
            };
            contactUsTCell.Tapped += (sender, e) =>
            {
                Navigation.PushAsync(new ContactUsPage());
            };

            var signOutTCell = new TextCell
            {

                Text = "Sign Out",
                TextColor = ch.fromStringToColor("black"),
            };
            signOutTCell.Tapped += async (sender, args) =>
            {

                var response = await DisplayAlert("Logout", "Are you sure you want to logout?", "Yes", "No");
                if (response)
                {
                    var fileSystem = FileSystem.Current.LocalStorage;
                    var exists = await fileSystem.CheckExistsAsync("PhoneData.txt");
                    if (exists.Equals(ExistenceCheckResult.FileExists))
                    {
                        IFile file = await fileSystem.CreateFileAsync("PhoneData.txt", CreationCollisionOption.ReplaceExisting);
                        string baseString = "a\nUVA,\n";
                        await file.WriteAllTextAsync(baseString);
                        var navPage = new NavigationPage(new CarouselTutorialPage());
                        Application.Current.MainPage = navPage;
                    }
                    else
                    {
                        throw new System.IO.FileNotFoundException("PhoneData.txt");
                    }
                }


            };
            // Navigation.PushModalAsync(new SignUpPage());

            TableView tableView = new TableView
            {
                Intent = TableIntent.Settings,
                Root = new TableRoot
                {
                    new TableSection
                    {
                        cloudsTCell,
                        notificationsTCell,
                        tutorialTCell,
                        contactUsTCell,
                        signOutTCell
                    }
                },
                BackgroundColor = ch.fromStringToColor("white"),
                
            };
            Content = tableView;


        }
示例#17
0
        public Tutorial3Page()
        {
            ch = new ColorHandler();
            BackgroundColor = ch.fromStringToColor("purple");
            this.Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5);

            // page 3 of tutorial
            Label topHeader = new Label
            {
                Text = "How It Works",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.End,
                FontAttributes = FontAttributes.Bold,
                FontSize = 42,
                TextColor = Color.White,
                FontFamily = Device.OnPlatform(iOS: "MarkerFelt-Thin", Android: "Droid Sans Mono", WinPhone: "Comic Sans MS"),
                BackgroundColor = Color.FromRgb(210, 61, 235)

            };

            Image cloudImage = new Image
            {
                Aspect = Aspect.AspectFit,
                Source = ImageSource.FromFile("page3Tutorial.png"),
                HeightRequest = 175,
                VerticalOptions = LayoutOptions.Center,
                HorizontalOptions = LayoutOptions.Center
            };

            Label lowerHeader = new Label
            {
                Text = "Interact Dynamically",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center,
                FontAttributes = FontAttributes.Bold,
                FontSize = 36,
                FontFamily = Device.OnPlatform(iOS: "MarkerFelt-Thin", Android: "Droid Sans Mono", WinPhone: "Comic Sans MS"),
                TextColor = Color.White
            };
            Label informerLabel = new Label
            {
                Text = "Stay active! Clubs are deleted after 24 hours of inactivity",
                XAlign = TextAlignment.Center,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center,
                FontAttributes = FontAttributes.Bold,
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                TextColor = Color.White
            };


            
            StackLayout sLayout = new StackLayout
            {
                Children = {
                    topHeader,
                    cloudImage,
                    lowerHeader,
                    informerLabel

                },
                BackgroundColor = Color.FromRgb(210, 61, 235),
                Spacing = 35,
                Padding = new Thickness(20, 30, 20, 20)


            };


            Content = sLayout;
        }
示例#18
0
        public CreateClubPage()

        {
            ch = new ColorHandler();
            tagPage = new AddTagsPage();
            clubPublic = true;
            clubColor = "default";
            tagList = new List<string>();
            colorButtons = this.generateColorButtons();
            this.Padding = new Thickness(0, Device.OnPlatform(10, 0, 0), 0, 0);
            this.Title = "Create A Club";
            titleLabel = new Label
            {
                Text = "Title",
                TextColor = Color.White,
                FontAttributes = FontAttributes.Bold,
                FontSize = 36,
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center
            };
            clubNameEntry = new Entry
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Center,
                BackgroundColor = Color.White,
                TextColor = Color.Black,
                Placeholder = "Club Name"
            };
            colorLabel = new Label
            {
                Text = "Color",
                TextColor = Color.White,
                FontAttributes = FontAttributes.Bold,
                FontSize = 36,
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center
            };
            RowDefinition rd = new RowDefinition { Height = 60 };

            colorGrid = new Grid
            {
                VerticalOptions = LayoutOptions.Center,

                RowDefinitions =
                {
                    new RowDefinition { Height = rd.Height},
                    new RowDefinition { Height =  rd.Height},

                },
                ColumnDefinitions =
                {
                    new ColumnDefinition { Width = rd.Height },
                    new ColumnDefinition { Width = rd.Height },
                    new ColumnDefinition { Width = rd.Height },
                    new ColumnDefinition { Width = rd.Height }

                },

                HorizontalOptions = LayoutOptions.CenterAndExpand,
                RowSpacing = 5,
                ColumnSpacing = 10,
                BackgroundColor = Color.White,
                Padding = new Thickness(70, 5, 70, 5)
            };
            int counter = 0;
            for (int i = 0; i < (colorButtons.Count) / 2; i++)
            {
                for (int j = 0; j < 2; j++)
                {
                    colorGrid.Children.Add(colorButtons[counter], i, j);
                    counter++;
                }
            }


            inviteLabel = new Label
            {
                Text = "Invite Friends",
                TextColor = Color.White,
                FontAttributes = FontAttributes.Bold,
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.Center

            };
            tagsLabel = new Label
            {
                Text = "Add Tags",
                TextColor = Color.White,
                FontAttributes = FontAttributes.Bold,
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.Center

            };
            bAddTags = new Button
            {
                Text = tagPage.addedTags.Count.ToString(),
                TextColor = Color.White,
                BackgroundColor = ch.fromStringToColor("lightGray"),
                FontAttributes = FontAttributes.Bold,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                BorderRadius = 7,
                VerticalOptions = LayoutOptions.Center
            };
            bAddTags.Clicked += BAddTags_Clicked;
            bAddFriends = new Button
            {
                Text = "+",
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                TextColor = Color.FromRgb(210, 61, 235),
                BackgroundColor = Color.White,
                FontAttributes = FontAttributes.Bold,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                BorderRadius = 7,
                VerticalOptions = LayoutOptions.Center
            };
            bAddFriends.Clicked += BAddFriends_Clicked;

            bPublic = new Button
            {
                Text = "Public",
                TextColor = Color.White,
                BackgroundColor = ch.fromStringToColor("lightGrayPressed"),
                FontAttributes = FontAttributes.Bold,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                BorderRadius = 7,
                VerticalOptions = LayoutOptions.Center
            };
            bPublic.Clicked += BPublic_Clicked;
            bPrivate = new Button
            {
                Text = "Private",
                TextColor = Color.White,
                BackgroundColor = ch.fromStringToColor("red"),
                FontAttributes = FontAttributes.Bold,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                BorderRadius = 7,
                VerticalOptions = LayoutOptions.Center
            };
            bPrivate.Clicked += BPrivate_Clicked;
            bContinue = new Button
            {
                Text = "Continue",
                TextColor = Color.White,
                FontAttributes = FontAttributes.Bold,
                BackgroundColor = Color.Lime,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                HeightRequest = 80,
                BorderRadius = 15
            };
            bContinue.Clicked += BContinue_Clicked;

            lcouldntCreate = new Label
            {
                Text = "",
                TextColor = Color.Red,
                FontAttributes = FontAttributes.Bold,
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.Center

            };


            Content = updatePage();


        }
示例#19
0
        public ChatInfoPage(List<Tag> tagsList, ParentFrontClub club, List<FrontClubMember> usersList, bool isMember, string founderUsername, int previousRating)
        {
            this.previousRating = previousRating;
            starTap = new TapGestureRecognizer();
            starTap.Tapped += StarTap_Tapped;
            this.tagsList = tagsList;
            this.founderUsername = founderUsername;
            this.isMember = isMember;
            this.club = club;
            this.usersList = usersList;
            currentPage = "tags";
            ch = new ColorHandler();
            Title = "Info";
            bottomButton = new Button();
            BackgroundColor = ch.fromStringToColor("white");
            starImages = new List<Image>();
            for (int i = 0; i < 5; i++)
            {
                Image star = new Image
                {
                    Aspect = Aspect.AspectFit,
                    HeightRequest = 60,
                    BackgroundColor = ch.fromStringToColor("white"),
                    HorizontalOptions = LayoutOptions.FillAndExpand
                };
                if (i <= previousRating)
                {
                    star.Source = ImageSource.FromFile(ch.getStarColorString(club.clubColor));

                }
                else
                {
                    star.Source = ImageSource.FromFile(ch.getStarColorString("gray"));
                }
                if (isMember)
                {
                    star.GestureRecognizers.Add(starTap);
                }
                starImages.Add(star);
            }



            bSubscribe = new Button
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Center,
                Text = "Subscribe",
                FontAttributes = FontAttributes.Bold,
                BackgroundColor = ch.fromStringToColor("green"),
                BorderRadius = 15,
                HeightRequest = 40

            };
            bSubscribe.Clicked += BSubscribe_Clicked;
            bUnsubscribe = new Button
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Center,
                Text = "Unsubscribe",
                FontAttributes = FontAttributes.Bold,
                TextColor = ch.fromStringToColor("white"),
                BackgroundColor = ch.fromStringToColor("gray"),
                BorderRadius = 15,
                HeightRequest = 40
            };
            bUnsubscribe.Clicked += BUnsubscribe_Clicked;
            if (isMember)
            {
                this.bottomButton = bUnsubscribe;
            }
            else bottomButton = bSubscribe;
            bTags = new Button
            {
                Text = "Tags",
                TextColor = ch.fromStringToColor("red"),
                BackgroundColor = ch.fromStringToColor("white"),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                BorderRadius = 0,
                BorderColor = ch.fromStringToColor("gray")
            };
            bTags.Clicked += BTags_Clicked;
            bRating = new Button
            {
                Text = "Rating",
                TextColor = ch.fromStringToColor("gray"),
                BackgroundColor = ch.fromStringToColor("white"),
                BorderRadius = 0,
                BorderColor = ch.fromStringToColor("gray"),
                HorizontalOptions = LayoutOptions.FillAndExpand
            };
            bRating.Clicked += BRating_Clicked;
            MessagingCenter.Subscribe<ClubMemberViewCell, FrontClubMember>(this, "friendsProfilePage", async (sender, args) =>
            {
                var acc = (FrontClubMember)args;
                var account = await App.dbWrapper.GetAccount(acc.Id);
                int friendship = await App.dbWrapper.GetFriendship(acc.Id);
                var friendRequests = await App.dbWrapper.GetFriendRequests();
                for (int i = 0; i < friendRequests.Count; i++)
                {
                    if (friendship == 1)
                    {
                        if (friendRequests[i].AuthorId != acc.Id)
                        {
                            friendship = 1;
                        }
                        else
                        {
                            friendship = 3;
                        }
                    }

                }

                var accountPage = new FriendProfilePage(account, friendship);
                await Navigation.PushAsync(accountPage);

            });

            updatePage();

        }
示例#20
0
        public Tutorial2Page()
        {
            ch = new ColorHandler();
            BackgroundColor = ch.fromStringToColor("purple");
            // page 2 of tutorial
            this.Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5);
            Label topHeader = new Label
            {
                Text = "How It Works",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.End,
                FontAttributes = FontAttributes.Bold,
                FontSize = 42,
                TextColor = Color.White,
                FontFamily = Device.OnPlatform(iOS: "MarkerFelt-Thin", Android: "Droid Sans Mono", WinPhone: "Comic Sans MS"),
                BackgroundColor = Color.FromRgb(210, 61, 235)

            };
            

            Image cloudImage = new Image
            {
                Aspect = Aspect.AspectFit,
                Source = ImageSource.FromFile("page2Tutorial.png"),
                VerticalOptions = LayoutOptions.Center,
                Scale = .75,
                HorizontalOptions = LayoutOptions.Center
            };

            Label lowerHeader = new Label
            {
                Text = "Find & Join Clubs",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center,
                FontAttributes = FontAttributes.Bold,
                FontSize = 36,
                FontFamily = Device.OnPlatform(iOS: "MarkerFelt-Thin", Android: "Droid Sans Mono", WinPhone: "Comic Sans MS"),
                TextColor = Color.White
            };
            Label informerLabel = new Label
            {
                Text = "Chat and build friendships with similar people in a care-free environment.",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center,
                FontAttributes = FontAttributes.Bold,
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                TextColor = Color.White
            };

        
            StackLayout sLayout = new StackLayout
            {
                Children = {
                    topHeader,
                    cloudImage,
                    lowerHeader,
                    informerLabel                    

                },
                BackgroundColor = Color.FromRgb(210, 61, 235),
                Spacing = 20,
                Padding = new Thickness(0, 0, 0, 0)

            };


        Content =sLayout;
        }
示例#21
0
        public ClubSearchViewCell()
        {

            flagTgr = new TapGestureRecognizer();
            flagTgr.Tapped += FlagTgr_Tapped;

            ch = new ColorHandler();

            header = new Label
            {
                BackgroundColor = Color.White,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                FontAttributes = FontAttributes.Bold,
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                VerticalOptions = LayoutOptions.Center
            };
            header.SetBinding(Label.TextProperty, "Title");
            header.SetBinding(Label.TextColorProperty, "clubColor", converter: new ColorConverter());

            iFlag = new Image
            {
                Source = FileImageSource.FromFile("reportflag.png"),
                Aspect = Aspect.AspectFit,
                WidthRequest = 20,
                HeightRequest = 20,
                //  BackgroundColor = ch.fromStringToColor("red"),
                HorizontalOptions = LayoutOptions.End,
                VerticalOptions = LayoutOptions.Center,

            };
            iFlag.GestureRecognizers.Add(flagTgr);

            bRequestJoin = new Button
            {
                BorderRadius = 5,
                Text = "Join",
                FontSize = 13,
                WidthRequest = 170,
                HeightRequest = 34,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center,
                TextColor = Color.White
            };
            bRequestJoin.SetBinding(Button.BackgroundColorProperty, "clubColor", converter: new ColorConverter());
            bRequestJoin.SetBinding(Button.IsVisibleProperty, "isNotMemberNoPending");
            //  bRequestJoin.SetBinding(Button.IsEnabledProperty, "isMember", converter: new InvertBoolConverter());
            bRequestJoin.Clicked += BRequestJoin_Clicked;

            bPendingRequest = new Button
            {
                BorderRadius = 5,
                Text = "Pending Request",
                FontSize = 13,
                WidthRequest = 170,

                HeightRequest = 34,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center,
                TextColor = ch.fromStringToColor("white"),
                BackgroundColor = ch.fromStringToColor("gray"),
                IsEnabled = false
            };
            bPendingRequest.SetBinding(Button.IsVisibleProperty, "pendingInvite");


            clubTextLabel = new Label
            {
                TextColor = Color.Black,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.Center

            };
            clubTextLabel.SetBinding(Label.IsVisibleProperty, "isMember");

            clubTextLabel.SetBinding(Label.TextProperty, "mostRecentLine");

            activityTimeLabel = new Label
            {
                TextColor = ch.fromStringToColor("gray"),
                VerticalOptions = LayoutOptions.Center,
                HorizontalOptions = LayoutOptions.CenterAndExpand

            };
            activityTimeLabel.SetBinding(Label.TextProperty, "timeSinceActivity");
            Image star1 = new Image { HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.Center };
            Image star2 = new Image { HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.Center };
            Image star3 = new Image { HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.Center };
            Image star4 = new Image { HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.Center };
            Image star5 = new Image { HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.Center };
            /*
                        Image star1 = new Image { Aspect = Aspect.AspectFit };
                        Image star2 = new Image { Aspect = Aspect.AspectFit };
                        Image star3 = new Image { Aspect = Aspect.AspectFit };
                        Image star4 = new Image { Aspect = Aspect.AspectFit };
                        Image star5 = new Image { Aspect = Aspect.AspectFit };

                */
            star1.SetBinding(Image.SourceProperty, "star1");
            star2.SetBinding(Image.SourceProperty, "star2");
            star3.SetBinding(Image.SourceProperty, "star3");
            star4.SetBinding(Image.SourceProperty, "star4");
            star5.SetBinding(Image.SourceProperty, "star5");
            star1.Scale = .7;
            star2.Scale = .7;
            star3.Scale = .7;
            star4.Scale = .7;
            star5.Scale = .7;


            starStack = new StackLayout
            {
                Children =
                {
                    star1,
                    star2,
                    star3,
                    star4,
                    star5
                },
                Orientation = StackOrientation.Horizontal,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.Center,
                Spacing = 20,
                Padding = new Thickness(10, 0, 10, 0)
            };

            StackLayout cellWrapper = new StackLayout
            {
                Children =
                    {
                        new StackLayout
                        {
                            Children =
                            {
                                header,
                                iFlag
                            },
                            Padding = new Thickness(10,5,10,0),
                            Orientation = StackOrientation.Horizontal

                        },
                        clubTextLabel,
                        bRequestJoin,
                        bPendingRequest,
                        starStack,
                        activityTimeLabel
                     },
                VerticalOptions = LayoutOptions.CenterAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor = Color.White,
                Spacing = 9f

            };
            View = cellWrapper;
        }
示例#22
0
        public CommentViewCell()
        {
            dropletPressedCount = 0;
            dropletTGR = new TapGestureRecognizer();
            dropletTGR.Tapped += DropletTGR_Tapped;
            ch = new ColorHandler();
            reportUserTgr = new TapGestureRecognizer();
            reportUserTgr.Tapped += ReportUserTgr_Tapped;
            Image userEmoji = new Image
            {
                Aspect = Aspect.AspectFit,
                HorizontalOptions = LayoutOptions.Start,
                VerticalOptions = LayoutOptions.Center,
                Scale = 1,
                HeightRequest = 30

            };
            userEmoji.SetBinding(Image.SourceProperty, "UserEmoji");
            Label lUserId = new Label
            {
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Center

            };
            lUserId.SetBinding(Label.TextProperty, "AuthorUsername");
            lUserId.SetBinding(Label.TextColorProperty, "AuthorAccountColor", converter: new ColorConverter());
            Label lDropletNumber = new Label
            {
                TextColor = ch.fromStringToColor("black"),
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center

            };
            lDropletNumber.SetBinding(Label.TextProperty, "NumDroplets");

            Image dropletImage = new Image
            {
                Source = FileImageSource.FromFile("DropletFull_WhiteB.png"),
                Aspect = Aspect.AspectFit,
                HeightRequest = 25,

                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center

            };
            dropletImage.GestureRecognizers.Add(dropletTGR);

            Label lCommentText = new Label
            {
                FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
                TextColor = ch.fromStringToColor("black"),


            };
            lCommentText.SetBinding(Label.TextProperty, "Text");

            Label lReportUser = new Label
            {
                Text = "Report User",
                FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
                TextColor = ch.fromStringToColor("gray"),
                HorizontalOptions = LayoutOptions.Center
            };
            lReportUser.SetBinding(Label.IsVisibleProperty, "ShowReport");
            lReportUser.GestureRecognizers.Add(reportUserTgr);

            //lCommentText.SetBinding(Label.TextColorProperty, "TextColor", converter: new ColorConverter());
            StackLayout headerLayout = new StackLayout
            {
                Children =
                {
                    userEmoji,
                    lUserId,
                    lDropletNumber,
                    dropletImage
                },
                Orientation = StackOrientation.Horizontal,
                Spacing = 11,
                VerticalOptions = LayoutOptions.Center,
                HorizontalOptions = LayoutOptions.Fill
            };

            var commentSLayout = new StackLayout
            {
                Children =
               {
                   headerLayout,
                   new StackLayout
                   {
                       Children =
                       {
                           lCommentText,
                           lReportUser
                       },
                       Spacing = 6,
                       Padding = new Thickness(5,0,0,0)

                   }
                },
                BackgroundColor = ch.fromStringToColor("white"),
                Spacing = 11,
                Padding = new Thickness(12, 10, 10, 10),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand

            };
            commentSLayout.SetBinding(StackLayout.IsVisibleProperty, "ClubRequestBool", converter: new InvertBoolConverter());

            Label clubRequestHeader = new Label
            {
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Center,
                TextColor = ch.fromStringToColor("yellow")

            };
            clubRequestHeader.SetBinding(Label.TextProperty, "ClubRequestUsername");
            Label clubRequestText = new Label
            {
                FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
                TextColor = ch.fromStringToColor("black"),
            };
            clubRequestText.SetBinding(Label.TextProperty, "ClubRequestText");

            var bReject = new Button
            {
                BackgroundColor = ch.fromStringToColor("red"),
                Text = "Reject",
                TextColor = ch.fromStringToColor("white"),
                FontAttributes = FontAttributes.Bold,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                FontSize = 16,


            };
            bReject.SetBinding(Button.IsEnabledProperty, "IsMember");
            bReject.Clicked += BReject_Clicked;

            var bAccept = new Button
            {
                BackgroundColor = ch.fromStringToColor("green"),
                Text = "Accept",
                TextColor = ch.fromStringToColor("white"),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                FontAttributes = FontAttributes.Bold,
                FontSize = 16
            };
            bAccept.SetBinding(Button.IsEnabledProperty, "IsMember");
            bAccept.Clicked += BAccept_Clicked;
            lVoted = new Label
            {
                Text = "Thanks for voting!",
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.Center,
                TextColor = ch.fromStringToColor("black"),
                IsVisible = false
            };
            decidingButtons = new StackLayout
            {
                Children =
                {
                    bReject,
                    bAccept
                },
                Orientation = StackOrientation.Horizontal,
                Spacing = 5,
            };



            var clubRequestSLayout = new StackLayout
            {
                Children =
                {
                    clubRequestHeader,
                    clubRequestText,
                    decidingButtons,
                    lVoted
                },

                BackgroundColor = ch.fromStringToColor("white"),
                Spacing = 11,
                Padding = new Thickness(12, 10, 10, 10),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand
            };
            clubRequestSLayout.SetBinding(StackLayout.IsVisibleProperty, "ClubRequestBool");

            View = new StackLayout
            {
                Children =
                {
                    commentSLayout,
                    clubRequestSLayout
                }
            };

        }
示例#23
0
        protected override async void OnStart()
        {
            ch = new ColorHandler();
           
            var saveFileKey = new SaveFileDictionary();

            System.Diagnostics.Debug.WriteLine(FileSystem.Current.LocalStorage.Path);
            var fileSystem = FileSystem.Current.LocalStorage;
            var fileExists = await fileSystem.CheckExistsAsync("PhoneData.txt");
          //  createCleanFileSystem(fileSystem);
            if (fileExists.Equals(ExistenceCheckResult.FileExists))
            {
                IFile file = await fileSystem.GetFileAsync("PhoneData.txt");
                var data = await file.ReadAllTextAsync();
                var dataLines = data.Split('\n');
                //      var idLoc = dataLines[saveFileKey.dict["USERID"]].Split(':');
                //  string id = idLoc[1];
                string id = dataLines[saveFileKey.dict["USERID"]];
             //   if (id[id.Length - 1] == ';') id = id.Substring(0, id.Length - 2);
                System.Diagnostics.Debug.WriteLine(id);
                if (!id.Equals("a"))
                {
                    var userAccount = await dbWrapper.GetAccount(id);
                    await App.dbWrapper.LoginAccount(userAccount.Username, userAccount.Password);

                    var clubs = await App.dbWrapper.GetClubs();
                    var popularClubs = await App.dbWrapper.GetPopularClubs();
                    var newestClubs = await App.dbWrapper.GetNewestClubs();
                    var memberClubsList = await App.dbWrapper.GetAccountClubs(App.dbWrapper.GetUser().Id);
                    var pendingClubList = new List<string>();
                    //TODO check if get clubs returns all clubs
                    for (int i = 0; i < clubs.Count; i++)
                    {
                        if (await App.dbWrapper.IsPendingClubRequest(clubs[i].Id))
                        {
                            pendingClubList.Add(clubs[i].Id);
                        }

                    }
                    var firstLineCommentList = await App.getMostRecentComment(memberClubsList);
                    var navPage = new NavigationPage(new TabbedMainClubPages(clubs, memberClubsList, popularClubs, newestClubs, pendingClubList, firstLineCommentList));

                    navPage.BarBackgroundColor = ch.fromStringToColor("purple");
                    MainPage = navPage;
                }
                else
                {
                    createCleanFileSystem(fileSystem);
                }


            }
            else
            {

                createFileSystem(fileSystem);
            }


            // Handle when your app starts

        }
示例#24
0
        public Tutorial4PageRedo()
        {
            ch = new ColorHandler();
            this.Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5);

            // page 4 of tutorial
            Label topHeader = new Label
            {
                Text = "How It Works",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center,
                FontAttributes = FontAttributes.Bold,
                FontSize = 42,
                TextColor = Color.White,
                FontFamily = Device.OnPlatform(iOS: "MarkerFelt-Thin", Android: "Droid Sans Mono", WinPhone: "Comic Sans MS"),
                BackgroundColor = Color.FromRgb(210, 61, 235)

            };
            Image cloudImage = new Image
            {
                Aspect = Aspect.AspectFit,
                Source = ImageSource.FromFile("Tutorial_Competition.png"),
                VerticalOptions = LayoutOptions.Center,
                HorizontalOptions = LayoutOptions.Center,
                Scale = .75
            };


            Label lowerHeader = new Label
            {
                Text = "Achieve Greatness",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center,
                FontAttributes = FontAttributes.Bold,
                FontSize = 36,
                FontFamily = Device.OnPlatform(iOS: "MarkerFelt-Thin", Android: "Droid Sans Mono", WinPhone: "Comic Sans MS"),
                TextColor = Color.White
            };
            Label informerLabel = new Label
            {
                Text = "Earn rewards for creating popular clubs and chats! Rise through the ranks to become a Cloudclub legend!",
                XAlign = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center,
                FontAttributes = FontAttributes.Bold,
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                TextColor = Color.White
            };
            var bReturn = new Button
            {
                Text = "Finish",
                TextColor = ch.fromStringToColor("white"),
                BackgroundColor = ch.fromStringToColor("green"),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Center

            };
            bReturn.Clicked += (sender, args) =>
            {
                Navigation.PopToRootAsync();
            };


            Content = new StackLayout
            {
                Children = {
                    topHeader,
                    cloudImage,
                    lowerHeader,
                    informerLabel,
                    bReturn

                },
                BackgroundColor = Color.FromRgb(210, 61, 235),
                Spacing = 30,
                Padding = new Thickness(20, 0, 20, 20)


            };


        }
示例#25
0
        public ProfilePage()
        {
            friendsImagetgr = new TapGestureRecognizer();
            friendsImagetgr.Tapped += FriendsImagetgr_Tapped;
            newsImagetgr = new TapGestureRecognizer();
            newsImagetgr.Tapped += NewsImagetgr_Tapped;
            userTextTgr = new TapGestureRecognizer();
            userTextTgr.Tapped += UserTextTgr_Tapped;
            ch = new ColorHandler();
            friendRequests = new List<FriendRequest>();
            medals = new List<Medal>();
            this.Padding = new Thickness(0, Device.OnPlatform(10, 0, 0), 0, 0);
            BackgroundColor = ch.fromStringToColor("white");
            Account user = App.dbWrapper.GetUser();

            Label lAccountName = new Label
            {
                Text = user.Username,
                TextColor = ch.fromStringToColor(user.Color),
                FontAttributes = FontAttributes.Bold,
                FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.Center
            };

            Image userEmoji = new Image
            {
                Source = ImageSource.FromFile(user.Emoji),
                Aspect = Aspect.AspectFit,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center,
                WidthRequest = 115,
                Scale = .8
            };
            Image medalsImg = new Image
            {
                Source = ImageSource.FromFile("Medal_WhiteB.png"),
                Aspect = Aspect.AspectFit,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center,
                WidthRequest = 50
            };
            Label lMedals = new Label
            {
                Text = medals.Count.ToString(),
                TextColor = ch.fromStringToColor("yellow"),
                FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center,

            };
            var dropletPath = "DropletFull_WhiteB.png";
            if (user.NumDroplets > 0) dropletPath = "DropletFull_WhiteB.png";
            Image dropletImg = new Image
            {
                Source = ImageSource.FromFile(dropletPath),
                Aspect = Aspect.AspectFit,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center,
                WidthRequest = 50
            };
            Label lDroplet = new Label
            {
                Text = user.NumDroplets.ToString(),
                TextColor = ch.fromStringToColor("blue"),
                FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center
            };
            Label lInCloudClub = new Label
            {
                Text = "In Cloudclub",
                TextColor = ch.fromStringToColor("gray"),
                FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center
            };
            Label lNumClubs = new Label
            {
                Text = user.NumClubsIn.ToString(),
                FontSize = 42,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions = LayoutOptions.Center,
                TextColor = ch.fromStringToColor("yellow")
            };
            userText = new Label
            {
                Text = user.Description,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))

            };
            userText.GestureRecognizers.Add(userTextTgr);
            userTextEntry = new Entry
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                Text = userText.Text,
                BackgroundColor = ch.fromStringToColor("white"),
                TextColor = ch.fromStringToColor("black"),
                IsVisible = false,
            };
            userTextEntry.TextChanged += UserTextEntry_TextChanged;
            userTextEntry.Completed += UserTextEntry_Completed;
            userTextEntry.Unfocused += (sender, e) => {
                userText.Text = userTextEntry.Text;
                userTextEntry.IsVisible = false;
                userText.IsVisible = true;
            };
            Image friendsImg = new Image
            {
                Source = FileImageSource.FromFile("Friends_Profile1.png"),
                Aspect = Aspect.AspectFit,
                WidthRequest = 187,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand,

            };
            friendsImg.GestureRecognizers.Add(friendsImagetgr);

            Image newsImg = new Image
            {
                Source = FileImageSource.FromFile("News_Profile1.png"),
                Aspect = Aspect.AspectFit,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest = 187,
                VerticalOptions = LayoutOptions.FillAndExpand,
            };
            newsImg.GestureRecognizers.Add(newsImagetgr);
            var medalSLayout = new StackLayout
            {
                Children =
                {
                    medalsImg,
                    lMedals
                },
                Orientation = StackOrientation.Horizontal

            };
            var dropletSLayout = new StackLayout
            {
                Children =
                {
                    dropletImg,
                    lDroplet
                },
                Orientation = StackOrientation.Horizontal
            };
            var medalsDropletStackLayout = new StackLayout
            {
                Children =
                {
                    medalSLayout,
                    dropletSLayout
                }

            };
            var inClubSLayout = new StackLayout
            {
                Children =
                {
                    lNumClubs,
                    lInCloudClub

                },
                Padding = new Thickness(0, 30, 0, 0)

            };
            var awardsEmojiInclubSLayout = new StackLayout
            {
                Children =
                {
                    medalsDropletStackLayout,
                    userEmoji,
                    inClubSLayout
                },
                Spacing = 35,
                Orientation = StackOrientation.Horizontal


            };
            var topLayout = new StackLayout
            {
                Children =
                {
                    awardsEmojiInclubSLayout,
                    lAccountName,
                    userText,
                    userTextEntry
                },
                Padding = new Thickness(20, 20, 20, 0),
                Spacing = 25
            };
            var friendsNewsSLayout = new StackLayout
            {
                Children =
                {
                    friendsImg,
                    newsImg
                },
                Spacing = 10,
                Orientation = StackOrientation.Horizontal,
                VerticalOptions = LayoutOptions.FillAndExpand
            };
            var contentLayout = new StackLayout
            {
                Children =
                {
                    topLayout,
                    friendsNewsSLayout
                },
                Spacing = 10
            };

            Content = contentLayout;
        }