-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDefinitions.h
115 lines (94 loc) · 2.26 KB
/
Definitions.h
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#pragma once
#define DEFAULT_SNAPSHOT L"Assets/no_snapshot.png"
#define EXPORT_FOLDER L"VBA10 Export"
using namespace Windows::Storage;
namespace VBA10
{
public delegate void ROMSelectedDelegate(StorageFile ^file, StorageFolder ^folder);
[Windows::UI::Xaml::Data::BindableAttribute]
public ref class StorageFolderModel sealed
{
private:
public:
property StorageFolder ^Folder;
property Platform::String ^Name
{
Platform::String ^get()
{
return this->Folder->DisplayName;
}
}
property Platform::String ^Path
{
Platform::String ^get()
{
return this->Folder->Path;
}
}
StorageFolderModel(StorageFolder ^folder);
};
[Windows::UI::Xaml::Data::BindableAttribute]
public ref class StorageFileModel sealed
{
private:
public:
property StorageFile ^File;
property StorageFolder ^Folder;
property Platform::String ^Name
{
Platform::String ^get()
{
return this->File->Name;
}
}
property Platform::String ^Path
{
Platform::String ^get()
{
return this->Folder->Path;
}
}
StorageFileModel(StorageFile ^file, StorageFolder ^folder);
};
public enum class OneDriveItemType: int
{
File,
Folder,
ROM,
SRAM,
Savestate,
Zip,
Rar,
SevenZip
};
[Windows::UI::Xaml::Data::BindableAttribute]
public ref class OneDriveFileItem sealed : Windows::UI::Xaml::Data::INotifyPropertyChanged
{
public:
property Platform::String^ Name;
property OneDriveItemType Type;
property bool Downloading
{
bool get()
{
return _downloading;
}
void set(bool value)
{
_downloading = value;
OnPropertyChanged("Downloading");
}
}
//public Stream Stream{ get; set; } //the Stream corresponding to this item
property Platform::String^ OneDriveID;
property Platform::String^ ParentID;
property Platform::String^ OneDriveLink;
property int FolderChildrenCount;
property Windows::Storage::StorageFile^ File; //to store the pointer to the file when downloading
virtual event Windows::UI::Xaml::Data::PropertyChangedEventHandler^ PropertyChanged;
protected:
void OnPropertyChanged(Platform::String^ propertyName);
private:
bool _downloading;
};
}