|
| 1 | +/// @file |
| 2 | +/// @brief Contains xtd::forms::application_informations class. |
| 3 | +/// @copyright Copyright (c) 2021 Gammasoft. All rights reserved. |
| 4 | +#pragma once |
| 5 | +#include <xtd/object.h> |
| 6 | +#include <xtd/ustring.h> |
| 7 | + |
| 8 | +/// @brief The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more. |
| 9 | +namespace xtd { |
| 10 | + /// @brief The xtd::forms namespace contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system, Apple macOS and Linux like Ubuntu operating system. |
| 11 | + namespace forms { |
| 12 | + /// @brief Specifies the application informations. |
| 13 | + /// @par Namespace |
| 14 | + /// xtd::forms |
| 15 | + /// @par Library |
| 16 | + /// xtd.forms |
| 17 | + /// @ingroup xtd_forms application |
| 18 | + /// @par Examples |
| 19 | + /// The following code example demonstrate the use of application_informations class. |
| 20 | + /// @include application_informations.cpp |
| 21 | + class [[deprecated("Replaced by xtd::reflection::assembly - Will be removed in version 0.4.0.")]] application_informations : public object { |
| 22 | + public: |
| 23 | + /// @brief Gets the company name associated with the application. |
| 24 | + /// @return The company name. |
| 25 | + [[deprecated("Replaced by xtd::reflection::assembly_company_attribute - Will be removed in version 0.4.0.")]] static const xtd::ustring& company_name() {return instance().company_name_;} |
| 26 | + /// @brief Sets the company name associated with the application. |
| 27 | + /// @param company_name The company name. |
| 28 | + [[deprecated("Replaced by xtd::reflection::assembly_company_attribute - Will be removed in version 0.4.0.")]] static void company_name(const xtd::ustring& company_name) {instance().company_name_ = company_name;} |
| 29 | + |
| 30 | + /// @brief Gets the product description associated with the application. |
| 31 | + /// @return The product description. |
| 32 | + [[deprecated("Replaced by xtd::reflection::assembly_product_attribute - Will be removed in version 0.4.0.")]] static xtd::ustring product_description() {return instance().product_description_;} |
| 33 | + /// @brief Sets the product description associated with the application. |
| 34 | + /// @param product_name The product description. |
| 35 | + [[deprecated("Replaced by xtd::reflection::assembly_product_attribute - Will be removed in version 0.4.0.")]] static void product_description(const xtd::ustring& product_description) {instance().product_description_ = product_description;} |
| 36 | + |
| 37 | + /// @brief Gets the product name associated with the application. |
| 38 | + /// @return The product name. |
| 39 | + [[deprecated("Replaced by xtd::reflection::assembly_name_attribute - Will be removed in version 0.4.0.")]] static xtd::ustring product_name() {return instance().product_name_;} |
| 40 | + /// @brief Sets the product name associated with the application. |
| 41 | + /// @param product_name The product name. |
| 42 | + [[deprecated("Replaced by xtd::reflection::assembly_name_attribute - Will be removed in version 0.4.0.")]] static void product_name(const xtd::ustring& product_name) {instance().product_name_ = product_name;} |
| 43 | + |
| 44 | + /// @brief Gets the product version associated with the application. |
| 45 | + /// @return The product version. |
| 46 | + [[deprecated("Replaced by xtd::reflection::assembly_version_attribute - Will be removed in version 0.4.0.")]] static xtd::ustring product_version() {return instance().product_version_;} |
| 47 | + /// @brief Sets the product version associated with the application. |
| 48 | + /// @param product_version The product version. |
| 49 | + [[deprecated("Replaced by xtd::reflection::assembly_version_attribute - Will be removed in version 0.4.0.")]] static void product_version(const xtd::ustring& product_version) {instance().product_version_ = product_version;} |
| 50 | + |
| 51 | + private: |
| 52 | + static application_informations& instance() { |
| 53 | + static application_informations application_informations; |
| 54 | + return application_informations; |
| 55 | + } |
| 56 | + application_informations() = default; |
| 57 | + xtd::ustring company_name_; |
| 58 | + xtd::ustring product_description_; |
| 59 | + xtd::ustring product_name_; |
| 60 | + xtd::ustring product_version_; |
| 61 | + }; |
| 62 | + } |
| 63 | +} |
0 commit comments