Exemplo n.º 1
0
        public static TreeOptions Default()
        {
            TreeOptions defTreeOpt = new TreeOptions();

            defTreeOpt.TreeVisualOptions = new ObservableCollection <TreeVisualOption>(TreeVisualOption.DefaultTreeVisualOptions());
            defTreeOpt.Transparence      = 60;
            return(defTreeOpt);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Установка значений из словаря.
 /// Расчетная модель еще не задана!!!
 /// </summary>
 public void SetExtDic(DicED dicTree, Document doc)
 {
     if (dicTree == null)
     {
         return;
     }
     // Собственные значения рассчета елочек
     SetDataValues(dicTree.GetRec("TreeModelRec")?.Values, doc);
     // настроки елочек
     TreeOptions = new TreeOptions();
     TreeOptions.SetExtDic(dicTree.GetInner("TreeOptions"), doc);
 }
Exemplo n.º 3
0
        public DicED GetExtDic(Document doc)
        {
            DicED dicTree = new DicED();

            // Список значений расчета елочек
            var recTree = new RecXD("TreeModelRec", GetDataValues(doc));

            dicTree.AddRec(recTree);

            // Сохранение настроек елочек
            var dicTreeOptions = TreeOptions.GetExtDic(doc);

            dicTreeOptions.Name = "TreeOptions";
            dicTree.AddInner(dicTreeOptions);

            return(dicTree);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Инициализация расчета елочек - новая или обновление старого
        /// </summary>
        public void Initialize(InsModel insModel)
        {
            this.Model = insModel;

            // Визуализация елочек
            if (VisualTrees != null)
            {
                // Удаление старой визуализации
                VisualTrees.VisualsDelete();
                VisualTrees.TreeModel = this;
            }
            else
            {
                VisualTrees = new VisualTree(this);
                if (isVisualTreeOnOffForLoad)
                {
                    VisualTrees.VisualIsOn = isVisualTreeOnOffForLoad;
                }
            }

            if (TreeOptions == null)
            {
                TreeOptions = TreeOptions.Default();
            }

            if (Points == null)
            {
                Points = new ObservableCollection <InsPoint>();
            }

            //if (Points != null)
            //{
            //    // Очистка точек, с очисткой визуалз
            //    DeletePointsVisualIllums();
            //    Points.Clear();
            //}
            //else
            //{
            //    Points = new ObservableCollection<InsPoint>();
            //}
        }