CM3D2.BinbolusVR.BinbolusVR.GetPreferences C# (CSharp) Method

GetPreferences() private method

設定ファイルから bool データを読む
private GetPreferences ( string section, string key, bool defaultValue ) : bool
section string
key string
defaultValue bool
return bool
        private bool GetPreferences( string section, string key, bool defaultValue )
        {
            if( !Preferences.HasSection( section ) || !Preferences[section].HasKey( key ) || string.IsNullOrEmpty( Preferences[section][key].Value ))
            {
                Preferences[section][key].Value = defaultValue.ToString();
                SaveConfig();
            }
            bool b = defaultValue;
            bool.TryParse( Preferences[section][key].Value, out b );
            return b;
        }

Same methods

BinbolusVR::GetPreferences ( string section, string key, float defaultValue ) : float
BinbolusVR::GetPreferences ( string section, string key, int defaultValue ) : int
BinbolusVR::GetPreferences ( string section, string key, string defaultValue ) : string