Provides a format-independant machanism for transfering data with support for outlook messages and attachments.
Inheritance: System.Windows.Forms.IDataObject
Beispiel #1
0
        private void Parse()
        {
            if (!_isValid)
            {
                throw new Exception("DropData does not contain any files");
            }

            if (!_parsed)
            {
                if (!_dataObject.GetDataPresent("FileDrop"))
                {
                    _oleDropData = new OleDropData(_dataObject);

                    if (_dataObject.GetDataPresent("FileGroupDescriptorW"))
                    {
                        _filenames = (string[])_oleDropData.GetData("FileGroupDescriptorW");
                    }
                    else
                    {
                        _filenames = (string[])_oleDropData.GetData("FileGroupDescriptor");
                    }
                }
                else
                {
                    _filenames = (string[])_dataObject.GetData("FileDrop");
                }

                _parsed = true;
            }
        }
Beispiel #2
0
        private void Parse()
        {
            if (!_isValid)
                throw new Exception("DropData does not contain any files");

            if (!_parsed)
            {
                if (!_dataObject.GetDataPresent("FileDrop"))
                {
                    _oleDropData = new OleDropData(_dataObject);

                    if (_dataObject.GetDataPresent("FileGroupDescriptorW"))
                        _filenames = (string[])_oleDropData.GetData("FileGroupDescriptorW");
                    else
                        _filenames = (string[])_oleDropData.GetData("FileGroupDescriptor");
                }
                else
                {
                    _filenames = (string[])_dataObject.GetData("FileDrop");
                }

                _parsed = true;
            }
        }