Files
vba10/Database/ROMDBEntry.h

210 lines
3.9 KiB
C
Raw Permalink Normal View History

2015-06-18 17:33:07 +00:00
#pragma once
#include <collection.h>
#include <ppltasks.h>
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
using namespace Platform;
using namespace Platform::Collections;
using namespace concurrency;
using namespace Windows::UI::Xaml::Media::Imaging;
using namespace Windows::Storage;
2015-06-18 17:33:07 +00:00
namespace VBA10
{
[Windows::UI::Xaml::Data::BindableAttribute]
2015-06-18 17:33:07 +00:00
public ref class ROMDBEntry sealed
{
public:
2015-07-29 21:14:08 +00:00
ROMDBEntry(int locationtype, Platform::String^ displayname, Platform::String^ filename, Platform::String^ folderpath,
Platform::String^ token, Platform::String^ snapshoturi);
2015-06-18 17:33:07 +00:00
2015-07-29 21:14:08 +00:00
ROMDBEntry(int locationtype, Platform::String^ displayname, Platform::String^ filename, Platform::String^ folder,
Platform::String^ folderpath, DateTime lastplayed, int lastsaveindex, int autosaveindex, Platform::String^ snapshoturi);
2015-06-18 17:33:07 +00:00
//property int ID
//{
// int get()
// {
// return _id;
// }
// void set(int value)
// {
// _id = value;
// }
//}
2015-06-18 17:33:07 +00:00
2015-07-31 16:32:11 +00:00
property int LocationType //0: private app folder, 1: external
2015-06-18 17:33:07 +00:00
{
int get()
{
return _locationType;
}
void set(int value)
{
_locationType = value;
}
}
property Platform::String^ DisplayName
{
Platform::String^ get()
{
return _displayName;
}
void set(Platform::String^ value)
{
_displayName = value;
}
}
property Platform::String^ FileName
{
Platform::String^ get()
{
return _fileName;
}
void set(Platform::String^ value)
{
_fileName = value;
}
}
2015-07-29 21:14:08 +00:00
property Platform::String^ FolderPath
2015-06-18 17:33:07 +00:00
{
Platform::String^ get()
{
2015-07-29 21:14:08 +00:00
return _folderPath;
2015-06-18 17:33:07 +00:00
}
void set(Platform::String^ value)
{
2015-07-29 21:14:08 +00:00
_folderPath = value;
}
}
property Platform::String^ Token //token to the folder containing the rom
{
Platform::String^ get()
{
return _token;
}
void set(Platform::String^ value)
{
_token = value;
2015-06-18 17:33:07 +00:00
}
}
property Windows::Foundation::DateTime LastPlayed
2015-06-18 17:33:07 +00:00
{
Windows::Foundation::DateTime get()
{
return _lastPlayed;
}
void set(Windows::Foundation::DateTime value)
{
_lastPlayed = value;
}
}
2015-06-24 17:33:03 +00:00
property int LastSaveIndex
{
int get()
{
return _lastSaveIndex;
}
void set(int value)
{
_lastSaveIndex = value;
}
}
2015-06-18 17:33:07 +00:00
property int AutoSaveIndex
{
int get()
{
return _autoSaveIndex;
}
void set(int value)
{
_autoSaveIndex = value;
}
}
property Platform::String^ SnapshotUri
{
Platform::String^ get()
{
return _snapshotUri;
}
void set(Platform::String^ value)
{
_snapshotUri = value;
}
}
2015-07-29 19:41:41 +00:00
2015-07-29 21:14:08 +00:00
//this is to hold temporary information about ROM folder when the app is running (for convenience)
property StorageFolder^ Folder
{
StorageFolder^ get()
{
return _folder;
}
void set(StorageFolder^ value)
{
_folder = value;
}
}
property StorageFile^ File
{
StorageFile^ get()
{
return _file;
}
void set(StorageFile^ value)
{
_file = value;
}
}
2015-07-15 05:02:33 +00:00
property bool AutoLoadLastState;
2015-07-29 23:57:19 +00:00
//this is just to hold the snapshot image while the app is running
property BitmapSource^ Snapshot
{
BitmapSource^ get()
{
return _snapshot;
}
void set(BitmapSource^ value)
{
_snapshot = value;
}
}
2015-06-18 17:33:07 +00:00
private:
int _id;
int _locationType;
Platform::String^ _displayName;
Platform::String^ _fileName;
2015-07-29 21:14:08 +00:00
Platform::String^ _folderPath;
2015-06-18 17:33:07 +00:00
Windows::Foundation::DateTime _lastPlayed;
2015-06-24 17:33:03 +00:00
int _lastSaveIndex;
int _autoSaveIndex; //use to hold what save state to upload automatically
2015-07-29 19:41:41 +00:00
Platform::String^ _token;
2015-06-18 17:33:07 +00:00
Platform::String^ _snapshotUri;
BitmapSource^ _snapshot;
StorageFolder^ _folder;
StorageFile^ _file;
2015-06-18 17:33:07 +00:00
};
}