示例#1
0
        protected TaggedObject[] Select_Plural(params Selection.MaskTriple[] type)
        {
            using (Core.Externel.EditScope scope = new Core.Externel.EditScope())
            {
                var selectionResponse = Globals.TheUI.SelectionManager.SelectTaggedObjects($"{GetString("DisplayableParamSelectMessage")} {NickName}", $"{GetString("DisplayableParamSelectMessage")} {NickName}", Selection.SelectionScope.WorkPart, Selection.SelectionAction.ClearAndEnableSpecific, false, false, type, out var selectedObjects);

                if (selectionResponse == Selection.Response.Ok)
                {
                    return(selectedObjects);
                }

                return(null);
            }
        }
示例#2
0
        /// <summary>
        /// 单选时的操作
        /// </summary>
        /// <param name="type"></param>
        /// <param name="selectedObjectTag"></param>
        /// <param name="handle"></param>
        /// <returns></returns>
        protected TaggedObject Select_Singular(params Selection.MaskTriple[] type)
        {
            using (Core.Externel.EditScope scope = new Core.Externel.EditScope())
            {
                var selectionResponse = UI.GetUI().SelectionManager.SelectTaggedObject($"{GetString("DisplayableParamSelectMessage")} {NickName}", $"{GetString("DisplayableParamSelectMessage")} {NickName}", Selection.SelectionScope.WorkPart, Selection.SelectionAction.ClearAndEnableSpecific, false, false, type, out var selectedObject, out var cursor);

                if (selectionResponse == Selection.Response.ObjectSelected)
                {
                    return(selectedObject);
                }

                return(null);
            }
        }