コード例 #1
0
        private void OverrideAddButtonClick(object sender, EventArgs e)
        {
            var selectedItems = AddObject(CurrentItems.ToArray(), out bool cancel);

            if (cancel)
            {
                return;
            }
            if (selectedItems is object[] multipleItems)
            {
                foreach (var item in multipleItems)
                {
                    newObject = item;
                    orgAddClickHandler.DynamicInvoke(sender, e);
                }
            }
            else
            {
                newObject = selectedItems;
                orgAddClickHandler.DynamicInvoke(sender, e);
            }
        }