C# Class vimage.Config

Afficher le fichier Open project: Torrunt/vimage Class Usage Examples

Méthodes publiques

Свойство Type Description
AltDown bool
ContextMenu List
ContextMenu_Animation List
Control_Close List
Control_Copy List
Control_CopyAsImage List
Control_Delete List
Control_Drag List
Control_FitToMonitorAlt List
Control_FitToMonitorAuto List
Control_FitToMonitorHeight List
Control_FitToMonitorWidth List
Control_Flip List
Control_NextFrame List
Control_NextImage List
Control_OpenAtLocation List
Control_OpenConfig List
Control_OpenContextMenu List
Control_OpenDuplicateImage List
Control_PauseAnimation List
Control_PrevFrame List
Control_PrevImage List
Control_RandomImage List
Control_ReloadConfig List
Control_ResetImage List
Control_RotateAntiClockwise List
Control_RotateClockwise List
Control_ToggleAlwaysOnTop List
Control_ToggleBackgroundForTransparency List
Control_ToggleSmoothing List
Control_ZoomAlt List
Control_ZoomFaster List
CtrlDown bool
CustomActionBindings List
CustomActions List
ShiftDown bool

Méthodes publiques

Méthode Description
Config ( ) : System
ControlToString ( object code ) : string

Converts Keyboard.Key or Mouse.Button to their string name.

ControlsToString ( List controls ) : string

Converts list of controls (Keyboard.Key and Mouse.Button) to their string names seperated by commas.

Init ( ) : void
IsControl ( Keyboard keyCode, List Control ) : bool

Returns true if Keyboard.Key is one of Control bindings.

IsControl ( Mouse code, List Control ) : bool

Returns true if Mouse.Button is one of Control bindings.

IsControl ( object code, List Control ) : bool

Returns true if code is one of Control bindings.

KeyToString ( Keyboard key ) : string

Converts SFML Keyboard.Key to upper-case string.

Load ( string configFile ) : void

Loads and parses a config txt file. If it doesn't exist, a default one will be made.

MouseButtonToString ( int code ) : string
Save ( string configFile ) : void

Saves settings to config txt file.

SetControls ( List controls ) : void
SetDefaultContextMenu ( ) : void
SetDefaultControls ( ) : void
SetDefaultCustomActions ( ) : void
StringToControls ( string str ) : List
StringToKey ( string str ) : Keyboard.Key

Converts upper-case string to SFML Keyboard.Key.

StringToMouseButton ( string str ) : int

Converts upper-case string to SFML Mouse.Button (as an int + offset).

UpdateControl ( string name, int bind ) : List

Private Methods

Méthode Description
ReadSection ( StreamReader reader, List setting, string sectionName = "" ) : string
RemoveSpaces ( string str ) : string
VariableAmountOfStrings ( int amount, string s ) : string
WriteComment ( StreamWriter writer, string comment = "" ) : void
WriteContextMenuItems ( StreamWriter writer, List items, int depth = 1 ) : void
WriteContextMenuSetup ( StreamWriter writer, string name, List contextMenu ) : void
WriteControl ( StreamWriter writer, string name, List controls ) : void
WriteCustomActionBindings ( StreamWriter writer, string name, List customActionBindings ) : void
WriteCustomActions ( StreamWriter writer, string name, List customActions ) : void
WriteSetting ( StreamWriter writer, string name, bool value, string comment = "" ) : void
WriteSetting ( StreamWriter writer, string name, int value, string comment = "" ) : void
WriteSetting ( StreamWriter writer, string name, string value, string comment = "" ) : void

Method Details

Config() public méthode

public Config ( ) : System
Résultat System

ControlToString() public static méthode

Converts Keyboard.Key or Mouse.Button to their string name.
public static ControlToString ( object code ) : string
code object
Résultat string

ControlsToString() public static méthode

Converts list of controls (Keyboard.Key and Mouse.Button) to their string names seperated by commas.
public static ControlsToString ( List controls ) : string
controls List
Résultat string

Init() public méthode

public Init ( ) : void
Résultat void

IsControl() public static méthode

Returns true if Keyboard.Key is one of Control bindings.
public static IsControl ( Keyboard keyCode, List Control ) : bool
keyCode Keyboard
Control List
Résultat bool

IsControl() public static méthode

Returns true if Mouse.Button is one of Control bindings.
public static IsControl ( Mouse code, List Control ) : bool
code Mouse
Control List
Résultat bool

IsControl() public static méthode

Returns true if code is one of Control bindings.
public static IsControl ( object code, List Control ) : bool
code object
Control List
Résultat bool

KeyToString() public static méthode

Converts SFML Keyboard.Key to upper-case string.
public static KeyToString ( Keyboard key ) : string
key Keyboard
Résultat string

Load() public méthode

Loads and parses a config txt file. If it doesn't exist, a default one will be made.
public Load ( string configFile ) : void
configFile string
Résultat void

MouseButtonToString() public static méthode

public static MouseButtonToString ( int code ) : string
code int
Résultat string

Save() public méthode

Saves settings to config txt file.
public Save ( string configFile ) : void
configFile string
Résultat void

SetControls() public static méthode

public static SetControls ( List controls ) : void
controls List
Résultat void

SetDefaultContextMenu() public méthode

public SetDefaultContextMenu ( ) : void
Résultat void

SetDefaultControls() public méthode

public SetDefaultControls ( ) : void
Résultat void

SetDefaultCustomActions() public méthode

public SetDefaultCustomActions ( ) : void
Résultat void

StringToControls() public static méthode

public static StringToControls ( string str ) : List
str string
Résultat List

StringToKey() public static méthode

Converts upper-case string to SFML Keyboard.Key.
public static StringToKey ( string str ) : Keyboard.Key
str string
Résultat Keyboard.Key

StringToMouseButton() public static méthode

Converts upper-case string to SFML Mouse.Button (as an int + offset).
public static StringToMouseButton ( string str ) : int
str string
Résultat int

UpdateControl() public méthode

public UpdateControl ( string name, int bind ) : List
name string
bind int
Résultat List

Property Details

AltDown public_oe static_oe property

public static bool AltDown
Résultat bool

ContextMenu public_oe property

public List ContextMenu
Résultat List

ContextMenu_Animation public_oe property

public List ContextMenu_Animation
Résultat List

Control_Close public_oe property

public List Control_Close
Résultat List

Control_Copy public_oe property

public List Control_Copy
Résultat List

Control_CopyAsImage public_oe property

public List Control_CopyAsImage
Résultat List

Control_Delete public_oe property

public List Control_Delete
Résultat List

Control_Drag public_oe property

public List Control_Drag
Résultat List

Control_FitToMonitorAlt public_oe property

public List Control_FitToMonitorAlt
Résultat List

Control_FitToMonitorAuto public_oe property

public List Control_FitToMonitorAuto
Résultat List

Control_FitToMonitorHeight public_oe property

public List Control_FitToMonitorHeight
Résultat List

Control_FitToMonitorWidth public_oe property

public List Control_FitToMonitorWidth
Résultat List

Control_Flip public_oe property

public List Control_Flip
Résultat List

Control_NextFrame public_oe property

public List Control_NextFrame
Résultat List

Control_NextImage public_oe property

public List Control_NextImage
Résultat List

Control_OpenAtLocation public_oe property

public List Control_OpenAtLocation
Résultat List

Control_OpenConfig public_oe property

public List Control_OpenConfig
Résultat List

Control_OpenContextMenu public_oe property

public List Control_OpenContextMenu
Résultat List

Control_OpenDuplicateImage public_oe property

public List Control_OpenDuplicateImage
Résultat List

Control_PauseAnimation public_oe property

public List Control_PauseAnimation
Résultat List

Control_PrevFrame public_oe property

public List Control_PrevFrame
Résultat List

Control_PrevImage public_oe property

public List Control_PrevImage
Résultat List

Control_RandomImage public_oe property

public List Control_RandomImage
Résultat List

Control_ReloadConfig public_oe property

public List Control_ReloadConfig
Résultat List

Control_ResetImage public_oe property

public List Control_ResetImage
Résultat List

Control_RotateAntiClockwise public_oe property

public List Control_RotateAntiClockwise
Résultat List

Control_RotateClockwise public_oe property

public List Control_RotateClockwise
Résultat List

Control_ToggleAlwaysOnTop public_oe property

public List Control_ToggleAlwaysOnTop
Résultat List

Control_ToggleBackgroundForTransparency public_oe property

public List Control_ToggleBackgroundForTransparency
Résultat List

Control_ToggleSmoothing public_oe property

public List Control_ToggleSmoothing
Résultat List

Control_ZoomAlt public_oe property

public List Control_ZoomAlt
Résultat List

Control_ZoomFaster public_oe property

public List Control_ZoomFaster
Résultat List

CtrlDown public_oe static_oe property

public static bool CtrlDown
Résultat bool

CustomActionBindings public_oe property

public List CustomActionBindings
Résultat List

CustomActions public_oe property

public List CustomActions
Résultat List

ShiftDown public_oe static_oe property

public static bool ShiftDown
Résultat bool