C# 클래스 Depressurizer.GameList

Represents a complete collection of games and categories.
파일 보기 프로젝트 열기: Theo47/depressurizer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Categories List
Filters List
Games GameInfo>.Dictionary

공개 메소드들

메소드 설명
AddCategory ( string name ) : Category

Adds a new category to the list.

AddFilter ( string name ) : Depressurizer.Filter

Adds a new Filter to the list.

AddGameCategory ( int gameID, Category c ) : void

Adds a single category to a single game

AddGameCategory ( int gameID, ICollection cats ) : void

Adds a set of categories to a single game

CategoryExists ( string name ) : bool

Checks to see if a category with the given name exists

Clear ( ) : void
ClearGameCategories ( int gameID, bool preserveFavorite ) : void

Clears all categories from a single game

ExportSteamConfig ( long steamId, bool discardMissing, bool includeShortcuts ) : void

Writes Steam game category information to Steam user config file.

ExportSteamConfigFile ( string filePath, bool discardMissing ) : void

Writes Steam game category information to Steam user config file.

ExportSteamShortcuts ( long SteamId ) : void

Writes category info for shortcut games to shortcuts.vdf config file for specified Steam user. Loads the shortcut config file, then tries to match each game in the file against one of the games in the gamelist. If it finds a match, it updates the config file with the new category info.

FetchHtmlFromUrl ( string url ) : string

Fetches an HTML game list and returns the full page text. Mostly just grabs the given HTTP response, except that it throws an errors if the profile is not public, and writes approrpriate log entries.

FetchHtmlGameList ( System.Int64 accountId ) : string

Grabs the HTML game list for the given account and returns its full text.

FetchHtmlGameList ( string customUrl ) : string

Grabs the HTML game list for the given account and returns its full text.

FetchXmlFromUrl ( string url ) : XmlDocument

Fetches an XML game list and loads it into an XML document.

FetchXmlGameList ( System.Int64 steamId ) : XmlDocument

Grabs the XML game list for the given account and reads it into an XmlDocument.

FetchXmlGameList ( string customUrl ) : XmlDocument

Grabs the XML game list for the given account and reads it into an XmlDocument.

FilterExists ( string name ) : bool

Checks to see if a Filter with the given name exists

GameList ( ) : System
GetCategory ( string name ) : Category

Gets the category with the given name. If the category does not exist, creates it.

GetFilter ( string name ) : Depressurizer.Filter

Gets the Filter with the given name. If the Filter does not exist, creates it.

HideGames ( int gameID, bool hide ) : void

Add or Remove the hidden attribute of a single game

ImportSteamConfig ( long SteamId, SortedSet ignore, AppTypes includedTypes, bool includeShortcuts ) : int

Loads category info from the steam config file for the given Steam user.

ImportSteamConfigFile ( string filePath, SortedSet ignore, AppTypes includedTypes ) : int

Loads category info from the given steam config file.

ImportSteamShortcuts ( long SteamId ) : int

Updates set of non-Steam games. Will remove any games that are currently in the list but not found in the Steam config.

IntegrateHtmlGameList ( string page, bool overWrite, SortedSet ignore, AppTypes includedTypes, int &newItems ) : int

Integrates list of games from an HTML page into the loaded game list.

IntegrateXmlGameList ( XmlDocument doc, bool overWrite, SortedSet ignore, AppTypes includedTypes, int &newItems ) : int

Integrates list of games from an XmlDocument into the loaded game list.

ProcessUnicode ( string val ) : string

Searches a string for HTML unicode entities ('\u####') and replaces them with actual unicode characters.

RemoveCategory ( Category c ) : bool

Removes the given category.

RemoveEmptyCategories ( ) : int

Remove all empty categories from the category list.

RemoveFilter ( Depressurizer.Filter f ) : bool

Removes the given Filter.

RemoveGameCategory ( int gameID, Category c ) : void

Removes a single category from a single game.

RemoveGameCategory ( int gameID, ICollection cats ) : void

Removes a set of categories from a single game

RenameCategory ( Category c, string newName ) : Category

Renames the given category.

SetGameCategories ( int gameID, Category cat, bool preserveFavorites ) : void
SetGameCategories ( int gameID, ICollection catSet, bool preserveFavorites ) : void

Sets a game's categories to a particular set

UpdateGameListFromOwnedPackageInfo ( System.Int64 accountId, SortedSet ignored, AppTypes includedTypes, int &newApps ) : int

Updates the game list based on data from the localconfig file and the package cache, including LastPlayed.

비공개 메소드들

메소드 설명
FindMatchingShortcut ( int shortcutId, VdfFileNode shortcutNode, List gamesToMatchAgainst, StringDictionary shortcutLaunchIds ) : int

Searches a list of games, looking for the one that matches the information in the shortcut node. Checks launch ID first, then checks a combination of name and ID, then just checks name.

GetLastPlayedFromVdf ( VdfFileNode appsNode, SortedSet ignore, AppTypes includedTypes ) : void

Get LastPlayed date from a VDF node containing a list of games. Any games in the node not found in the game list will be added to the gamelist.

IntegrateGame ( int appId, string appName, bool overwriteName, SortedSet ignore, AppTypes includedTypes, GameListingSource src, bool &isNew ) : GameInfo

Adds a new game to the database, or updates an existing game with new information.

IntegrateGamesFromVdf ( VdfFileNode appsNode, SortedSet ignore, AppTypes includedTypes ) : int

Loads in games from a VDF node containing a list of games. Any games in the node not found in the game list will be added to the gamelist. If a game in the node has a tags subnode, the "favorite" field will be overwritten. If a game in the node has a category set, it will overwrite any categories in the gamelist. If a game in the node does NOT have a category set, the category in the gamelist will NOT be cleared.

IntegrateShortcut ( int gameId, VdfFileNode gameNode, StringDictionary launchIds ) : bool

Adds a non-steam game to the gamelist.

LoadShortcutLaunchIds ( long SteamId, StringDictionary &shortcutLaunchIds ) : bool

Load launch IDs for external games from screenshots.vdf

RemoveGame ( int appId ) : bool

Removes a game from the game list.

메소드 상세

AddCategory() 공개 메소드

Adds a new category to the list.
public AddCategory ( string name ) : Category
name string Name of the category to add
리턴 Category

AddFilter() 공개 메소드

Adds a new Filter to the list.
public AddFilter ( string name ) : Depressurizer.Filter
name string Name of the Filter to add
리턴 Depressurizer.Filter

AddGameCategory() 공개 메소드

Adds a single category to a single game
public AddGameCategory ( int gameID, Category c ) : void
gameID int Game ID to add category to
c Category Category to add
리턴 void

AddGameCategory() 공개 메소드

Adds a set of categories to a single game
public AddGameCategory ( int gameID, ICollection cats ) : void
gameID int Game ID to add to
cats ICollection Categories to add
리턴 void

CategoryExists() 공개 메소드

Checks to see if a category with the given name exists
public CategoryExists ( string name ) : bool
name string Name of the category to look for
리턴 bool

Clear() 공개 메소드

public Clear ( ) : void
리턴 void

ClearGameCategories() 공개 메소드

Clears all categories from a single game
public ClearGameCategories ( int gameID, bool preserveFavorite ) : void
gameID int Game ID to clear categories from
preserveFavorite bool
리턴 void

ExportSteamConfig() 공개 메소드

Writes Steam game category information to Steam user config file.
public ExportSteamConfig ( long steamId, bool discardMissing, bool includeShortcuts ) : void
steamId long Steam ID of user to save the config file for
discardMissing bool If true, any pre-existing game entries in the file that do not have corresponding entries in the GameList are removed
includeShortcuts bool If true, also saves the Steam shortcut category data
리턴 void

ExportSteamConfigFile() 공개 메소드

Writes Steam game category information to Steam user config file.
public ExportSteamConfigFile ( string filePath, bool discardMissing ) : void
filePath string Full path of the steam config file to save
discardMissing bool If true, any pre-existing game entries in the file that do not have corresponding entries in the GameList are removed
리턴 void

ExportSteamShortcuts() 공개 메소드

Writes category info for shortcut games to shortcuts.vdf config file for specified Steam user. Loads the shortcut config file, then tries to match each game in the file against one of the games in the gamelist. If it finds a match, it updates the config file with the new category info.
public ExportSteamShortcuts ( long SteamId ) : void
SteamId long Identifier of Steam user to save information
리턴 void

FetchHtmlFromUrl() 공개 정적인 메소드

Fetches an HTML game list and returns the full page text. Mostly just grabs the given HTTP response, except that it throws an errors if the profile is not public, and writes approrpriate log entries.
public static FetchHtmlFromUrl ( string url ) : string
url string The URL to fetch
리턴 string

FetchHtmlGameList() 공개 정적인 메소드

Grabs the HTML game list for the given account and returns its full text.
public static FetchHtmlGameList ( System.Int64 accountId ) : string
accountId System.Int64 The 64-bit account ID
리턴 string

FetchHtmlGameList() 공개 정적인 메소드

Grabs the HTML game list for the given account and returns its full text.
public static FetchHtmlGameList ( string customUrl ) : string
customUrl string The custom name for the account
리턴 string

FetchXmlFromUrl() 공개 정적인 메소드

Fetches an XML game list and loads it into an XML document.
public static FetchXmlFromUrl ( string url ) : XmlDocument
url string The URL to fetch
리턴 System.Xml.XmlDocument

FetchXmlGameList() 공개 정적인 메소드

Grabs the XML game list for the given account and reads it into an XmlDocument.
public static FetchXmlGameList ( System.Int64 steamId ) : XmlDocument
steamId System.Int64
리턴 System.Xml.XmlDocument

FetchXmlGameList() 공개 정적인 메소드

Grabs the XML game list for the given account and reads it into an XmlDocument.
public static FetchXmlGameList ( string customUrl ) : XmlDocument
customUrl string The custom name for the account
리턴 System.Xml.XmlDocument

FilterExists() 공개 메소드

Checks to see if a Filter with the given name exists
public FilterExists ( string name ) : bool
name string Name of the Filter to look for
리턴 bool

GameList() 공개 메소드

public GameList ( ) : System
리턴 System

GetCategory() 공개 메소드

Gets the category with the given name. If the category does not exist, creates it.
public GetCategory ( string name ) : Category
name string Name to get the category for
리턴 Category

GetFilter() 공개 메소드

Gets the Filter with the given name. If the Filter does not exist, creates it.
public GetFilter ( string name ) : Depressurizer.Filter
name string Name to get the Filter for
리턴 Depressurizer.Filter

HideGames() 공개 메소드

Add or Remove the hidden attribute of a single game
public HideGames ( int gameID, bool hide ) : void
gameID int Game ID to hide/unhide
hide bool Whether the game should be hidden.
리턴 void

ImportSteamConfig() 공개 메소드

Loads category info from the steam config file for the given Steam user.
public ImportSteamConfig ( long SteamId, SortedSet ignore, AppTypes includedTypes, bool includeShortcuts ) : int
SteamId long Identifier of Steam user
ignore SortedSet Set of games to ignore
includedTypes AppTypes
includeShortcuts bool If true, also import shortcut data
리턴 int

ImportSteamConfigFile() 공개 메소드

Loads category info from the given steam config file.
public ImportSteamConfigFile ( string filePath, SortedSet ignore, AppTypes includedTypes ) : int
filePath string The path of the file to open
ignore SortedSet Set of game IDs to ignore
includedTypes AppTypes
리턴 int

ImportSteamShortcuts() 공개 메소드

Updates set of non-Steam games. Will remove any games that are currently in the list but not found in the Steam config.
public ImportSteamShortcuts ( long SteamId ) : int
SteamId long The ID64 of the account to load shortcuts for
리턴 int

IntegrateHtmlGameList() 공개 메소드

Integrates list of games from an HTML page into the loaded game list.
public IntegrateHtmlGameList ( string page, bool overWrite, SortedSet ignore, AppTypes includedTypes, int &newItems ) : int
page string The full text of the page to load
overWrite bool If true, overwrite the names of games already in the list.
ignore SortedSet A set of item IDs to ignore. Can be null.
includedTypes AppTypes
newItems int The number of new items actually added
리턴 int

IntegrateXmlGameList() 공개 메소드

Integrates list of games from an XmlDocument into the loaded game list.
public IntegrateXmlGameList ( XmlDocument doc, bool overWrite, SortedSet ignore, AppTypes includedTypes, int &newItems ) : int
doc System.Xml.XmlDocument The XmlDocument containing the new game list
overWrite bool If true, overwrite the names of games already in the list.
ignore SortedSet A set of item IDs to ignore.
includedTypes AppTypes
newItems int The number of new items actually added
리턴 int

ProcessUnicode() 공개 메소드

Searches a string for HTML unicode entities ('\u####') and replaces them with actual unicode characters.
public ProcessUnicode ( string val ) : string
val string The string to process
리턴 string

RemoveCategory() 공개 메소드

Removes the given category.
public RemoveCategory ( Category c ) : bool
c Category Category to remove.
리턴 bool

RemoveEmptyCategories() 공개 메소드

Remove all empty categories from the category list.
public RemoveEmptyCategories ( ) : int
리턴 int

RemoveFilter() 공개 메소드

Removes the given Filter.
public RemoveFilter ( Depressurizer.Filter f ) : bool
f Depressurizer.Filter Filter to remove.
리턴 bool

RemoveGameCategory() 공개 메소드

Removes a single category from a single game.
public RemoveGameCategory ( int gameID, Category c ) : void
gameID int Game ID to remove from
c Category Category to remove
리턴 void

RemoveGameCategory() 공개 메소드

Removes a set of categories from a single game
public RemoveGameCategory ( int gameID, ICollection cats ) : void
gameID int Game ID to remove from
cats ICollection Set of categories to remove
리턴 void

RenameCategory() 공개 메소드

Renames the given category.
public RenameCategory ( Category c, string newName ) : Category
c Category Category to rename.
newName string Name to assign to the new category.
리턴 Category

SetGameCategories() 공개 메소드

public SetGameCategories ( int gameID, Category cat, bool preserveFavorites ) : void
gameID int
cat Category
preserveFavorites bool
리턴 void

SetGameCategories() 공개 메소드

Sets a game's categories to a particular set
public SetGameCategories ( int gameID, ICollection catSet, bool preserveFavorites ) : void
gameID int Game ID to modify
catSet ICollection Set of categories to apply
preserveFavorites bool If true, will not remove "favorite" category
리턴 void

UpdateGameListFromOwnedPackageInfo() 공개 메소드

Updates the game list based on data from the localconfig file and the package cache, including LastPlayed.
public UpdateGameListFromOwnedPackageInfo ( System.Int64 accountId, SortedSet ignored, AppTypes includedTypes, int &newApps ) : int
accountId System.Int64 64-bit account ID to update for
ignored SortedSet Set of games to ignore
includedTypes AppTypes
newApps int
리턴 int

프로퍼티 상세

Categories 공개적으로 프로퍼티

public List Categories
리턴 List

Filters 공개적으로 프로퍼티

public List Filters
리턴 List

Games 공개적으로 프로퍼티

public Dictionary Games
리턴 GameInfo>.Dictionary