C# Class Geowigo.Models.CartridgeSavegame

Datei anzeigen Open project: WFoundation/WF.Player.WinPhone Class Usage Examples

Private Properties

Property Type Description
CartridgeSavegame System
GetDefaultName string
SetFileProperties void

Public Methods

Method Description
CartridgeSavegame ( CartridgeTag tag ) : System

Constructs a new savegame metadata container for a Cartridge.

CartridgeSavegame ( CartridgeTag tag, WF gwsMetadata, string gwsFilename ) : System

Constructs a new savegame metadata container for a Cartridge, using metadata from a GWS metadata container.

CartridgeSavegame ( CartridgeTag tag, string name ) : System

Constructs a new savegame metadata container for a Cartridge and a name.

CreateOrReplace ( IsolatedStorageFile isf ) : System.IO.Stream

Creates or replaces the underlying savegame file and opens a writing stream for it.

ExportToIsoStore ( ) : void

Exports the savegame to the isolated storage.

FromIsoStore ( string gwsFilePath, IsolatedStorageFile isf ) : CartridgeSavegame

Imports a savegame from metadata associated to a savegame file.

GetHashColor ( string name ) : Color

Computes the color brush hash that corresponds to a particular name for a savegame.

RemoveFromIsoStore ( ) : void

Removes this savegame's files from the isolated storage.

Rename ( CartridgeTag tag, string name, IsolatedStorageFile isf ) : void

Changes the name of this savegame.

Private Methods

Method Description
CartridgeSavegame ( ) : System
GetDefaultName ( CartridgeTag tag ) : string
SetFileProperties ( CartridgeTag tag, string saveFilename = null ) : void

Method Details

CartridgeSavegame() public method

Constructs a new savegame metadata container for a Cartridge.
public CartridgeSavegame ( CartridgeTag tag ) : System
tag CartridgeTag
return System

CartridgeSavegame() public method

Constructs a new savegame metadata container for a Cartridge, using metadata from a GWS metadata container.
public CartridgeSavegame ( CartridgeTag tag, WF gwsMetadata, string gwsFilename ) : System
tag CartridgeTag Cartridge to save.
gwsMetadata WF Metadata of a GWS file.
gwsFilename string
return System

CartridgeSavegame() public method

Constructs a new savegame metadata container for a Cartridge and a name.
public CartridgeSavegame ( CartridgeTag tag, string name ) : System
tag CartridgeTag
name string
return System

CreateOrReplace() public method

Creates or replaces the underlying savegame file and opens a writing stream for it.
public CreateOrReplace ( IsolatedStorageFile isf ) : System.IO.Stream
isf System.IO.IsolatedStorage.IsolatedStorageFile Isolated storage to use.
return System.IO.Stream

ExportToIsoStore() public method

Exports the savegame to the isolated storage.
public ExportToIsoStore ( ) : void
return void

FromIsoStore() public static method

Imports a savegame from metadata associated to a savegame file.
public static FromIsoStore ( string gwsFilePath, IsolatedStorageFile isf ) : CartridgeSavegame
gwsFilePath string Path to the GWS savegame file.
isf System.IO.IsolatedStorage.IsolatedStorageFile Isostore file to use to load.
return CartridgeSavegame

GetHashColor() public static method

Computes the color brush hash that corresponds to a particular name for a savegame.
public static GetHashColor ( string name ) : Color
name string Name of a savegame.
return Color

RemoveFromIsoStore() public method

Removes this savegame's files from the isolated storage.
public RemoveFromIsoStore ( ) : void
return void

Rename() public method

Changes the name of this savegame.
public Rename ( CartridgeTag tag, string name, IsolatedStorageFile isf ) : void
tag CartridgeTag
name string
isf System.IO.IsolatedStorage.IsolatedStorageFile
return void