Represent settings associate to the application.
Constructors | |
| settings () | |
| Initializes a new instance of settings class. More... | |
Methods | |
| xtd::ustring | read (const xtd::ustring &key, const xtd::ustring &default_value) |
| Reads a value for specified key. If not found default value is used. More... | |
| template<typename type_t > | |
| type_t | read (const xtd::ustring &key, const type_t &default_value) |
| Reads a value for specified key. If not found default value is used. More... | |
| void | reset () |
| Reset application settings. More... | |
| void | save () |
| Save application settings. More... | |
| void | write (const xtd::ustring &key, const xtd::ustring &value) |
| Writes a specified value for specified key. More... | |
| template<typename type_t > | |
| void | write (const xtd::ustring &key, type_t &&value) |
| Writes a specified value for specified key. More... | |
Additional Inherited Members | |
Public Member Functions inherited from xtd::object | |
| object ()=default | |
| Create a new instance of the ultimate base class object. More... | |
| bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. More... | |
| virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. More... | |
| virtual type_object | get_type () const noexcept |
| Gets the type of the current instance. More... | |
| template<typename object_t > | |
| std::unique_ptr< object_t > | memberwise_clone () const noexcept |
| Creates a shallow copy of the current object. More... | |
| virtual xtd::ustring | to_string () const noexcept |
| Returns a sxd::ustring that represents the current object. More... | |
Static Public Member Functions inherited from xtd::object | |
| static bool | equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are considered equal. More... | |
| static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are the same instance. More... | |
| xtd::forms::settings::settings | ( | ) |
Initializes a new instance of settings class.
|
inline |
Reads a value for specified key. If not found default value is used.
| key | The key used to read a value. |
| default_value | A string used if value not found. |
|
inline |
Reads a value for specified key. If not found default value is used.
| type_t | The type of value to read. |
| key | The key used to read a value. |
| default_value | A string used if value not found. |
| void xtd::forms::settings::reset | ( | ) |
Reset application settings.
| void xtd::forms::settings::save | ( | ) |
Save application settings.
|
inline |
Writes a specified value for specified key.
| key | The key used to write a value. |
| value | A string to write. |
|
inline |
Writes a specified value for specified key.
| type_t | The type of value to write. |
| key | The key used to write a value. |
| value | A type_t to write. |