Exemple #1
0
        private async Task ResolveInvite(View owner, GroupTileDto data, bool value)
        {
            var requestResult = await new HomeService().ResolveGroupInvite(data.Id, value);

            if (requestResult.IsSuccessful)
            {
                Invites.Children.Remove(owner);
                HomePage.UserData.Invited.Remove(data);
            }
        }
Exemple #2
0
        private void AddPendingElement(GroupTileDto data)
        {
            var layout = new StackLayout();
            var frame  = new Frame {
                Content = layout, BackgroundColor = Color.WhiteSmoke, Padding = 6, Margin = 2
            };

            layout.Children.Add(new Label {
                Text = data.Name, FontSize = NamedSize.Medium.GetFormattedLabelFontSize()
            });

            Pending.Children.Add(frame);
        }
Exemple #3
0
        private void AddGroup(GroupTileDto data)
        {
            var label = new Label {
                Text = data.Name, FontSize = NamedSize.Medium.GetFormattedLabelFontSize()
            };
            var gesture = new TapGestureRecognizer {
                CommandParameter = data
            };
            var frame = new Frame {
                Content = label, BackgroundColor = Color.WhiteSmoke, Padding = 6, Margin = 2
            };

            gesture.Tapped += (sender, args) => OnGroupSelect(sender, args);
            label.GestureRecognizers.Add(gesture);

            UserGroups.Children.Add(frame);
        }
Exemple #4
0
 private void AddInvitesElement(GroupTileDto data) => Invites.Children.Add(ComponentsBuilder.BuildAcceptableFrame(data.Name, data, OnInviteAccept, OnInviteReject));