C# Class mo.Setting

Console Setting command options.
Exibir arquivo Open project: boolship/Mo Class Usage Examples

Private Properties

Property Type Description
GetConsoleMode int
GetStdHandle System.IntPtr
SetConsoleMode int

Public Methods

Method Description
ErrorFreeSetting ( ) : bool

Check if error in setting.

IsSet ( int flag ) : int

Check if flag set in Current Mode.

SetConsole ( ) : bool

Apply console settings in specific order.

SettingCommand ( string command, int option ) : bool

Setting Command preset or specified values.

SettingPresetGroup ( int option ) : bool

Setting Preset Group options for window, buffer and other values.

ShowStatus ( ) : bool

Show console status.

TrueParse ( string s, int &result ) : bool

Parse true and false to int result.

Private Methods

Method Description
GetConsoleMode ( IntPtr consoleHandle, int &mode ) : int
GetStdHandle ( int stdHandle ) : IntPtr
SetConsoleMode ( IntPtr consoleHandle, int mode ) : int

Method Details

ErrorFreeSetting() public method

Check if error in setting.
public ErrorFreeSetting ( ) : bool
return bool

IsSet() public method

Check if flag set in Current Mode.
public IsSet ( int flag ) : int
flag int /// The console flag, e.g. ENABLE_QUICK_EDIT_MODE, ENABLE_INSERT_MODE. /// See http://msdn.microsoft.com/en-us/library/ms686033%28VS.85%29.aspx ///
return int

SetConsole() public method

Apply console settings in specific order.
public SetConsole ( ) : bool
return bool

SettingCommand() public method

Setting Command preset or specified values.
public SettingCommand ( string command, int option ) : bool
command string /// The command. ///
option int /// The option. ///
return bool

SettingPresetGroup() public method

Setting Preset Group options for window, buffer and other values.
public SettingPresetGroup ( int option ) : bool
option int /// preset option 0|1|2|3 ///
return bool

ShowStatus() public method

Show console status.
public ShowStatus ( ) : bool
return bool

TrueParse() public static method

Parse true and false to int result.
public static TrueParse ( string s, int &result ) : bool
s string /// Parse the strings "true" or "t" and "false" or "f", case insensitive. ///
result int /// Set result out equal to 1 if true, or equal to Int16.MaxValue if false. ///
return bool