public override bool ReinitWithArguments(GrtValue value) { InitializingControls = true; try { Backend = new RoleEditorBE(GrtManager, value); // (Re) Initialize backend. roleTreeBE = RoleEditorBackend.get_role_tree(); roleTreeBE.refresh(); roleObjectListWrapper = RoleEditorBackend.get_object_list(); roleObjectListWrapper.refresh(); rolePrivilegeListWrapper = RoleEditorBackend.get_privilege_list(); rolePrivilegeListWrapper.refresh(); if (roleTreeModel != null) { roleTreeModel.DetachEvents(); } roleTreeModel = new SimpleGrtTreeModel(rolesTreeView, roleTreeBE, false); roleTreeModel.AddColumn(roleNameNodeControl, (int)RoleTreeBE.Columns.Name, false); rolesTreeView.Model = roleTreeModel; if (roleObjectListModel != null) { roleObjectListModel.DetachEvents(); } roleObjectListModel = new SimpleGrtListModel(roleObjectsTreeView, roleObjectListWrapper, objectIconNodeControl, false); roleObjectListModel.AddColumn(objectNameNodeControl, (int)RoleObjectListWrapper.Columns.Name, false); roleObjectsTreeView.Model = roleObjectListModel; RefreshFormData(); } finally { InitializingControls = false; } Invalidate(); return(true); }
public override bool ReinitWithArguments(GrtValue value) { InitializingControls = true; try { Backend = new RoleEditorBE(GrtManager, value); // (Re) Initialize backend. roleTreeBE = RoleEditorBackend.get_role_tree(); roleTreeBE.refresh(); roleObjectListWrapper = RoleEditorBackend.get_object_list(); roleObjectListWrapper.refresh(); rolePrivilegeListWrapper = RoleEditorBackend.get_privilege_list(); rolePrivilegeListWrapper.refresh(); if (roleTreeModel != null) roleTreeModel.DetachEvents(); roleTreeModel = new SimpleGrtTreeModel(rolesTreeView, roleTreeBE, false); roleTreeModel.AddColumn(roleNameNodeControl, (int)RoleTreeBE.Columns.Name, false); rolesTreeView.Model = roleTreeModel; if (roleObjectListModel != null) roleObjectListModel.DetachEvents(); roleObjectListModel = new SimpleGrtListModel(roleObjectsTreeView, roleObjectListWrapper, objectIconNodeControl, false); roleObjectListModel.AddColumn(objectNameNodeControl, (int)RoleObjectListWrapper.Columns.Name, false); roleObjectsTreeView.Model = roleObjectListModel; RefreshFormData(); } finally { InitializingControls = false; } Invalidate(); return true; }