// --- Components

        /// <summary>
        /// Constructs the Table responsible for sending events and
        /// showing statistics about the Tracker
        /// </summary>
        /// <returns></returns>
        private StackLayout BuildTrackFunctionsView()
        {
            // --- Send Buttons

            var floodCell = new ActionImageCell("Send all event types", IconLoader.Load(Utils.Icon.Send));

            floodCell.Tapped += (s, e) => { TrackEvents(); };

            // --- Statistics

            _statisticsTableSection = new StatisticsTableSection();
            _statisticsTableSection.StartUpdater();
            _statisticsTableSection.UpdateStatistics();

            // --- Assemblew View

            var settingsTable = new TableView
            {
                Intent = TableIntent.Settings,
                Root   = new TableRoot
                {
                    new TableSection("Track Functions")
                    {
                        floodCell
                    },
                    _statisticsTableSection.Section
                }
            };

            return(new StackLayout
            {
                Children = { settingsTable },
                VerticalOptions = LayoutOptions.FillAndExpand
            });
        }
Example #2
0
        // --- Components

        /// <summary>
        /// Constructs the Table responsible for sending events and
        /// showing statistics about the Tracker
        /// </summary>
        /// <returns></returns>
        private StackLayout BuildTrackFunctionsView()
        {
            // --- Send Buttons

            var icSendImage = IconLoader.Load(Utils.Icon.Send);

            var selfDescribingCell = new ActionImageCell("TrackSelfDescribing", icSendImage);

            selfDescribingCell.Tapped += (s, e) => { TrackEvent(0); };
            var pageViewCell = new ActionImageCell("TrackPageView", icSendImage);

            pageViewCell.Tapped += (s, e) => { TrackEvent(1); };
            var screenViewCell = new ActionImageCell("TrackScreenView", icSendImage);

            screenViewCell.Tapped += (s, e) => { TrackEvent(2); };
            var timingCell = new ActionImageCell("TrackTiming", icSendImage);

            timingCell.Tapped += (s, e) => { TrackEvent(3); };
            var structCell = new ActionImageCell("TrackStructEvent", icSendImage);

            structCell.Tapped += (s, e) => { TrackEvent(4); };
            var ecommerceTransactionCell = new ActionImageCell("TrackEcommerceTransaction", icSendImage);

            ecommerceTransactionCell.Tapped += (s, e) => { TrackEvent(5); };

            // --- Statistics

            _statisticsTableSection = new StatisticsTableSection();
            _statisticsTableSection.StartUpdater();
            _statisticsTableSection.UpdateStatistics();

            // --- Assemblew View

            var settingsTable = new TableView
            {
                Intent = TableIntent.Settings,
                Root   = new TableRoot
                {
                    new TableSection("Event Track Functions")
                    {
                        selfDescribingCell,
                        pageViewCell,
                        screenViewCell,
                        timingCell,
                        structCell,
                        ecommerceTransactionCell
                    },
                    _statisticsTableSection.Section
                }
            };

            return(new StackLayout
            {
                Children = { settingsTable },
                VerticalOptions = LayoutOptions.FillAndExpand
            });
        }
Example #3
0
        // --- Components

        private StackLayout GetNavigation()
        {
            var icNavImage = IconLoader.Load(Utils.Icon.Nav);

            var settingsPageNav = new ActionImageCell("Tracker setup", icNavImage);

            settingsPageNav.Tapped += OnSettingsClicked;
            var singleEventsPageNav = new ActionImageCell("Single event tracking", icNavImage);

            singleEventsPageNav.Tapped += OnSingleEventsClicked;
            var floodEventsPageNav = new ActionImageCell("Flood event tracking", icNavImage);

            floodEventsPageNav.Tapped += OnFloodEventsClicked;
            var helpPageNav = new ActionImageCell("Help", icNavImage);

            helpPageNav.Tapped += OnHelpClicked;

            var navigationTable = new TableView
            {
                Intent = TableIntent.Settings,
                Root   = new TableRoot
                {
                    new TableSection("Settings")
                    {
                        settingsPageNav
                    },
                    new TableSection("Tracking")
                    {
                        singleEventsPageNav,
                        floodEventsPageNav
                    },
                    new TableSection("Misc")
                    {
                        helpPageNav
                    }
                }
            };

            return(new StackLayout
            {
                Children = { navigationTable },
                VerticalOptions = LayoutOptions.FillAndExpand
            });
        }