Esempio n. 1
0
        public void AsListView(bool isBeforeActivity)
        {
            ItemLayout = new StackLayout();
            StackLayout resultLayout = new StackLayout();

            foreach (ActivityItem item in ThisActivity.ItemList)
            {
                if (isBeforeActivity == item.AskBeforeActivity)
                {
                    CreateActivityItem(item);
                }
                else if (!isBeforeActivity)
                {
                    InputItem   input  = new InputItem(this, item);
                    StackLayout result = input.AsResult();
                    resultLayout.Children.Add(result);
                }
            }

            if (!isBeforeActivity)
            {
                content.Children.Add(resultLayout);
            }

            ItemContent.Children.Add(ItemLayout);
            if (isBeforeActivity)
            {
                AddPlayButton(ItemContent);
            }

            ItemContent.IsVisible = !isBeforeActivity;
            content.Children.Add(ItemContent);

            this.Content = content;
        }
Esempio n. 2
0
        public void AsTimerView()
        {
            ItemLayout = new StackLayout();

            foreach (ActivityItem item in ThisActivity.ItemList)
            {
                if (item.AskBeforeActivity)
                {
                    InputItem   input  = new InputItem(this, item);
                    StackLayout result = input.AsResult();
                    ItemLayout.Children.Add(result);
                }
            }

            content.Children.Add(ItemLayout);
            this.Content = content;
        }