private void OnItemsRemoving(object sender, ItemsCancelArgs e)
        {
            if (e.Items == null)
            {
                return;
            }

            if (!Editor.ActiveWindow == this)
            {
                e.Items.Clear();
                return;
            }

            for (int i = e.Items.Count - 1; i >= 0; i--)
            {
                ProjectItem item = (ProjectItem)e.Items[i];
                if (m_project.IsStatic(item))
                {
                    e.Items.Remove(item);
                }
            }

            if (e.Items.Count == 0)
            {
                m_wm.MessageBox("Can't remove folder", "Unable to remove folders exposed from editor");
            }
        }
示例#2
0
        private void OnItemsRemoving(object sender, ItemsCancelArgs e)
        {
            if (e.Items == null)
            {
                return;
            }

            //if (!RuntimeEditorApplication.IsActiveWindow(this) && !Ru)
            //{
            //    e.Items.Clear();
            //    return;
            //}

            for (int i = e.Items.Count - 1; i >= 0; i--)
            {
                ProjectItemObjectPair item = (ProjectItemObjectPair)e.Items[i];
                if (item.ProjectItem.IsExposedFromEditor)
                {
                    e.Items.Remove(item);
                }
            }

            if (e.Items.Count == 0)
            {
                PopupWindow.Show("Can't remove item", "Unable to remove folders & resources exposed from editor", "OK");
            }
        }
        private void OnItemsRemoving(object sender, ItemsCancelArgs e)
        {
            if (e.Items == null)
            {
                return;
            }

            if (!RuntimeEditorApplication.IsActiveWindow(this))
            {
                e.Items.Clear();
                return;
            }

            for (int i = e.Items.Count - 1; i >= 0; i--)
            {
                ProjectItem item = (ProjectItem)e.Items[i];
                if (m_project.IsStatic(item))
                {
                    e.Items.Remove(item);
                }
            }

            if (e.Items.Count == 0)
            {
                PopupWindow.Show("Can't remove folder", "Unable to remove folders exposed from editor", "OK");
            }
        }
        private void OnPropertiesRemoving(object sender, ItemsCancelArgs e)
        {
            if (m_propertiesTreeView.ItemsCount > 2)
            {
                e.Items.Remove(m_emptyTop);
            }

            e.Items.Remove(m_emptyBottom);

            if (BeforePropertiesRemoved != null)
            {
                BeforePropertiesRemoved(this, EventArgs.Empty);
            }
        }
示例#5
0
        private void OnItemsRemoving(object sender, ItemsCancelArgs e)
        {
            HashSet <ObjectCtrl> objectCtrlSet = new HashSet <ObjectCtrl>(e.Items.Select <object, ObjectCtrl>((Func <object, ObjectCtrl>)(v => v as ObjectCtrl)));

            foreach (ObjectCtrl _objectCtrl in e.Items.Select <object, ObjectCtrl>((Func <object, ObjectCtrl>)(v => v as ObjectCtrl)))
            {
                this.CheckParent(objectCtrlSet, _objectCtrl);
            }
            bool isMessage = false;

            e.Items = ((IEnumerable <object>)objectCtrlSet.Where <ObjectCtrl>((Func <ObjectCtrl, bool>)(v =>
            {
                bool flag = v.OnRemoving();
                isMessage |= !flag;
                return(flag);
            }))).ToList <object>();
            if (!isMessage)
            {
                return;
            }
            MapUIContainer.PushMessageUI("アイテムがいっぱいです", 2, 1, (Action)(() => {}));
        }
示例#6
0
        protected virtual void OnItemRemoving(object sender, ItemsCancelArgs e)
        {
            if (e.Items == null)
            {
                return;
            }

            if (Editor.ActiveWindow == this)
            {
                IRuntimeEditor editor = IOC.Resolve <IRuntimeEditor>();
                editor.Delete(e.Items.OfType <ExposeToEditor>().Select(exposed => exposed.gameObject).ToArray());
            }

            for (int i = e.Items.Count - 1; i >= 0; i--)
            {
                ExposeToEditor item = (ExposeToEditor)e.Items[i];
                if (!item.CanDelete)
                {
                    e.Items.RemoveAt(i);
                }
            }
        }
 private void OnItemRemoving(object sender, ItemsCancelArgs e)
 {
 }