Exemplo n.º 1
0
        public override void AcceptDragDrop(object Input, object DraggedItem, System.Windows.Forms.PropertyGrid Properties, System.Windows.Forms.ListView Scene)
        {
            if (Tools.GetPropertyAtPoint(Properties.PointToClient(Cursor.Position), Properties).Label == "XMLProfile" && DraggedItem is ContentItem)
            {
                ((XTreeModel)Input).XMLProfile = ((ContentItem)DraggedItem).GenerateFullPathFilename();
            }
            else if (Tools.GetPropertyAtPoint(Properties.PointToClient(Cursor.Position), Properties).Label == "barkTexture" && DraggedItem is ContentItem)
            {
                ((XTreeModel)Input).barkTexture = ((ContentItem)DraggedItem).GenerateFilename().Replace("\\Content", "Content");
            }
            else if (Tools.GetPropertyAtPoint(Properties.PointToClient(Cursor.Position), Properties).Label == "leafTexture" && DraggedItem is ContentItem)
            {
                ((XTreeModel)Input).leafTexture = ((ContentItem)DraggedItem).GenerateFilename().Replace("\\Content", "Content");
            }

            UpdateObjectProperties(Input, Properties, Scene);
        }
Exemplo n.º 2
0
        public override void AcceptDragDrop(object Input, object DraggedItem, System.Windows.Forms.PropertyGrid Properties, System.Windows.Forms.ListView Scene)
        {
            if (Tools.GetPropertyAtPoint(Properties.PointToClient(Cursor.Position), Properties).Label == "Filename_editor" && DraggedItem is ContentItem)
            {
                ((XModel)Input).Filename = ((ContentItem)DraggedItem).GenerateFilename().Replace("\\Content", "Content");
            }

            UpdateObjectProperties(Input, Properties, Scene);
        }
Exemplo n.º 3
0
            internal override UiaCore.IRawElementProviderFragment ElementProviderFromPoint(double x, double y)
            {
                if (!_owningPropertyGrid.IsHandleCreated)
                {
                    return(null);
                }

                Point clientPoint = _owningPropertyGrid.PointToClient(new Point((int)x, (int)y));

                Control element = _owningPropertyGrid.GetElementFromPoint(clientPoint);

                if (element is not null)
                {
                    return(element.AccessibilityObject);
                }

                return(base.ElementProviderFromPoint(x, y));
            }