C# Класс Artemis.DAL.ProfileProvider

Показать файл Открыть проект

Открытые методы

Метод Описание
AddOrUpdate ( ProfileModel prof ) : void

Adds or update the given profile. Updates occur when a profile with the same name and game exist.

DeleteProfile ( ProfileModel prof ) : void
ExportProfile ( ProfileModel prof, string path ) : void

Exports the given profile to the provided path in XML

GetAll ( ) : List

Get all profiles

GetAll ( EffectModel game, KeyboardProvider keyboard ) : List

Get all profiles matching the provided game

InsertGif ( IEnumerable profileModels, string layerName, Bitmap gifFile, string fileName ) : void
LoadProfileIfValid ( string path ) : ProfileModel

Attempts to load a profile from a given path

RenameProfile ( ProfileModel profile, string name ) : void

Renames the profile on the model and filesystem

Приватные методы

Метод Описание
CheckProfiles ( ) : void

Makes sure the profile directory structure is in order and places default profiles

InstallDefaults ( ) : void

Unpacks the default profiles into the profile directory

ReadProfiles ( ) : void

Описание методов

AddOrUpdate() публичный статический Метод

Adds or update the given profile. Updates occur when a profile with the same name and game exist.
public static AddOrUpdate ( ProfileModel prof ) : void
prof Artemis.Profiles.ProfileModel The profile to add or update
Результат void

DeleteProfile() публичный статический Метод

public static DeleteProfile ( ProfileModel prof ) : void
prof Artemis.Profiles.ProfileModel
Результат void

ExportProfile() публичный статический Метод

Exports the given profile to the provided path in XML
public static ExportProfile ( ProfileModel prof, string path ) : void
prof Artemis.Profiles.ProfileModel The profile to export
path string The path to save the profile to
Результат void

GetAll() публичный статический Метод

Get all profiles
public static GetAll ( ) : List
Результат List

GetAll() публичный статический Метод

Get all profiles matching the provided game
public static GetAll ( EffectModel game, KeyboardProvider keyboard ) : List
game Artemis.Models.EffectModel The game to match
keyboard Artemis.DeviceProviders.KeyboardProvider The keyboard to match
Результат List

InsertGif() публичный статический Метод

public static InsertGif ( IEnumerable profileModels, string layerName, Bitmap gifFile, string fileName ) : void
profileModels IEnumerable
layerName string
gifFile System.Drawing.Bitmap
fileName string
Результат void

LoadProfileIfValid() публичный статический Метод

Attempts to load a profile from a given path
public static LoadProfileIfValid ( string path ) : ProfileModel
path string The absolute path to load the profile from
Результат Artemis.Profiles.ProfileModel

RenameProfile() публичный статический Метод

Renames the profile on the model and filesystem
public static RenameProfile ( ProfileModel profile, string name ) : void
profile Artemis.Profiles.ProfileModel The profile to rename
name string The new name
Результат void