Beispiel #1
0
        async void PopupAddTemplate(object sender, EventArgs e)
        {
            var action = await DisplayActionSheet("Add New template", "Cancel", null, popupMenues);

            Debug.WriteLine("Action: " + action);

            if (action == popupMenues[0])
            {
                // question - answer
                QARec qar = new QARec();
                qar.Order = order++;
                compoments.Add(qar);
                this.FindByName <StackLayout>("templateHolder").Children.Add(qar);
            }
            else if (action == popupMenues[1])
            {
                // simple memo
                SimpleMemo sm = new SimpleMemo();
                sm.Order = order++;
                compoments.Add(sm);
                var stack = this.FindByName <StackLayout>("templateHolder");
                stack.Children.Add(sm);
            }
            else if (action == popupMenues[2])
            {
                // feeling
                Feeling fe = new Feeling();
                fe.Order = order++;
                compoments.Add(fe);
                this.FindByName <StackLayout>("templateHolder").Children.Add(fe);
            }
        }
Beispiel #2
0
        //get over with reading object
        public void LoadWithMeeting(Meeting data)
        {
            this.title.Text = data.Title;

            foreach (FeelingData feelingData in data.feelings)
            {
                Feeling feel = new Feeling(feelingData);
                this.FindByName <StackLayout>("templateHolder").Children.Add(feel);
            }

            foreach (QARecData qarecData in data.qarecs)
            {
                QARec qarec = new QARec(qarecData);
                this.FindByName <StackLayout>("templateHolder").Children.Add(qarec);
            }

            foreach (SimpleMemoData sdata in data.simpleMemos)
            {
                SimpleMemo sm = new SimpleMemo(sdata);
                this.FindByName <StackLayout>("templateHolder").Children.Add(sm);
            }
        }