C# Class Artemis.DAL.ProfileProvider

Afficher le fichier Open project: SpoinkyNL/Artemis

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

AddOrUpdate() public static méthode

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
Résultat void

DeleteProfile() public static méthode

public static DeleteProfile ( ProfileModel prof ) : void
prof Artemis.Profiles.ProfileModel
Résultat void

ExportProfile() public static méthode

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
Résultat void

GetAll() public static méthode

Get all profiles
public static GetAll ( ) : List
Résultat List

GetAll() public static méthode

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
Résultat List

InsertGif() public static méthode

public static InsertGif ( IEnumerable profileModels, string layerName, Bitmap gifFile, string fileName ) : void
profileModels IEnumerable
layerName string
gifFile System.Drawing.Bitmap
fileName string
Résultat void

LoadProfileIfValid() public static méthode

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
Résultat Artemis.Profiles.ProfileModel

RenameProfile() public static méthode

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
Résultat void