Inheritance: FlatRedBall.Glue.GuiDisplay.PropertyGridDisplayer
Ejemplo n.º 1
0
        private void HandleDroppedImageFiles(object sender, DragEventArgs e, string[] fileNames)
        {
            TreeView tree = (TreeView)sender;

            // We could check this deep in the functions that care about it, but
            // we want to check this before any popups appear
            bool isCtrlDown = (Control.ModifierKeys & Keys.Control) != 0;

            Point pt = new Point(e.X, e.Y);

            pt = tree.PointToClient(pt);
            TreeNode targetNode = tree.GetNodeAt(pt);

            if (targetNode != null && fileNames.Any())
            {
                string creationReport;


                bool isValidDrop = targetNode.Tag is AnimationFrameSave ||
                                   targetNode.Tag is AnimationChainSave;

                if (isValidDrop)
                {
                    string folder;

                    bool alreadySaidYes = false;

                    foreach (var fileName in fileNames)
                    {
                        string fileNameCopy = fileName;

                        bool shouldProceed =
                            AnimationFrameDisplayer.TryAskToMoveFileRelativeToAnimationChainFile(alreadySaidYes, ref fileNameCopy, out folder);

                        if (shouldProceed)
                        {
                            if (AnimationFrameDisplayer.ShouldAskUserToCopyFile(fileName))
                            {
                                alreadySaidYes = true;
                            }


                            if (targetNode.Tag is AnimationFrameSave)
                            {
                                HandleDroppedImageOnAnimationFrame(targetNode, folder, fileNameCopy);
                            }
                            else if (targetNode.Tag is AnimationChainSave)
                            {
                                HandleDroppedImageOnAnimationChain(targetNode, folder, fileNameCopy, isCtrlDown);
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public PropertyGridManager()
 {
     mAnimationFrameDisplayer = new AnimationFrameDisplayer();
     mAnimationChainDisplayer = new AnimationChainDisplayer();
 }
Ejemplo n.º 3
0
 public PropertyGridManager()
 {
     mAnimationFrameDisplayer = new AnimationFrameDisplayer();
     mAnimationChainDisplayer = new AnimationChainDisplayer();
 }