public AgendaGridPage() : base() { Title = AppResources.Agenda.ToUpper(); BackgroundColor = AppResources.AgendaPageBackgroundColor; var buttonLayout = new StackLayout { Orientation = StackOrientation.Horizontal, Spacing = 0, HorizontalOptions = LayoutOptions.Fill, Children = { new ContentView { Content = GetButton(AppResources.Congresso, AppResources.AgendaCongressoColor, OnCongressoClicked), WidthRequest = AppProvider.Screen.Width / 2 }, new ContentView { Content = GetButton(AppResources.Expo, AppResources.AgendaExpoColor, OnExpoClicked), WidthRequest = AppProvider.Screen.Width / 2 }, }, Padding = new Thickness(0) }; int width = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width) - 8; _eventGridView = new GridView { RowSpacing = 5, ColumnSpacing = 5, ContentPaddingBottom = 0, ContentPaddingTop = 0, ContentPaddingLeft = 0, ContentPaddingRight = 0, ItemWidth = width, ItemHeight = 200, ItemsSource = new EventsGridWrapper(AppModel.Instance.PayedEvents), ItemTemplate = new DataTemplate(typeof(EventFastCell)) }; var container = new PageViewContainer { HorizontalOptions = LayoutOptions.StartAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Content = new ContentPage { Content = _eventGridView } }; Content = new StackLayout() { Children = { buttonLayout, container } }; /* pq isso aqui?*/ AppController.Instance.DownloadExhibitorsData(null); _eventGridView.ItemSelected += OnItemSelected;; }
public ProfileHistoryPage(UserModel userModel) : base() { Model = userModel; Title = AppResources.Profile; var userHeaderView = new UserHeaderView(Model, false); int width = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width) - 10; _historyGridView = new GridView { RowSpacing = 5, ColumnSpacing = 5, ContentPaddingBottom = 0, ContentPaddingTop = 0, ContentPaddingLeft = 0, ContentPaddingRight = 0, ItemWidth = width, ItemHeight = 60, ItemsSource = AppModel.Instance.CurrentContactListWrapper, ItemTemplate = new DataTemplate(typeof(ProfileHistoryFastItemCell)) }; var container = new PageViewContainer { HorizontalOptions = LayoutOptions.StartAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Content = new ContentPage { Content = _historyGridView } }; var historylabel = new Label { FontSize = 22, Text = AppResources.ProfileHistoryHeader, TextColor = AppResources.AgendaCongressoColor, XAlign = TextAlignment.Center, FontAttributes = FontAttributes.Bold, YAlign = TextAlignment.Center, HeightRequest = 40 }; Content = new StackLayout { BackgroundColor = Color.White, Children = { userHeaderView, historylabel, container } }; UserController.Instance.UpdateProfileData(Model); }
protected override void OnAppearing() { base.OnAppearing(); DefaultDataWrapper = AppModel.Instance.CurrentConnectionsWrapper; CurrentDataWrapper = DefaultDataWrapper; var searchBarView = new SearchBarView(); searchBarView.Clear += OnSearchClear; searchBarView.Search += OnSearch; int width = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width) - 20; _gridView = new GridView { RowSpacing = 5, ColumnSpacing = 5, ContentPaddingBottom = 0, ContentPaddingTop = 0, ContentPaddingLeft = 0, ContentPaddingRight = 0, ItemWidth = width, ItemHeight = 60, ItemsSource = CurrentDataWrapper, ItemTemplate = new DataTemplate(typeof(ConnectionFastCell)) }; var container = new PageViewContainer { HorizontalOptions = LayoutOptions.StartAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Content = new ContentPage { Content = _gridView } }; Content = new StackLayout { Orientation = StackOrientation.Vertical, Children = { new UserHeaderView(CurrentDataWrapper.LoginedUser, false), searchBarView, container } }; AppController.Instance.DownloadAllUsers(null); UserController.Instance.UpdateProfileData(AppModel.Instance.CurrentUser, true); }
protected override void OnAppearing() { base.OnAppearing(); var searchBarView = new SearchBarView(); searchBarView.Padding = new Thickness(20, 20, 20, 5); searchBarView.Clear += OnSearchClear; searchBarView.Search += OnSearch; int width = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width) - 20; DefaultDataWrapper = new ExhibitorsGridWrapper(AppModel.Instance.Exhibitors); CurrentDataWrapper = DefaultDataWrapper; _gridView = new GridView { RowSpacing = 5, ColumnSpacing = 5, ContentPaddingBottom = 0, ContentPaddingTop = 0, ContentPaddingLeft = 0, ContentPaddingRight = 0, ItemWidth = width, ItemHeight = 60, ItemsSource = CurrentDataWrapper, ItemTemplate = new DataTemplate(typeof(ExhibitorFastCell)) }; var container = new PageViewContainer { HorizontalOptions = LayoutOptions.StartAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Content = new ContentPage { Content = _gridView } }; Content = new StackLayout() { Children = { searchBarView, container } }; AppController.Instance.DownloadExhibitorsData(null); }
protected override void OnAppearing() { base.OnAppearing(); AppModel.Instance.CurrentContactListWrapper.CollectionChanged += OnItemsChanged; _emptyList = new Label { FontSize = 24, XAlign = TextAlignment.Center, TextColor = Color.White, Text = AppResources.ContactListIsEmpty, IsVisible = AppModel.Instance.CurrentContactListWrapper.IsEmpty }; int width = AppProvider.Screen.ConvertPixelsToDp(AppProvider.Screen.Width) - 10; _gridView = new GridView { RowSpacing = 5, ColumnSpacing = 5, ContentPaddingBottom = 0, ContentPaddingTop = 0, ContentPaddingLeft = 0, ContentPaddingRight = 0, ItemWidth = width, ItemHeight = 60, ItemsSource = AppModel.Instance.CurrentContactListWrapper, ItemTemplate = new DataTemplate(typeof(UserFastCell)), }; var container = new PageViewContainer { HorizontalOptions = LayoutOptions.StartAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Content = new ContentPage { Content = _gridView } }; Content = new StackLayout { Orientation = StackOrientation.Vertical, Children = { _emptyList, container } }; }