Esempio n. 1
0
        internal void Cleanup()
        {
            GadgetItemsSource.Clear();
            GadgetCheckedCollection.Clear();

            m_CurrentEditGadget.CopyFrom(GadgetTest.CreateDefault);
        }
Esempio n. 2
0
        void SortItemsSourceCollection()
        {
            var list = GadgetItemsSource
                       .OrderBy(p => p.GadgetInfo)
                       .ToList()
            ;

            GadgetItemsSource.Clear();

            foreach (var item in list)
            {
                GadgetItemsSource.Add(item);
            }
        }
Esempio n. 3
0
        void MaterialChanged()
        {
            if (m_CurrentMaterialGadget.ValidateId)
            {
                GadgetItemsSource.Clear();

                foreach (var gadgetTest in GadgetFullCollection)
                {
                    if (gadgetTest.Material.Equals(m_CurrentMaterialGadget.Material, StringComparison.InvariantCulture))
                    {
                        var checkedItem = IsChecked(gadgetTest.Id);

                        if (checkedItem.ValidateId.IsFalse())
                        {
                            if (gadgetTest.Enabled)
                            {
                                if (gadgetTest.Busy.IsFalse())
                                {
                                    // only Target content
                                    if (gadgetTest.HasContentTarget)
                                    {
                                        gadgetTest.Material = m_CurrentMaterialGadget.Material;

                                        AddGadget(gadgetTest);
                                    }
                                }
                            }
                        }

                        else
                        {
                            AddGadget(checkedItem);
                        }
                    }
                }

                UpdateCurrentEditGadget();
                SortItemsSourceCollection();
            }
        }