551 references to DataFormats
Microsoft.VisualBasic.Tests (8)
Microsoft\VisualBasic\MyServices\ClipboardProxyTests.cs (8)
10
using DataFormats = System.Windows.Forms.
DataFormats
;
47
clipboard.SetData(
DataFormats
.UnicodeText, data);
48
clipboard.ContainsData(
DataFormats
.UnicodeText).Should().Be(System.Windows.Forms.Clipboard.ContainsData(
DataFormats
.UnicodeText));
49
clipboard.GetData(
DataFormats
.UnicodeText).Should().Be(System.Windows.Forms.Clipboard.GetData(
DataFormats
.UnicodeText));
58
clipboard.GetDataObject().GetData(
DataFormats
.UnicodeText).Should().Be(System.Windows.Forms.Clipboard.GetDataObject()?.GetData(
DataFormats
.UnicodeText));
System.Windows.Forms (132)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (7)
7136
DataFormats
.Html,
7137
DataFormats
.Text,
7138
DataFormats
.UnicodeText,
7139
DataFormats
.CommaSeparatedValue
7424
if (string.Equals(format,
DataFormats
.Html, StringComparison.OrdinalIgnoreCase))
7723
if (string.Equals(format,
DataFormats
.Html, StringComparison.OrdinalIgnoreCase))
8139
if (string.Equals(format,
DataFormats
.Html, StringComparison.OrdinalIgnoreCase))
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
1316
if (string.Equals(format,
DataFormats
.Html, StringComparison.OrdinalIgnoreCase))
1353
bool csv = string.Equals(format,
DataFormats
.CommaSeparatedValue, StringComparison.OrdinalIgnoreCase);
1355
string.Equals(format,
DataFormats
.Text, StringComparison.OrdinalIgnoreCase) ||
1356
string.Equals(format,
DataFormats
.UnicodeText, StringComparison.OrdinalIgnoreCase))
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (4)
138
if (string.Equals(format,
DataFormats
.Html, StringComparison.OrdinalIgnoreCase))
171
bool csv = string.Equals(format,
DataFormats
.CommaSeparatedValue, StringComparison.OrdinalIgnoreCase);
173
string.Equals(format,
DataFormats
.Text, StringComparison.OrdinalIgnoreCase) ||
174
string.Equals(format,
DataFormats
.UnicodeText, StringComparison.OrdinalIgnoreCase))
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (4)
108
if (string.Equals(format,
DataFormats
.Html, StringComparison.OrdinalIgnoreCase))
143
bool csv = string.Equals(format,
DataFormats
.CommaSeparatedValue, StringComparison.OrdinalIgnoreCase);
145
string.Equals(format,
DataFormats
.Text, StringComparison.OrdinalIgnoreCase) ||
146
string.Equals(format,
DataFormats
.UnicodeText, StringComparison.OrdinalIgnoreCase))
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
1606
public bool CanPaste(
DataFormats
.Format clipFormat)
2587
public void Paste(
DataFormats
.Format clipFormat)
System\Windows\Forms\OLE\Clipboard.cs (24)
188
/// Indicates whether there is data on the Clipboard in the <see cref="
DataFormats
.WaveAudio"/> format.
190
public static bool ContainsAudio() => ContainsData(
DataFormats
.WaveAudioConstant);
203
/// Indicates whether there is data on the Clipboard that is in the <see cref="
DataFormats
.FileDrop"/> format
206
public static bool ContainsFileDropList() => ContainsData(
DataFormats
.FileDrop, autoConvert: true);
209
/// Indicates whether there is data on the Clipboard that is in the <see cref="
DataFormats
.Bitmap"/> format
212
public static bool ContainsImage() => ContainsData(
DataFormats
.Bitmap, autoConvert: true);
232
public static Stream? GetAudioStream() => GetTypedDataIfAvailable<Stream>(
DataFormats
.WaveAudioConstant);
260
/// The format of the data to retrieve. See the <see cref="
DataFormats
"/> class for a set of predefined data formats.
439
if (GetTypedDataIfAvailable<string[]?>(
DataFormats
.FileDropConstant) is string[] strings)
453
public static Image? GetImage() => GetTypedDataIfAvailable<Image>(
DataFormats
.Bitmap);
488
/// Clears the <see cref="Clipboard"/> and then adds data in the <see cref="
DataFormats
.WaveAudio"/> format.
493
/// Clears the <see cref="Clipboard"/> and then adds data in the <see cref="
DataFormats
.WaveAudio"/> format.
496
SetDataObject(new DataObject(
DataFormats
.WaveAudioConstant, audioStream.OrThrowIfNull()), copy: true);
533
/// and you are using a custom format or <see cref="
DataFormats
.Serializable"/>,
573
/// Clears the Clipboard and then adds a collection of file names in the <see cref="
DataFormats
.FileDrop"/> format.
595
SetDataObject(new DataObject(
DataFormats
.FileDropConstant, autoConvert: true, filePathsArray), copy: true);
599
/// Clears the Clipboard and then adds an <see cref="Image"/> in the <see cref="
DataFormats
.Bitmap"/> format.
602
SetDataObject(new DataObject(
DataFormats
.BitmapConstant, autoConvert: true, image.OrThrowIfNull()), copy: true);
622
TextDataFormat.Text =>
DataFormats
.Text,
623
TextDataFormat.UnicodeText =>
DataFormats
.UnicodeText,
624
TextDataFormat.Rtf =>
DataFormats
.Rtf,
625
TextDataFormat.Html =>
DataFormats
.Html,
626
TextDataFormat.CommaSeparatedValue =>
DataFormats
.CommaSeparatedValue,
627
_ =>
DataFormats
.UnicodeText,
System\Windows\Forms\OLE\DataObject.Composition.NativeToWinFormsAdapter.cs (12)
109
DataFormats
.TextConstant or
DataFormats
.RtfConstant or
DataFormats
.OemTextConstant =>
111
DataFormats
.HtmlConstant => ReadUtf8StringFromHGLOBAL(hglobal),
112
DataFormats
.UnicodeTextConstant => ReadStringFromHGLOBAL(hglobal, unicode: true),
113
DataFormats
.FileDropConstant => ReadFileListFromHDROP((HDROP)(nint)hglobal),
302
cfFormat = (ushort)
DataFormats
.GetFormat(format).Id,
362
cfFormat = (ushort)
DataFormats
.GetFormat(format).Id,
415
if (format !=
DataFormats
.BitmapConstant)
422
cfFormat = (ushort)
DataFormats
.GetFormat(format).Id,
601
string name =
DataFormats
.GetFormat(formatEtc.cfFormat).Name;
657
cfFormat = (ushort)(
DataFormats
.GetFormat(format).Id),
System\Windows\Forms\OLE\DataObject.Composition.WinFormsToNativeAdapter.cs (13)
51
string formatName =
DataFormats
.GetFormat(pformatetcIn->cfFormat).Name;
113
string format =
DataFormats
.GetFormat(pformatetc->cfFormat).Name;
149
if (format.Equals(
DataFormats
.Bitmap) && data is Bitmap bitmap)
215
if (!_dataObject.GetDataPresent(
DataFormats
.GetFormat(pformatetc->cfFormat).Name))
248
string formatName =
DataFormats
.GetFormat(pformatetc->cfFormat).Name;
309
DataFormats
.TextConstant or
DataFormats
.RtfConstant or
DataFormats
.OemTextConstant
311
DataFormats
.HtmlConstant
313
DataFormats
.UnicodeTextConstant
315
DataFormats
.FileDropConstant
321
DataFormats
.DibConstant when data is Image
326
_ when format ==
DataFormats
.SerializableConstant || data is ISerializable || data.GetType().IsSerializable
System\Windows\Forms\OLE\DataObject.cs (54)
117
/// <param name="format">The format associated with the data. See <see cref="
DataFormats
"/> for predefined formats.</param>
128
/// and you are using a custom format or <see cref="
DataFormats
.Serializable"/>
181
|| format is
DataFormats
.TextConstant
182
or
DataFormats
.UnicodeTextConstant
183
or
DataFormats
.RtfConstant
184
or
DataFormats
.HtmlConstant
185
or
DataFormats
.OemTextConstant
186
or
DataFormats
.FileDropConstant
202
format is
DataFormats
.StringConstant
204
or
DataFormats
.CsvConstant
205
or
DataFormats
.DibConstant
206
or
DataFormats
.DifConstant
207
or
DataFormats
.LocaleConstant
208
or
DataFormats
.PenDataConstant
209
or
DataFormats
.RiffConstant
210
or
DataFormats
.SymbolicLinkConstant
211
or
DataFormats
.TiffConstant
212
or
DataFormats
.WaveAudioConstant
213
or
DataFormats
.BitmapConstant
214
or
DataFormats
.EmfConstant
215
or
DataFormats
.PaletteConstant
216
or
DataFormats
.WmfConstant;
307
public virtual bool ContainsAudio() => GetDataPresent(
DataFormats
.WaveAudioConstant, autoConvert: false);
309
public virtual bool ContainsFileDropList() => GetDataPresent(
DataFormats
.FileDropConstant, autoConvert: true);
311
public virtual bool ContainsImage() => GetDataPresent(
DataFormats
.BitmapConstant, autoConvert: true);
323
public virtual Stream? GetAudioStream() => GetData(
DataFormats
.WaveAudio, autoConvert: false) as Stream;
328
if (GetData(
DataFormats
.FileDropConstant, autoConvert: true) is string[] strings)
336
public virtual Image? GetImage() => GetData(
DataFormats
.Bitmap, autoConvert: true) as Image;
351
SetData(
DataFormats
.WaveAudioConstant, autoConvert: false, audioStream.OrThrowIfNull());
357
SetData(
DataFormats
.FileDropConstant, true, strings);
360
public virtual void SetImage(Image image) => SetData(
DataFormats
.BitmapConstant, true, image.OrThrowIfNull());
413
DataFormats
.TextConstant
414
or
DataFormats
.UnicodeTextConstant
415
or
DataFormats
.StringConstant
416
or
DataFormats
.RtfConstant
417
or
DataFormats
.HtmlConstant
418
or
DataFormats
.OemTextConstant => typeof(string) == typeof(T),
420
DataFormats
.FileDropConstant
424
DataFormats
.BitmapConstant or BitmapFullName =>
432
TextDataFormat.UnicodeText =>
DataFormats
.UnicodeTextConstant,
433
TextDataFormat.Rtf =>
DataFormats
.RtfConstant,
434
TextDataFormat.Html =>
DataFormats
.HtmlConstant,
435
TextDataFormat.CommaSeparatedValue =>
DataFormats
.CsvConstant,
436
_ =>
DataFormats
.UnicodeTextConstant,
445
DataFormats
.TextConstant or
DataFormats
.UnicodeTextConstant or
DataFormats
.StringConstant =>
447
DataFormats
.StringConstant,
448
DataFormats
.UnicodeTextConstant,
449
DataFormats
.TextConstant
451
DataFormats
.FileDropConstant or CF_DEPRECATED_FILENAME or CF_DEPRECATED_FILENAMEW =>
453
DataFormats
.FileDropConstant,
457
DataFormats
.BitmapConstant or BitmapFullName =>
460
DataFormats
.BitmapConstant
System\Windows\Forms\OLE\DataObject.DataStore.cs (4)
96
if (data is Bitmap && format.Equals(
DataFormats
.Dib))
98
format = autoConvert ?
DataFormats
.Bitmap : throw new NotSupportedException(SR.DataObjectDibNotSupported);
117
&& !_mappedData.ContainsKey(
DataFormats
.Serializable))
119
SetData(
DataFormats
.Serializable, data);
System\Windows\Forms\OLE\DataObject.FormatEnumerator.cs (2)
46
cfFormat = (short)(ushort)
DataFormats
.GetFormat(format).Id,
50
tymed = format.Equals(
DataFormats
.Bitmap) ? ComTypes.TYMED.TYMED_GDI : ComTypes.TYMED.TYMED_HGLOBAL
System\Windows\Forms\OLE\DragDropHelper.cs (1)
233
string formatName =
DataFormats
.GetFormat(format.cfFormat).Name;
System\Windows\Forms\OLE\ITypedDataObject.cs (1)
58
/// A string that specifies what format to retrieve the data as. See the <see cref="
DataFormats
"/> class for
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (1)
203
return [NestedToolboxItemFormat, DataFormat,
DataFormats
.Serializable, ExtraInfoFormat];
System.Windows.Forms.Tests (366)
System\Windows\Forms\ClipboardTests.cs (10)
171
Clipboard.GetData(
DataFormats
.WaveAudio).Should().BeOfType<MemoryStream>().Which.ToArray().Should().Equal(audioBytes);
173
Clipboard.ContainsData(
DataFormats
.WaveAudio).Should().BeTrue();
183
Clipboard.GetData(
DataFormats
.WaveAudio).Should().BeNull();
185
Clipboard.ContainsData(
DataFormats
.WaveAudio).Should().BeTrue();
203
Clipboard.GetData(
DataFormats
.WaveAudio).Should().BeOfType<MemoryStream>().Which.ToArray().Should().Equal(audioBytes);
205
Clipboard.ContainsData(
DataFormats
.WaveAudio).Should().BeTrue();
215
Clipboard.GetData(
DataFormats
.WaveAudio).Should().BeNull();
217
Clipboard.ContainsData(
DataFormats
.WaveAudio).Should().BeTrue();
666
dataObject.GetData(
DataFormats
.Text).Should().Be(testString);
1021
cfFormat = (short)
DataFormats
.GetFormat("testFormat").Id,
System\Windows\Forms\DataFormatsTests.ClipboardTests.cs (3)
25
DataFormats
.Format result =
DataFormats
.GetFormat(id);
26
Assert.Equal(result,
DataFormats
.GetFormat(id));
System\Windows\Forms\DataFormatsTests.cs (58)
13
yield return new object[] {
DataFormats
.Bitmap, "Bitmap" };
14
yield return new object[] {
DataFormats
.CommaSeparatedValue, "Csv" };
15
yield return new object[] {
DataFormats
.Dib, "DeviceIndependentBitmap" };
16
yield return new object[] {
DataFormats
.Dif, "DataInterchangeFormat" };
17
yield return new object[] {
DataFormats
.EnhancedMetafile, "EnhancedMetafile" };
18
yield return new object[] {
DataFormats
.FileDrop, "FileDrop" };
19
yield return new object[] {
DataFormats
.Html, "HTML Format" };
20
yield return new object[] {
DataFormats
.Locale, "Locale" };
21
yield return new object[] {
DataFormats
.MetafilePict, "MetaFilePict" };
22
yield return new object[] {
DataFormats
.OemText, "OEMText" };
23
yield return new object[] {
DataFormats
.Palette, "Palette" };
24
yield return new object[] {
DataFormats
.PenData, "PenData" };
25
yield return new object[] {
DataFormats
.Riff, "RiffAudio" };
26
yield return new object[] {
DataFormats
.Rtf, "Rich Text Format" };
27
yield return new object[] {
DataFormats
.Serializable, "WindowsForms10PersistentObject" };
28
yield return new object[] {
DataFormats
.StringFormat, "System.String" };
29
yield return new object[] {
DataFormats
.SymbolicLink, "SymbolicLink" };
30
yield return new object[] {
DataFormats
.Text, "Text" };
31
yield return new object[] {
DataFormats
.Tiff, "TaggedImageFileFormat" };
32
yield return new object[] {
DataFormats
.UnicodeText, "UnicodeText" };
33
yield return new object[] {
DataFormats
.WaveAudio, "WaveAudio" };
45
yield return new object[] {
DataFormats
.Bitmap, "Bitmap", 2 };
46
yield return new object[] {
DataFormats
.Dib, "DeviceIndependentBitmap", 8 };
47
yield return new object[] {
DataFormats
.Dif, "DataInterchangeFormat", 5 };
48
yield return new object[] {
DataFormats
.EnhancedMetafile, "EnhancedMetafile", 14 };
49
yield return new object[] {
DataFormats
.FileDrop, "FileDrop", 15 };
50
yield return new object[] {
DataFormats
.Locale, "Locale", 16 };
51
yield return new object[] {
DataFormats
.MetafilePict, "MetaFilePict", 3 };
52
yield return new object[] {
DataFormats
.OemText, "OEMText", 7 };
53
yield return new object[] {
DataFormats
.Palette, "Palette", 9 };
54
yield return new object[] {
DataFormats
.PenData, "PenData", 10 };
55
yield return new object[] {
DataFormats
.Riff, "RiffAudio", 11 };
56
yield return new object[] {
DataFormats
.SymbolicLink, "SymbolicLink", 4 };
57
yield return new object[] {
DataFormats
.Text, "Text", 1 };
58
yield return new object[] {
DataFormats
.Tiff, "TaggedImageFileFormat", 6 };
59
yield return new object[] {
DataFormats
.UnicodeText, "UnicodeText", 13 };
60
yield return new object[] {
DataFormats
.WaveAudio, "WaveAudio", 12 };
67
DataFormats
.Format result =
DataFormats
.GetFormat(format);
68
Assert.Same(result,
DataFormats
.GetFormat(format.ToLowerInvariant()));
73
Assert.Same(result,
DataFormats
.GetFormat(format));
78
yield return new object[] {
DataFormats
.CommaSeparatedValue, "Csv" };
79
yield return new object[] {
DataFormats
.Html, "HTML Format" };
80
yield return new object[] {
DataFormats
.Rtf, "Rich Text Format" };
81
yield return new object[] {
DataFormats
.Serializable, "WindowsForms10PersistentObject" };
82
yield return new object[] {
DataFormats
.StringFormat, "System.String" };
90
DataFormats
.Format result =
DataFormats
.GetFormat(format);
91
Assert.Same(result,
DataFormats
.GetFormat(format));
92
Assert.Same(result,
DataFormats
.GetFormat(format.ToLowerInvariant()));
102
Assert.Same(result,
DataFormats
.GetFormat(result.Id));
108
Assert.Throws<ArgumentException>("format", () =>
DataFormats
.GetFormat(""));
109
Assert.Throws<ArgumentNullException>("format", () =>
DataFormats
.GetFormat(null));
121
Assert.Throws<Win32Exception>(() =>
DataFormats
.GetFormat(format));
152
DataFormats
.Format result =
DataFormats
.GetFormat(id);
153
Assert.Equal(result,
DataFormats
.GetFormat(id));
164
var format = new
DataFormats
.Format(name, id);
System\Windows\Forms\DataObjectExtensionsTests.cs (14)
20
Action tryGetData2 = () => DataObjectExtensions.TryGetData<string>(dataObject: null!,
DataFormats
.Text, out _);
22
Action tryGetData3 = () => DataObjectExtensions.TryGetData<string>(dataObject: null!,
DataFormats
.Dib, autoConvert: true, out _);
24
Action tryGetData4 = () => DataObjectExtensions.TryGetData<string>(dataObject: null!,
DataFormats
.EmfConstant, autoConvert: false, out _);
26
Action tryGetData5 = () => DataObjectExtensions.TryGetData<string>(dataObject: null!,
DataFormats
.UnicodeText, Resolver, autoConvert: true, out _);
28
Action tryGetData6 = () => DataObjectExtensions.TryGetData<string>(dataObject: null!,
DataFormats
.Serializable, Resolver, autoConvert: false, out _);
47
Action tryGetData = () => dataObject.TryGetData<string>(
DataFormats
.Text, out _);
57
Action tryGetData = () => dataObject.TryGetData<string>(
DataFormats
.CommaSeparatedValue, autoConvert, out _);
67
Action tryGetData = () => dataObject.TryGetData<string>(
DataFormats
.UnicodeText, Resolver, autoConvert, out _);
84
dataObject.TryGetData(
DataFormats
.Dib, out Bitmap? bitmap).Should().BeFalse();
93
dataObject.TryGetData(
DataFormats
.Serializable, autoConvert, out Font? font).Should().BeFalse();
102
dataObject.TryGetData(
DataFormats
.SymbolicLink, Resolver, autoConvert, out DateTime? date).Should().BeFalse();
118
dataObject.TryGetData(
DataFormats
.Dib, out Bitmap? _).Should().BeFalse();
127
dataObject.TryGetData(
DataFormats
.FileDrop, autoConvert, out int? _).Should().BeFalse();
136
dataObject.TryGetData(
DataFormats
.SymbolicLink, Resolver, autoConvert, out DateTime? date).Should().BeFalse();
System\Windows\Forms\DataObjectTests.ClipboardTests.cs (22)
89
theoryData.Add(format, null, format ==
DataFormats
.FileDrop, format ==
DataFormats
.Bitmap);
90
theoryData.Add(format, "input", format ==
DataFormats
.FileDrop, format ==
DataFormats
.Bitmap);
120
dataObject.ContainsAudio().Should().Be(format ==
DataFormats
.WaveAudio);
123
dataObject.ContainsText().Should().Be(format ==
DataFormats
.UnicodeText);
124
dataObject.ContainsText(TextDataFormat.Text).Should().Be(format ==
DataFormats
.UnicodeText);
125
dataObject.ContainsText(TextDataFormat.UnicodeText).Should().Be(format ==
DataFormats
.UnicodeText);
126
dataObject.ContainsText(TextDataFormat.Rtf).Should().Be(format ==
DataFormats
.Rtf);
127
dataObject.ContainsText(TextDataFormat.Html).Should().Be(format ==
DataFormats
.Html);
128
dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().Be(format ==
DataFormats
.CommaSeparatedValue);
144
theoryData.Add(format, autoConvert, null, format ==
DataFormats
.FileDrop, format ==
DataFormats
.Bitmap);
145
theoryData.Add(format, autoConvert, "input", format ==
DataFormats
.FileDrop, format ==
DataFormats
.Bitmap);
180
dataObject.ContainsAudio().Should().Be(format ==
DataFormats
.WaveAudio);
183
dataObject.ContainsText().Should().Be(format ==
DataFormats
.UnicodeText);
184
dataObject.ContainsText(TextDataFormat.Text).Should().Be(format ==
DataFormats
.UnicodeText);
185
dataObject.ContainsText(TextDataFormat.UnicodeText).Should().Be(format ==
DataFormats
.UnicodeText);
186
dataObject.ContainsText(TextDataFormat.Rtf).Should().Be(format ==
DataFormats
.Rtf);
187
dataObject.ContainsText(TextDataFormat.Html).Should().Be(format ==
DataFormats
.Html);
188
dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().Be(format ==
DataFormats
.CommaSeparatedValue);
System\Windows\Forms\DataObjectTests.cs (246)
31
DataFormats
.CommaSeparatedValue,
32
DataFormats
.Dib,
33
DataFormats
.Dif,
34
DataFormats
.PenData,
35
DataFormats
.Riff,
36
DataFormats
.Tiff,
37
DataFormats
.WaveAudio,
38
DataFormats
.SymbolicLink,
39
DataFormats
.StringFormat,
40
DataFormats
.Bitmap,
41
DataFormats
.EnhancedMetafile,
42
DataFormats
.FileDrop,
43
DataFormats
.Html,
44
DataFormats
.MetafilePict,
45
DataFormats
.OemText,
46
DataFormats
.Palette,
47
DataFormats
.Rtf,
48
DataFormats
.Text,
49
DataFormats
.UnicodeText,
60
DataFormats
.Serializable,
80
.Setup(o => o.GetDataPresent(
DataFormats
.WaveAudio, false))
84
mockDataObject.Verify(o => o.GetDataPresent(
DataFormats
.WaveAudio, false), Times.Once());
103
.Setup(o => o.GetDataPresent(
DataFormats
.FileDrop, true))
107
mockDataObject.Verify(o => o.GetDataPresent(
DataFormats
.FileDrop, true), Times.Once());
126
.Setup(o => o.GetDataPresent(
DataFormats
.Bitmap, true))
130
mockDataObject.Verify(o => o.GetDataPresent(
DataFormats
.Bitmap, true), Times.Once());
169
theoryData.Add(TextDataFormat.Text,
DataFormats
.UnicodeText, result);
170
theoryData.Add(TextDataFormat.UnicodeText,
DataFormats
.UnicodeText, result);
171
theoryData.Add(TextDataFormat.Rtf,
DataFormats
.Rtf, result);
172
theoryData.Add(TextDataFormat.Html,
DataFormats
.Html, result);
173
theoryData.Add(TextDataFormat.CommaSeparatedValue,
DataFormats
.CommaSeparatedValue, result);
228
dataObject.SetData(
DataFormats
.WaveAudio, result);
241
.Setup(o => o.GetData(
DataFormats
.WaveAudio, false))
245
mockDataObject.Verify(o => o.GetData(
DataFormats
.WaveAudio, false), Times.Once());
422
DataFormats
.CommaSeparatedValue,
441
string format =
DataFormats
.Bitmap;
453
{
DataFormats
.CommaSeparatedValue, true },
455
{
DataFormats
.CommaSeparatedValue, false },
477
string format =
DataFormats
.Bitmap;
502
string format =
DataFormats
.Bitmap;
656
dataObject.SetData(
DataFormats
.FileDrop, result);
669
.Setup(o => o.GetData(
DataFormats
.FileDrop, true))
673
mockDataObject.Verify(o => o.GetData(
DataFormats
.FileDrop, true), Times.Once());
826
dataObject.SetData(
DataFormats
.Bitmap, result);
839
.Setup(o => o.GetData(
DataFormats
.Bitmap, true))
843
mockDataObject.Verify(o => o.GetData(
DataFormats
.Bitmap, true), Times.Once());
866
dataObject.SetData(
DataFormats
.UnicodeText, result);
896
{ TextDataFormat.Text,
DataFormats
.UnicodeText, null, string.Empty },
897
{ TextDataFormat.Text,
DataFormats
.UnicodeText, new(), string.Empty },
898
{ TextDataFormat.Text,
DataFormats
.UnicodeText, string.Empty, string.Empty },
899
{ TextDataFormat.Text,
DataFormats
.UnicodeText, " ", " " },
900
{ TextDataFormat.Text,
DataFormats
.UnicodeText, "a", "a" },
902
{ TextDataFormat.UnicodeText,
DataFormats
.UnicodeText, null, string.Empty },
903
{ TextDataFormat.UnicodeText,
DataFormats
.UnicodeText, new(), string.Empty },
904
{ TextDataFormat.UnicodeText,
DataFormats
.UnicodeText, string.Empty, string.Empty },
905
{ TextDataFormat.UnicodeText,
DataFormats
.UnicodeText, " ", " " },
906
{ TextDataFormat.UnicodeText,
DataFormats
.UnicodeText, "a", "a" },
908
{ TextDataFormat.Rtf,
DataFormats
.Rtf, null, string.Empty },
909
{ TextDataFormat.Rtf,
DataFormats
.Rtf, new(), string.Empty },
910
{ TextDataFormat.Rtf,
DataFormats
.Rtf, string.Empty, string.Empty },
911
{ TextDataFormat.Rtf,
DataFormats
.Rtf, " ", " " },
912
{ TextDataFormat.Rtf,
DataFormats
.Rtf, "a", "a" },
914
{ TextDataFormat.Html,
DataFormats
.Html, null, string.Empty },
915
{ TextDataFormat.Html,
DataFormats
.Html, new(), string.Empty },
916
{ TextDataFormat.Html,
DataFormats
.Html, string.Empty, string.Empty },
917
{ TextDataFormat.Html,
DataFormats
.Html, " ", " " },
918
{ TextDataFormat.Html,
DataFormats
.Html, "a", "a" },
920
{ TextDataFormat.CommaSeparatedValue,
DataFormats
.CommaSeparatedValue, null, string.Empty },
921
{ TextDataFormat.CommaSeparatedValue,
DataFormats
.CommaSeparatedValue, new(), string.Empty },
922
{ TextDataFormat.CommaSeparatedValue,
DataFormats
.CommaSeparatedValue, string.Empty, string.Empty },
923
{ TextDataFormat.CommaSeparatedValue,
DataFormats
.CommaSeparatedValue, " ", " " },
924
{ TextDataFormat.CommaSeparatedValue,
DataFormats
.CommaSeparatedValue, "a", "a" },
975
dataObject.GetData(
DataFormats
.WaveAudio, autoConvert: true).Should().BeOfType<MemoryStream>().Subject.ToArray().Should().Equal(audioBytes);
976
dataObject.GetData(
DataFormats
.WaveAudio, autoConvert: false).Should().BeOfType<MemoryStream>().Subject.ToArray().Should().Equal(audioBytes);
979
dataObject.GetDataPresent(
DataFormats
.WaveAudio, autoConvert: true).Should().BeTrue();
980
dataObject.GetDataPresent(
DataFormats
.WaveAudio, autoConvert: false).Should().BeTrue();
1004
.Setup(o => o.SetData(
DataFormats
.WaveAudio, false, It.IsAny<MemoryStream>()))
1008
mockDataObject.Verify(o => o.SetData(
DataFormats
.WaveAudio, false, It.IsAny<MemoryStream>()), Times.Once());
1033
dataObject.GetData(
DataFormats
.WaveAudio, autoConvert: true).Should().BeSameAs(audioStream);
1034
dataObject.GetData(
DataFormats
.WaveAudio, autoConvert: false).Should().BeSameAs(audioStream);
1037
dataObject.GetDataPresent(
DataFormats
.WaveAudio, autoConvert: true).Should().BeTrue();
1038
dataObject.GetDataPresent(
DataFormats
.WaveAudio, autoConvert: false).Should().BeTrue();
1050
.Setup(o => o.SetData(
DataFormats
.WaveAudio, false, audioStream))
1053
mockDataObject.Verify(o => o.SetData(
DataFormats
.WaveAudio, false, audioStream), Times.Once());
1062
.Setup(o => o.SetData(
DataFormats
.WaveAudio, false, audioStream))
1066
mockDataObject.Verify(o => o.SetData(
DataFormats
.WaveAudio, false, audioStream), Times.Once());
1081
{ new Mock<ISerializable>(MockBehavior.Strict).Object,
DataFormats
.Serializable }
1123
dataObject.GetData(
DataFormats
.Serializable, autoConvert: false).Should().Be(data1);
1124
dataObject.GetData(
DataFormats
.Serializable, autoConvert: true).Should().Be(data1);
1128
dataObject.GetDataPresent(
DataFormats
.Serializable, autoConvert: false).Should().BeTrue();
1129
dataObject.GetDataPresent(
DataFormats
.Serializable, autoConvert: true).Should().BeTrue();
1170
theoryData.Add(format, null, format ==
DataFormats
.FileDrop, format ==
DataFormats
.Bitmap);
1171
theoryData.Add(format, "input", format ==
DataFormats
.FileDrop, format ==
DataFormats
.Bitmap);
1201
dataObject.ContainsAudio().Should().Be(format ==
DataFormats
.WaveAudio);
1204
dataObject.ContainsText().Should().Be(format ==
DataFormats
.UnicodeText);
1205
dataObject.ContainsText(TextDataFormat.Text).Should().Be(format ==
DataFormats
.UnicodeText);
1206
dataObject.ContainsText(TextDataFormat.UnicodeText).Should().Be(format ==
DataFormats
.UnicodeText);
1207
dataObject.ContainsText(TextDataFormat.Rtf).Should().Be(format ==
DataFormats
.Rtf);
1208
dataObject.ContainsText(TextDataFormat.Html).Should().Be(format ==
DataFormats
.Html);
1209
dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().Be(format ==
DataFormats
.CommaSeparatedValue);
1213
[InlineData(
DataFormats
.SerializableConstant, null)]
1214
[InlineData(
DataFormats
.SerializableConstant, "input")]
1257
dataObject.SetData(
DataFormats
.Dib, autoConvert: true, image);
1260
dataObject.GetData(
DataFormats
.Bitmap, autoConvert: true).Should().BeSameAs(image);
1261
dataObject.GetData(
DataFormats
.Bitmap, autoConvert: false).Should().BeSameAs(image);
1264
dataObject.GetData(
DataFormats
.Dib, autoConvert: true).Should().BeNull();
1265
dataObject.GetData(
DataFormats
.Dib, autoConvert: false).Should().BeNull();
1268
dataObject.GetDataPresent(
DataFormats
.Bitmap, autoConvert: true).Should().BeTrue();
1269
dataObject.GetDataPresent(
DataFormats
.Bitmap, autoConvert: false).Should().BeTrue();
1272
dataObject.GetDataPresent(
DataFormats
.Dib, autoConvert: true).Should().BeFalse();
1273
dataObject.GetDataPresent(
DataFormats
.Dib, autoConvert: false).Should().BeFalse();
1314
theoryData.Add(format, autoConvert, null, format ==
DataFormats
.FileDrop, format ==
DataFormats
.Bitmap);
1315
theoryData.Add(format, autoConvert, "input", format ==
DataFormats
.FileDrop, format ==
DataFormats
.Bitmap);
1350
dataObject.ContainsAudio().Should().Be(format ==
DataFormats
.WaveAudio);
1353
dataObject.ContainsText().Should().Be(format ==
DataFormats
.UnicodeText);
1354
dataObject.ContainsText(TextDataFormat.Text).Should().Be(format ==
DataFormats
.UnicodeText);
1355
dataObject.ContainsText(TextDataFormat.UnicodeText).Should().Be(format ==
DataFormats
.UnicodeText);
1356
dataObject.ContainsText(TextDataFormat.Rtf).Should().Be(format ==
DataFormats
.Rtf);
1357
dataObject.ContainsText(TextDataFormat.Html).Should().Be(format ==
DataFormats
.Html);
1358
dataObject.ContainsText(TextDataFormat.CommaSeparatedValue).Should().Be(format ==
DataFormats
.CommaSeparatedValue);
1366
[InlineData(
DataFormats
.SerializableConstant, false, "input")]
1367
[InlineData(
DataFormats
.SerializableConstant, false, null)]
1368
[InlineData(
DataFormats
.SerializableConstant, true, "input")]
1369
[InlineData(
DataFormats
.SerializableConstant, true, null)]
1394
dataObject.ContainsAudio().Should().Be(format ==
DataFormats
.WaveAudio);
1410
dataObject.SetData(
DataFormats
.Dib, autoConvert: true, image);
1413
dataObject.GetData(
DataFormats
.Bitmap, autoConvert: true).Should().BeSameAs(image);
1414
dataObject.GetData(
DataFormats
.Bitmap, autoConvert: false).Should().BeSameAs(image);
1417
dataObject.GetData(
DataFormats
.Dib, autoConvert: true).Should().BeNull();
1418
dataObject.GetData(
DataFormats
.Dib, autoConvert: false).Should().BeNull();
1421
dataObject.GetDataPresent(
DataFormats
.Bitmap, autoConvert: true).Should().BeTrue();
1422
dataObject.GetDataPresent(
DataFormats
.Bitmap, autoConvert: false).Should().BeTrue();
1425
dataObject.GetDataPresent(
DataFormats
.Dib, autoConvert: true).Should().BeFalse();
1426
dataObject.GetDataPresent(
DataFormats
.Dib, autoConvert: false).Should().BeFalse();
1516
((Action)(() => dataObject.SetData(
DataFormats
.Dib, false, new Bitmap(10, 10))))
1534
dataObject.GetData(
DataFormats
.FileDrop, autoConvert: true).Should().BeEquivalentTo(filePaths.Cast<string>());
1535
dataObject.GetData(
DataFormats
.FileDrop, autoConvert: false).Should().BeEquivalentTo(filePaths.Cast<string>());
1542
dataObject.GetDataPresent(
DataFormats
.FileDrop, autoConvert: true).Should().BeTrue();
1543
dataObject.GetDataPresent(
DataFormats
.FileDrop, autoConvert: false).Should().BeTrue();
1559
.Setup(o => o.SetData(
DataFormats
.FileDrop, true, It.IsAny<string[]>()))
1562
mockDataObject.Verify(o => o.SetData(
DataFormats
.FileDrop, true, It.IsAny<string[]>()), Times.Once());
1571
.Setup(o => o.SetData(
DataFormats
.FileDrop, true, It.IsAny<string[]>()))
1575
mockDataObject.Verify(o => o.SetData(
DataFormats
.FileDrop, true, It.IsAny<string[]>()), Times.Once());
1594
dataObject.GetData(
DataFormats
.Bitmap, autoConvert: true).Should().BeSameAs(image);
1595
dataObject.GetData(
DataFormats
.Bitmap, autoConvert: false).Should().BeSameAs(image);
1598
dataObject.GetData(
DataFormats
.Dib, autoConvert: true).Should().BeNull();
1599
dataObject.GetData(
DataFormats
.Dib, autoConvert: false).Should().BeNull();
1602
dataObject.GetDataPresent(
DataFormats
.Bitmap, autoConvert: true).Should().BeTrue();
1603
dataObject.GetDataPresent(
DataFormats
.Bitmap, autoConvert: false).Should().BeTrue();
1606
dataObject.GetDataPresent(
DataFormats
.Dib, autoConvert: true).Should().BeFalse();
1607
dataObject.GetDataPresent(
DataFormats
.Dib, autoConvert: false).Should().BeFalse();
1620
.Setup(o => o.SetData(
DataFormats
.Bitmap, true, image))
1623
mockDataObject.Verify(o => o.SetData(
DataFormats
.Bitmap, true, image), Times.Once());
1633
.Setup(o => o.SetData(
DataFormats
.Bitmap, true, image))
1637
mockDataObject.Verify(o => o.SetData(
DataFormats
.Bitmap, true, image), Times.Once());
1662
dataObject.GetData(
DataFormats
.UnicodeText, autoConvert: true).Should().BeSameAs(textData);
1663
dataObject.GetData(
DataFormats
.UnicodeText, autoConvert: false).Should().BeSameAs(textData);
1664
dataObject.GetData(
DataFormats
.Text, autoConvert: true).Should().BeSameAs(textData);
1665
dataObject.GetData(
DataFormats
.Text, autoConvert: false).Should().BeNull();
1666
dataObject.GetData(
DataFormats
.StringFormat, autoConvert: true).Should().BeSameAs(textData);
1667
dataObject.GetData(
DataFormats
.StringFormat, autoConvert: false).Should().BeNull();
1668
dataObject.GetData(
DataFormats
.Rtf, autoConvert: true).Should().BeNull();
1669
dataObject.GetData(
DataFormats
.Rtf, autoConvert: false).Should().BeNull();
1670
dataObject.GetData(
DataFormats
.Html, autoConvert: true).Should().BeNull();
1671
dataObject.GetData(
DataFormats
.Html, autoConvert: false).Should().BeNull();
1672
dataObject.GetData(
DataFormats
.CommaSeparatedValue, autoConvert: true).Should().BeNull();
1673
dataObject.GetData(
DataFormats
.CommaSeparatedValue, autoConvert: false).Should().BeNull();
1676
dataObject.GetDataPresent(
DataFormats
.UnicodeText, autoConvert: true).Should().BeTrue();
1677
dataObject.GetDataPresent(
DataFormats
.UnicodeText, autoConvert: false).Should().BeTrue();
1678
dataObject.GetDataPresent(
DataFormats
.Text, autoConvert: true).Should().BeFalse();
1679
dataObject.GetDataPresent(
DataFormats
.Text, autoConvert: false).Should().BeFalse();
1680
dataObject.GetDataPresent(
DataFormats
.StringFormat, autoConvert: true).Should().BeFalse();
1681
dataObject.GetDataPresent(
DataFormats
.StringFormat, autoConvert: false).Should().BeFalse();
1682
dataObject.GetDataPresent(
DataFormats
.Rtf, autoConvert: true).Should().BeFalse();
1683
dataObject.GetDataPresent(
DataFormats
.Rtf, autoConvert: false).Should().BeFalse();
1684
dataObject.GetDataPresent(
DataFormats
.Html, autoConvert: true).Should().BeFalse();
1685
dataObject.GetDataPresent(
DataFormats
.Html, autoConvert: false).Should().BeFalse();
1686
dataObject.GetDataPresent(
DataFormats
.CommaSeparatedValue, autoConvert: true).Should().BeFalse();
1687
dataObject.GetDataPresent(
DataFormats
.CommaSeparatedValue, autoConvert: false).Should().BeFalse();
1711
.Setup(o => o.SetData(
DataFormats
.UnicodeText, false, textData))
1715
mockDataObject.Verify(o => o.SetData(
DataFormats
.UnicodeText, false, textData), Times.Once());
1741
dataObject.GetData(
DataFormats
.UnicodeText, autoConvert: true).Should().Be(expectedUnicodeText);
1742
dataObject.GetData(
DataFormats
.UnicodeText, autoConvert: false).Should().Be(expectedUnicodeText);
1743
dataObject.GetData(
DataFormats
.Text, autoConvert: true).Should().Be(expectedUnicodeText);
1744
dataObject.GetData(
DataFormats
.Text, autoConvert: false).Should().BeNull();
1745
dataObject.GetData(
DataFormats
.StringFormat, autoConvert: true).Should().Be(expectedUnicodeText);
1746
dataObject.GetData(
DataFormats
.StringFormat, autoConvert: false).Should().BeNull();
1747
dataObject.GetData(
DataFormats
.Rtf, autoConvert: true).Should().Be(expectedRtfText);
1748
dataObject.GetData(
DataFormats
.Rtf, autoConvert: false).Should().Be(expectedRtfText);
1749
dataObject.GetData(
DataFormats
.Html, autoConvert: true).Should().Be(expectedHtmlText);
1750
dataObject.GetData(
DataFormats
.Html, autoConvert: false).Should().Be(expectedHtmlText);
1751
dataObject.GetData(
DataFormats
.CommaSeparatedValue, autoConvert: true).Should().Be(expectedCsvText);
1752
dataObject.GetData(
DataFormats
.CommaSeparatedValue, autoConvert: false).Should().Be(expectedCsvText);
1755
dataObject.GetDataPresent(
DataFormats
.UnicodeText, autoConvert: true).Should().Be(expectedUnicodeText is not null);
1756
dataObject.GetDataPresent(
DataFormats
.UnicodeText, autoConvert: false).Should().Be(expectedUnicodeText is not null);
1757
dataObject.GetDataPresent(
DataFormats
.Text, autoConvert: true).Should().BeFalse();
1758
dataObject.GetDataPresent(
DataFormats
.Text, autoConvert: false).Should().BeFalse();
1759
dataObject.GetDataPresent(
DataFormats
.StringFormat, autoConvert: true).Should().BeFalse();
1760
dataObject.GetDataPresent(
DataFormats
.StringFormat, autoConvert: false).Should().BeFalse();
1761
dataObject.GetDataPresent(
DataFormats
.Rtf, autoConvert: true).Should().Be(expectedRtfText is not null);
1762
dataObject.GetDataPresent(
DataFormats
.Rtf, autoConvert: false).Should().Be(expectedRtfText is not null);
1763
dataObject.GetDataPresent(
DataFormats
.Html, autoConvert: true).Should().Be(expectedHtmlText is not null);
1764
dataObject.GetDataPresent(
DataFormats
.Html, autoConvert: false).Should().Be(expectedHtmlText is not null);
1765
dataObject.GetDataPresent(
DataFormats
.CommaSeparatedValue, autoConvert: true).Should().Be(expectedCsvText is not null);
1766
dataObject.GetDataPresent(
DataFormats
.CommaSeparatedValue, autoConvert: false).Should().Be(expectedCsvText is not null);
1774
theoryData.Add(textData, TextDataFormat.Text,
DataFormats
.UnicodeText);
1775
theoryData.Add(textData, TextDataFormat.UnicodeText,
DataFormats
.UnicodeText);
1776
theoryData.Add(textData, TextDataFormat.Rtf,
DataFormats
.Rtf);
1777
theoryData.Add(textData, TextDataFormat.Html,
DataFormats
.Html);
1778
theoryData.Add(textData, TextDataFormat.CommaSeparatedValue,
DataFormats
.CommaSeparatedValue);
1841
data.GetData(
DataFormats
.EnhancedMetafile).Should().BeNull();
2024
{
DataFormats
.Bitmap, TYMED.TYMED_GDI },
2025
{
DataFormats
.CommaSeparatedValue, TYMED.TYMED_HGLOBAL },
2026
{
DataFormats
.Dib, TYMED.TYMED_HGLOBAL },
2027
{
DataFormats
.Dif, TYMED.TYMED_HGLOBAL },
2028
{
DataFormats
.EnhancedMetafile, TYMED.TYMED_HGLOBAL },
2029
{
DataFormats
.FileDrop, TYMED.TYMED_HGLOBAL },
2032
{
DataFormats
.Html, TYMED.TYMED_HGLOBAL },
2033
{
DataFormats
.Locale, TYMED.TYMED_HGLOBAL },
2034
{
DataFormats
.MetafilePict, TYMED.TYMED_HGLOBAL },
2035
{
DataFormats
.OemText, TYMED.TYMED_HGLOBAL },
2036
{
DataFormats
.Palette, TYMED.TYMED_HGLOBAL },
2037
{
DataFormats
.PenData, TYMED.TYMED_HGLOBAL },
2038
{
DataFormats
.Riff, TYMED.TYMED_HGLOBAL },
2039
{
DataFormats
.Rtf, TYMED.TYMED_HGLOBAL },
2040
{
DataFormats
.Serializable, TYMED.TYMED_HGLOBAL },
2041
{
DataFormats
.StringFormat, TYMED.TYMED_HGLOBAL },
2042
{
DataFormats
.SymbolicLink, TYMED.TYMED_HGLOBAL },
2043
{
DataFormats
.Text, TYMED.TYMED_HGLOBAL },
2044
{
DataFormats
.Tiff, TYMED.TYMED_HGLOBAL },
2045
{
DataFormats
.UnicodeText, TYMED.TYMED_HGLOBAL },
2046
{
DataFormats
.WaveAudio, TYMED.TYMED_HGLOBAL }
2084
result[0].cfFormat.Should().Be(unchecked((short)(ushort)(
DataFormats
.GetFormat(format1).Id)));
2166
.Returns(["Format1",
DataFormats
.Bitmap, "Format2"]);
2187
result[0].cfFormat.Should().Be(unchecked((short)(ushort)(
DataFormats
.GetFormat("Format1").Id)));
2197
result[0].cfFormat.Should().Be(unchecked((short)(ushort)(
DataFormats
.GetFormat("Format2").Id)));
2274
result[0].cfFormat.Should().Be(unchecked((short)(ushort)(
DataFormats
.GetFormat(format1).Id)));
2371
{ TextDataFormat.Rtf, (short)
DataFormats
.GetFormat(
DataFormats
.Rtf).Id },
2372
{ TextDataFormat.Html, (short)
DataFormats
.GetFormat(
DataFormats
.Html).Id }
2821
DataObject native = new(
DataFormats
.Locale, value);
System\Windows\Forms\RichTextBoxTests.ClipboardTests.cs (6)
46
richTextBox1.Paste(
DataFormats
.GetFormat(
DataFormats
.Text));
58
richTextBox1.Paste(
DataFormats
.GetFormat(
DataFormats
.Text));
79
richTextBox1.Paste(
DataFormats
.GetFormat(
DataFormats
.Rtf));
System\Windows\Forms\RichTextBoxTests.cs (7)
7841
yield return new object[] {
DataFormats
.GetFormat(
DataFormats
.Palette), false };
7842
yield return new object[] { new
DataFormats
.Format("UnknownName", int.MaxValue), false };
7847
public void RichTextBox_CanPaste_Invoke_ReturnsExpected(
DataFormats
.Format format, bool expected)
7856
public void RichTextBox_CanPaste_InvokeWithHandle_ReturnsExpected(
DataFormats
.Format format, bool expected)
7889
Assert.Equal(expected, control.CanPaste(
DataFormats
.GetFormat(
DataFormats
.Text)));
System.Windows.Forms.TestUtilities (20)
DataObjectTestHelpers.cs (20)
16
DataFormats
.Text,
17
DataFormats
.UnicodeText,
18
DataFormats
.StringConstant,
19
DataFormats
.Rtf,
20
DataFormats
.Html,
21
DataFormats
.OemText,
22
DataFormats
.FileDrop,
29
DataFormats
.Serializable,
36
DataFormats
.CommaSeparatedValue,
37
DataFormats
.Dib,
38
DataFormats
.Dif,
39
DataFormats
.PenData,
40
DataFormats
.Riff,
41
DataFormats
.Tiff,
42
DataFormats
.WaveAudio,
43
DataFormats
.SymbolicLink,
44
DataFormats
.EnhancedMetafile,
45
DataFormats
.MetafilePict,
46
DataFormats
.Palette
51
DataFormats
.Bitmap,
System.Windows.Forms.UI.IntegrationTests (10)
DragDropTests.cs (10)
288
if (e.Data?.GetDataPresent(
DataFormats
.Serializable) ?? false)
295
if (e.Data?.GetDataPresent(
DataFormats
.Serializable) ?? false)
298
data = (ListViewItem?)e.Data?.GetData(
DataFormats
.Serializable);
312
data.SetData(
DataFormats
.Serializable, listViewItem);
1089
DataObject data = new(
DataFormats
.FileDrop, dropFiles);
1107
&& e.Data.GetDataPresent(
DataFormats
.FileDrop)
1108
&& e.Data.GetData(
DataFormats
.FileDrop) is string[] fileNames
1122
&& e.Data.GetDataPresent(
DataFormats
.FileDrop)
1123
&& e.Data.GetData(
DataFormats
.FileDrop) is string[] fileNames
1149
DataObject data = new(
DataFormats
.FileDrop, dropFiles);
TrimTest (3)
Form1.cs (3)
19
if (e.Data is { } dataObject && dataObject.GetDataPresent(
DataFormats
.UnicodeText))
27
if (e.Data is { } dataObject && dataObject.GetDataPresent(
DataFormats
.UnicodeText))
35
if (e.Data is { } dataObject && dataObject.GetData(
DataFormats
.UnicodeText) is string text)
WinFormsControlsTest (11)
DragDrop.cs (11)
112
if (e.Data.GetDataPresent(
DataFormats
.FileDrop)
113
&& e.Data.GetData(
DataFormats
.FileDrop) is string[] files
159
if (e.Data.GetDataPresent(
DataFormats
.FileDrop)
160
&& e.Data.GetData(
DataFormats
.FileDrop) is string[] files
252
else if (e.Data.GetDataPresent(
DataFormats
.FileDrop)
253
&& e.Data.GetData(
DataFormats
.FileDrop) is string[] files
294
else if (e.Data.GetDataPresent(
DataFormats
.FileDrop)
295
&& e.Data.GetData(
DataFormats
.FileDrop) is string[] files
317
if (e.Data.GetDataPresent(
DataFormats
.FileDrop)
346
&& e.Data.GetDataPresent(
DataFormats
.FileDrop)
537
DataObject data = new(
DataFormats
.FileDrop,