Esempio n. 1
0
        /// <summary>
        /// 弹出配置框
        /// </summary>
        /// <param name="ent"></param>
        public void SetMulFamily(FamilyEnt ent)
        {
            if (ent == null)
            {
                TaskDialog.Show("提示", "请选择族");
                return;
            }
            _selFamily = ent;
            List <string>            roomNames  = new List <string>();
            FilteredElementCollector collector  = new FilteredElementCollector(_doc);
            List <Element>           collection = collector.OfClass(typeof(SpatialElementTag)).ToList();

            foreach (Element elem in collector)
            {
                if (elem is RoomTag)
                {
                    RoomTag roomTag = elem as RoomTag;
                    roomNames.Add(roomTag.Room.Name);
                }
            }
            FrmSetFamilyViewModel vm = new FrmSetFamilyViewModel(roomNames);

            vm.SetConfig = SetConfig;
            FrmSetFamilyView frm = new FrmSetFamilyView(vm);

            frm.ShowDialog();
        }
Esempio n. 2
0
 public FrmSetFamilyView(FrmSetFamilyViewModel model)
 {
     InitializeComponent();
     this.DataContext = model;
 }