forked from 0523ronli/Floating-Desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDI_Drag_Bundle.cs
More file actions
96 lines (83 loc) · 2.43 KB
/
DI_Drag_Bundle.cs
File metadata and controls
96 lines (83 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bachup_s_backup
{
internal class DI_Drag_Bundle : IDataObject
{
HashSet<DesktopItem> DI_content;
public DI_Drag_Bundle(HashSet<DesktopItem> dI_content) => DI_content = dI_content;
object? IDataObject.GetData(string format, bool autoConvert)
{
if (format == DataFormats.FileDrop)
{
return DI_content.Select(x => x.FilePath).ToArray();
}
else if (format == "DI_set")
{
return DI_content;
}
else
{
throw new NotImplementedException();
}
}
object? IDataObject.GetData(string format)
{
if (format == DataFormats.FileDrop)
{
return DI_content.Select(x => x.FilePath).ToArray();
}
else if (format == "DI_set")
{
return DI_content;
}
else
{
throw new NotImplementedException();
}
}
object? IDataObject.GetData(Type format)
{
throw new NotImplementedException();
}
bool IDataObject.GetDataPresent(string format, bool autoConvert)
{
return format == DataFormats.FileDrop || format == "DI_set";
}
bool IDataObject.GetDataPresent(string format)
{
return format == DataFormats.FileDrop || format == "DI_set";
}
bool IDataObject.GetDataPresent(Type format)
{
return false;
}
string[] IDataObject.GetFormats()
{
return [DataFormats.FileDrop];
}
string[] IDataObject.GetFormats(bool autoConvert)
{
return [DataFormats.FileDrop];
}
void IDataObject.SetData(string format, bool autoConvert, object? data)
{
throw new NotImplementedException();
}
void IDataObject.SetData(string format, object? data)
{
throw new NotImplementedException();
}
void IDataObject.SetData(Type format, object? data)
{
throw new NotImplementedException();
}
void IDataObject.SetData(object? data)
{
throw new NotImplementedException();
}
}
}