コード例 #1
0
ファイル: LibraryTree.cs プロジェクト: heng222/MyRepository
        /// <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);
        }
コード例 #2
0
ファイル: LibraryTree.cs プロジェクト: heng222/MyRepository
 /// <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();
 }