コード例 #1
0
        private void SaveCrudFolder()
        {
            CrudFolderViewModel viewModel = null;
            CrudFolderModel     model     = null;

            viewModel = this;

            if (viewModel != null && viewModel.CrudFolderModel != null)
            {
                model = viewModel._crudFolderModel;
            }

            //int parentId = MainWindow.Instance.DeviceTree.SelectedTreeNode.DeviceId;

            DeviceTreeModel configuration = new DeviceTreeModel()
            {
                DeviceName          = model.FolderName,
                ConfigurationType   = EnumConfigurationType.Folder,
                RegisterGroup       = null,
                ListDeviceTreeModel = new List <DeviceTreeModel>()
            };

            MainWindow.Instance.DeviceTree.SelectedTreeNode.ListDeviceTreeModel.Add(configuration);
            //MainWindow.Instance.DeviceTree.updateTree();
            MainWindow.Instance.ShowCrudFolder = false;

            MainWindow.Instance.DeviceTree.updateTree();
        }
コード例 #2
0
 public CrudFolderViewModel()
 {
     _crudFolderModel = new CrudFolderModel();
 }