C# 클래스 Depressurizer.GameInfo

Represents a single game and its categories.
파일 보기 프로젝트 열기: Theo47/depressurizer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Categories SortedSet
GameList GameList
Hidden bool
Id int
LastPlayed DateTime
Name string
Source GameListingSource

공개 메소드들

메소드 설명
AddCategory ( Category newCat ) : void

Adds a single category to this game. Does nothing if the category is already attached.

AddCategory ( ICollection newCats ) : void

Adds a list of categories to this game. Skips categories that are already attached.

ApplySource ( GameListingSource src ) : void
ClearCategories ( bool alsoClearFavorite = false ) : void

Removes all categories from this game. If true, removes the favorite category as well.

ContainsCategory ( Category c ) : bool

Check whether the game includes the given category

GameInfo ( int id, string name, GameList list, string executable = null ) : System

Construct a new GameInfo with no categories set.

GetCatString ( string ifEmpty = "", bool includeFavorite = false ) : string

Gets a string listing the game's assigned categories.

HasCategories ( bool includeFavorite = false ) : bool

Check to see if the game has any categories at all (except the Favorite category)

HasCategoriesExcept ( ICollection except ) : bool

Check to see if the game has any categories set that do not exist in the given list

IncludeGame ( Filter f ) : bool
IsFavorite ( ) : bool
RemoveCategory ( Category remCat ) : void

Removes a single category from this game. Does nothing if the category is not attached to this game.

RemoveCategory ( ICollection remCats ) : void

Removes a list of categories from this game. Skips categories that are not attached to this game.

SetCategories ( ICollection cats, bool preserveFavorite ) : void

Sets the categories for this game to exactly match the given list. Missing categories will be added and extra ones will be removed.

SetFavorite ( bool fav ) : void
SetHidden ( bool hide ) : void

Add or remove the hidden attribute for this game.

메소드 상세

AddCategory() 공개 메소드

Adds a single category to this game. Does nothing if the category is already attached.
public AddCategory ( Category newCat ) : void
newCat Category Category to add
리턴 void

AddCategory() 공개 메소드

Adds a list of categories to this game. Skips categories that are already attached.
public AddCategory ( ICollection newCats ) : void
newCats ICollection A list of categories to add
리턴 void

ApplySource() 공개 메소드

public ApplySource ( GameListingSource src ) : void
src GameListingSource
리턴 void

ClearCategories() 공개 메소드

Removes all categories from this game. If true, removes the favorite category as well.
public ClearCategories ( bool alsoClearFavorite = false ) : void
alsoClearFavorite bool
리턴 void

ContainsCategory() 공개 메소드

Check whether the game includes the given category
public ContainsCategory ( Category c ) : bool
c Category Category to look for
리턴 bool

GameInfo() 공개 메소드

Construct a new GameInfo with no categories set.
public GameInfo ( int id, string name, GameList list, string executable = null ) : System
id int ID of the new game. Positive means it's the game's Steam ID, negative means it's a non-steam game.
name string Game title
list GameList
executable string
리턴 System

GetCatString() 공개 메소드

Gets a string listing the game's assigned categories.
public GetCatString ( string ifEmpty = "", bool includeFavorite = false ) : string
ifEmpty string Value to return if there are no categories
includeFavorite bool If true, include the favorite category.
리턴 string

HasCategories() 공개 메소드

Check to see if the game has any categories at all (except the Favorite category)
public HasCategories ( bool includeFavorite = false ) : bool
includeFavorite bool If true, will only return true if the game is not in the favorite category. If false, the favorite category is ignored.
리턴 bool

HasCategoriesExcept() 공개 메소드

Check to see if the game has any categories set that do not exist in the given list
public HasCategoriesExcept ( ICollection except ) : bool
except ICollection List of games to exclude from the check
리턴 bool

IncludeGame() 공개 메소드

public IncludeGame ( Filter f ) : bool
f Filter
리턴 bool

IsFavorite() 공개 메소드

public IsFavorite ( ) : bool
리턴 bool

RemoveCategory() 공개 메소드

Removes a single category from this game. Does nothing if the category is not attached to this game.
public RemoveCategory ( Category remCat ) : void
remCat Category Category to remove
리턴 void

RemoveCategory() 공개 메소드

Removes a list of categories from this game. Skips categories that are not attached to this game.
public RemoveCategory ( ICollection remCats ) : void
remCats ICollection Categories to remove
리턴 void

SetCategories() 공개 메소드

Sets the categories for this game to exactly match the given list. Missing categories will be added and extra ones will be removed.
public SetCategories ( ICollection cats, bool preserveFavorite ) : void
cats ICollection Set of categories to apply to this game
preserveFavorite bool
리턴 void

SetFavorite() 공개 메소드

public SetFavorite ( bool fav ) : void
fav bool
리턴 void

SetHidden() 공개 메소드

Add or remove the hidden attribute for this game.
public SetHidden ( bool hide ) : void
hide bool Whether the game should be hidden
리턴 void

프로퍼티 상세

Categories 공개적으로 프로퍼티

public SortedSet Categories
리턴 SortedSet

GameList 공개적으로 프로퍼티

public GameList GameList
리턴 GameList

Hidden 공개적으로 프로퍼티

public bool Hidden
리턴 bool

Id 공개적으로 프로퍼티

public int Id
리턴 int

LastPlayed 공개적으로 프로퍼티

public DateTime LastPlayed
리턴 DateTime

Name 공개적으로 프로퍼티

public string Name
리턴 string

Source 공개적으로 프로퍼티

public GameListingSource Source
리턴 GameListingSource