Exemplo n.º 1
0
        internal void SelectorContentTestIsChecked()
        {
            SlideIndex = 0;

            if (m_SelectorContentTestDone.IsFalse())
            {
                m_SelectorContentTestDone = true;

                ContentTestItemsSource.Clear();

                foreach (var item in m_FullCollection)
                {
                    if (item.HasContentTest)
                    {
                        ContentTestItemsSource.Add(item);
                    }
                }

                if (ContentTestItemsSource.Any())
                {
                    ContentTestSelectedIndex = 0;

                    var gadget = ContentTestItemsSource [0];

                    if (gadget.HasContent)
                    {
                        if (gadget.HasContentTest)
                        {
                            var list = new Collection <GadgetTest> ();
                            gadget.RequestContent(list);

                            if (list.Any())
                            {
                                ContentTestTargetChanged(list [0]);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        internal void Cleanup()
        {
            Registration.CopyFrom(GadgetRegistration.CreateDefault);

            ContentTestItemsSource.Clear();
            ContentTestSelectedIndex = -1;
            ContentTestTargetCurrent.CopyFrom(GadgetTest.CreateDefault);

            ContentTargetItemsSource.Clear();
            ContentTargetSelectedIndex = -1;

            SlideIndex = -1;

            SelectorContentTestEnabled = false;
            SelectorContentTestChecked = false;

            SelectorContentTargetEnabled = false;
            SelectorContentTargetChecked = false;

            m_FullCollection.Clear();

            m_SelectorContentTestDone   = false;
            m_SelectorContentTargetDone = false;
        }