/// <summary> /// Add new library group /// </summary> public bool AddLibraryGroup() { // get group name from Inputdialog string groupName = InputDialog.GetInputValue(Resource.GetString(Resource.Strings.EditLibraryGrpName)); if (string.IsNullOrEmpty(groupName)) { return(false); } if (DataGate.Project.LibraryGroups.Contains(groupName)) { MsgBox.Error(Resource.GetFormatString(Resource.Strings.NameAlreadyExist, "library")); return(false); } if (DataGate.AddLibraryGroup(groupName)) { RemoveButtonStatus(); lookUpLibraryGrp.Populate(groupName); //tvLibrary = new LibraryTreeControl(); tvLibrary.Populate(); tvLibrary.SetCurrentGroupEvent(); return(true); } return(false); }
/// <summary> /// Function: Load LibraryTree(Group and tree:content,and relation) /// Author : Jerry Xu /// Date : 2008-12-24 /// </summary> private void LoadGroup() { DataGate.AddLibraryGroup(lookUpLibraryGrp.EditValue as string); OnLibraryGroupChanged(); tvLibrary.Populate(); }