Example #1
0
        private void UserControl_Initialized(object sender, EventArgs e)
        {
            instanceviewmodel = new IEditInstanceViewModel();
            instanceviewmodel.initTree();


            //
            cmbTree.ItemsSource = instanceviewmodel.root.subitems;
        }
Example #2
0
        ///<summary>从树和主列表中删除自身和子项, 删除的数据库中的项进入删除集合</summary>
        internal void delSelf(IEditInstanceViewModel viewModel)
        {
            while (subitems.Count > 0)
            {
                subitems[0].delSelf(viewModel);
            }

            if (isDataBase)
            {
                viewModel.deleteItems.Add(this);
            }
            parentItem.subitems.Remove(this);
        }