コード例 #1
0
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     if (itemExpanded == null)
     {
         itemExpanded = OnTreeItemExpanded;
         TI_tree.AddHandler(TreeViewItem.ExpandedEvent, itemExpanded);
     }
 }
コード例 #2
0
        //private XamDataTreeNode selected;

        private void OnTreeDataLoaded(object sender, EventArgs eventArgs)
        {
            if (TI_tree.OnTreeDataLoaded != null)
            {
                TI_tree.OnTreeDataLoaded -= OnTreeDataLoaded;
            }
            TI_tree.SelectedChanged += TI_tree_SelectedChanged;
            TI_tree.ExpandAndSelect(SelectedItem, true);
        }
コード例 #3
0
 public void Dispose()
 {
     TI_tree.Dispose();
 }
コード例 #4
0
        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            if (_selectTypesFilter == null || !_selectTypesFilter.Any())
            {
                _selectTypesFilter = Enum.GetValues(typeof(enumTypeHierarchy)).OfType <enumTypeHierarchy>().ToList();
            }

            int treeType = GlobalFreeHierarchyDictionary.TreeTypeStandartPS;

            if (SelectedItem != null)
            {
                switch (SelectedItem.Type)
                {
                case enumTypeHierarchy.Info_TI:
                    treeType = GlobalFreeHierarchyDictionary.TreeTypeStandartPS;
                    break;

                case enumTypeHierarchy.Dict_PS:
                    treeType = GlobalFreeHierarchyDictionary.TreeTypeStandartPS;
                    break;

                case enumTypeHierarchy.Formula:
                    treeType = GlobalFreeHierarchyDictionary.TreeTypeStandartTIFormula;
                    break;

                case enumTypeHierarchy.Section:
                    treeType = GlobalFreeHierarchyDictionary.TreeTypeStandartSections;

                    break;

                case enumTypeHierarchy.FormulaConstant:
                    treeType = GlobalFreeHierarchyDictionary.TreeTypeStandartTIFormula;
                    break;

                case enumTypeHierarchy.Info_TP:
                    treeType = GlobalFreeHierarchyDictionary.TreeTypeStandartGroupTP;
                    break;

                default:
                    treeType = GlobalFreeHierarchyDictionary.TreeTypeStandartPS;
                    break;
                }

                //TI_tree.WaitLoadTreeAndInit(() => { TI_tree.ExpandAndSelect(SelectedItem, false); });
                ////   TI_tree.ReloadTree(treeType);
                //// TI_tree.ExpandAndSelect(SelectedItem, false);
                ////TI_tree.


                //TI_tree.ExpandAndSelect(SelectedItem, false);
            }
            TI_tree.InitialTree_ID    = treeType;
            TI_tree.OnTreeDataLoaded += OnTreeDataLoaded;

            TI_tree.OuterSelector.SelectionTypesFilter = _selectTypesFilter;



            TI_tree.LoadTypes(EnumModuleFilter.ViewCommercialData | EnumModuleFilter.ViewDataSection);
            TI_tree.Hide_SetsManager();
        }