コード例 #1
0
        private SelectItemsResponse SelectItems(SelectTypes type, bool multiple)
        {
            SelectItemsRequestArgs args = new SelectItemsRequestArgs(type);

            args.Multiple = multiple;

            if (type == SelectTypes.Area)
            {
                if (ctlItemZFilter.UseMaxZ)
                {
                    args.UseMaxZ = true;
                    args.MaxZ    = ctlItemZFilter.MaxZ;
                }

                if (ctlItemZFilter.UseMinZ)
                {
                    args.UseMinZ = true;
                    args.MinZ    = ctlItemZFilter.MinZ;
                }
            }

            _lastResponse = null;

            ItemSelector selector = new ItemSelector();

            selector.OnSelection += new ItemSelector.ItemsSelectedtEvent(OnSelection);

            // wait for the extract to complete
            selector.SelectItems(args, true);
            WaitForSelection();

            selector.OnSelection -= new ItemSelector.ItemsSelectedtEvent(OnSelection);

            return(_lastResponse);
        }