Esempio n. 1
0
        private static void PasteFileListAsImage(MapNode pasteLocation)
        {
            var   fileList = Clipboard.GetFileDropList();
            Image image;

            if (fileList.Count == 1 && !pasteLocation.HasImage && ImageHelper.GetImageFromFile(fileList[0], out image))
            {
                pasteLocation.InsertImage(image, true);
            }
            else
            {
                foreach (string file in fileList)
                {
                    if (ImageHelper.GetImageFromFile(file, out image))
                    {
                        MapNode n = new MapNode(pasteLocation, String.Empty);
                        n.InsertImage(image, true);
                    }
                    else
                    {
                        MapNode n = new MapNode(pasteLocation, file);
                        n.Link = file;
                    }
                }
            }
        }