namespace Tizen.NUI
{
/// <summary>
- /// This class represents a NUIGadget controlled lifecycles.
+ /// Represents a NUIGadget controlled lifecycle.
/// </summary>
+ /// <remarks>
+ /// This class provides functionality related to managing the lifecycle of a NUIGadget.
+ /// It enables developers to handle events such as initialization, activation, deactivation, and destruction of the gadget.
+ /// By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their gadgets accordingly.
+ /// </remarks>
/// <since_tizen> 10 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class NUIGadget
/// <summary>
/// Initializes the gadget.
/// </summary>
- /// /// <param name="type">The type of the NUIGadget.</param>
+ /// <param name="type">The type of the NUIGadget.</param>
+ /// <remarks>
+ /// This constructor initializes a new instance of the NUIGadget class based on the specified type.
+ /// It is important to provide the correct type argument in order to ensure proper functionality and compatibility with other components.
+ /// </remarks>
/// <since_tizen> 10 </since_tizen>
public NUIGadget(NUIGadgetType type)
{
/// <summary>
/// Gets the class representing information of the current gadget.
/// </summary>
- /// <remarks> This property is set before the OnCreate() is called, after the instance has been created. </remarks>
+ /// <remarks>
+ /// This property is set before the OnCreate() is called, after the instance has been created.
+ /// It provides details about the current gadget such as its ID, name, version, and other relevant information.
+ /// By accessing this property, developers can retrieve the necessary information about the gadget they are working on.
+ /// </remarks>
/// <since_tizen> 10 </since_tizen>
public NUIGadgetInfo NUIGadgetInfo
{
}
/// <summary>
- /// Gets the type.
+ /// Gets the type of the NUI gadget.
/// </summary>
/// <since_tizen> 10 </since_tizen>
public NUIGadgetType Type
/// <summary>
/// Gets the class name.
/// </summary>
- /// <remarks> This property is set before the OnCreate() is called, after the instance has been created. </remarks>
+ /// <remarks>
+ /// This property is set before the OnCreate() is called, after the instance has been created.
+ /// It provides access to the name of the class that was used to create the current instance.
+ /// </remarks>
/// <since_tizen> 10 </since_tizen>
public string ClassName
{
}
/// <summary>
- /// Gets the main view.
+ /// Gets the main view of the NUI gadget..
/// </summary>
/// <since_tizen> 10 </since_tizen>
public View MainView
}
/// <summary>
- /// Gets the lifecycle state.
+ /// Gets the current lifecycle state of the gadget.
/// </summary>
/// <since_tizen> 10 </since_tizen>
public NUIGadgetLifecycleState State
/// <summary>
/// Gets the resource manager.
/// </summary>
- /// <remarks> This property is set before the OnCreate() is called, after the instance has been created. </remarks>
+ /// <remarks> This property is set before the OnCreate() is called, after the instance has been created.
+ /// It provides access to various resources such as images, sounds, and fonts that can be used in your application.
+ /// By utilizing the resource manager, you can easily manage and retrieve these resources without having to manually handle their loading and unloading.
+ /// Additionally, the resource manager ensures efficient memory management by automatically handling the caching and recycling of resources.
+ /// </remarks>
/// <since_tizen> 10 </since_tizen>
public NUIGadgetResourceManager NUIGadgetResourceManager
{
}
/// <summary>
- /// Overrides this method if want to handle behavior when the gedget is started.
- /// If 'base.OnCreate()' is not called, the event 'NUIGadgetLifecycleChanged' with the 'NUIGadgetLifecycleState.Created' state will not be emitted.
+ /// Override this method to define the behavior when the gadget is created.
+ /// Calling 'base.OnCreate()' is necessary in order to emit the 'NUIGadgetLifecycleChanged' event with the 'NUIGadgetLifecycleState.Created' state.
/// </summary>
/// <returns>The main view object.</returns>
/// <since_tizen> 10 </since_tizen>
/// <summary>
/// Overrides this method if want to handle behavior when the gadget receives the appcontrol message.
/// </summary>
- /// <param name="e">The appcontrol received event argument.</param>
+ /// <remarks>
+ /// This method provides a way to customize the response when the gadget receives an appcontrol message.
+ /// By overriding this method in your derived class, you can define specific actions based on the incoming arguments.
+ /// </remarks>
+ /// <param name="e">The appcontrol received event argument containing details about the received message.</param>
/// <since_tizen> 10 </since_tizen>
protected virtual void OnAppControlReceived(AppControlReceivedEventArgs e)
{
}
/// <summary>
- /// Overrides this method if want to handle behavior when the gadget is destroyed.
- /// If 'base.OnDestroy()' is not called. the event 'NUIGadgetLifecycleChanged' with the 'NUIGadgetLifecycleState.Destroyed' state will not be emitted.
+ /// Override this method to handle the behavior when the gadget is destroyed.
+ /// If 'base.OnDestroy()' is not called, the 'NUIGadgetLifecycleChanged' event with the 'NUIGadgetLifecycleState.Destroyed' state will not be emitted.
/// </summary>
/// <since_tizen> 10 </since_tizen>
protected virtual void OnDestroy()
namespace Tizen.NUI
{
/// <summary>
- /// This class provides properties to get information the gadget.
+ /// This class provides properties to retrieve information the gadget.
/// </summary>
/// <since_tizen> 10 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
namespace Tizen.NUI
{
/// <summary>
- /// Arguments for the event raised when the NUIGadget lifecycle is changed.
+ /// Event arguments for the NUIGadget lifecycle change event.
/// </summary>
/// <since_tizen> 10 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
public class NUIGadgetLifecycleChangedEventArgs : EventArgs
{
/// <summary>
- /// The NUIGadget object.
+ /// Gets the NUIGadget object that triggered the event.
/// </summary>
/// <since_tizen> 10 </since_tizen>
public NUIGadget Gadget { get; internal set; }
/// <summary>
- /// The state of the NUIGadget lifecycle.
+ /// Gets the current state of the NUIGadget lifecycle.
/// </summary>
/// <since_tizen> 10 </since_tizen>
public NUIGadgetLifecycleState State { get; internal set; }
namespace Tizen.NUI
{
/// <summary>
- /// This class has the methods and events of the NUIGadgetManager.
+ /// The NUIGadgetManager provides methods and events related to managing gadgets in the NUI.
/// </summary>
/// <since_tizen> 10 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
/// <summary>
/// Occurs when the lifecycle of the NUIGadget is changed.
/// </summary>
+ /// <remarks>
+ /// This event is raised when the state of the NUIGadget changes.
+ /// It provides information about the current state through the NUIGadgetLifecycleChangedEventArgs argument.
+ /// </remarks>
/// <since_tizen> 10 </since_tizen>
public static event EventHandler<NUIGadgetLifecycleChangedEventArgs> NUIGadgetLifecycleChanged;
/// Loads an assembly of the NUIGadget.
/// </summary>
/// <param name="resourceType">The resource type of the NUIGadget package.</param>
+ /// <remarks>
+ /// This method loads an assembly of the NUIGadget based on the specified resource type.
+ /// It throws an ArgumentException if the argument is invalid, or an InvalidOperationException if the operation fails due to any reason.
+ /// </remarks>
/// <exception cref="ArgumentException">Thrown when failed because of a invalid argument.</exception>
/// <exception cref="InvalidOperationException">Thrown when failed because of an invalid operation.</exception>
/// <since_tizen> 10 </since_tizen>
/// Loads an assembly of the NUIGadget.
/// </summary>
/// <param name="resourceType">The resource type of the NUIGadget package.</param>
- /// <param name="useDefaultContext">The flag if ture, use a default load context. Otherwise, use a new load context.</param>
- /// <exception cref="ArgumentException">Thrown when failed because of a invalid argument.</exception>
- /// <exception cref="InvalidOperationException">Thrown when failed because of an invalid operation.</exception>
+ /// <param name="useDefaultContext">Indicates whether to use a default load context or not.</param>
+ /// <exception cref="ArgumentException">Thrown when failed due to an invalid argument.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when failed due to an invalid operation.</exception>
/// <since_tizen> 10 </since_tizen>
public static void Load(string resourceType, bool useDefaultContext)
{
}
/// <summary>
- /// Unloads the loaded assembly of the NUIGadget.
+ /// Unloads the specified NUIGadget assembly from memory.
/// </summary>
- /// <param name="resourceType">The resource type of the NUIGadget package.</param>
- /// <exception cref="ArgumentException">Thrown when failed because of a invalid argument.</exception>
+ /// <remarks>
+ /// To use this method properly, the assembly of the gadget must be loaded using Load() with the custom context.
+ /// </remarks>
+ /// <param name="resourceType">The resource type of the NUIGadget package to unload.</param>
+ /// <exception cref="ArgumentException">Thrown when the argument passed is not valid.</exception>
+ /// <example>
+ /// <code>
+ /// /// Load an assembly of the NUIGadget.
+ /// NUIGadgetManager.Load("org.tizen.appfw.gadget.NetworkSetting", false);
+ /// /// NUIGadgetManager.Add("org.tizen.appfw.gadget.NetworkSetting", "NetworkSettingGadget", false);
+ ///
+ /// /// Unload the loaded assembly
+ /// NUIGadgetManager.Unload("org.tizen.appfw.gadget.NetworkSetting");
+ /// </code>
+ /// </example>
/// <since_tizen> 10 </since_tizen>
public static void Unload(string resourceType)
{
/// <summary>
/// Adds a NUIGadget to the NUIGadgetManager.
/// </summary>
+ /// <remarks>
+ /// To use Unload() method, the useDefaultContext must be'false'.
+ /// </remarks>
/// <param name="resourceType">The resource type of the NUIGadget package.</param>
/// <param name="className">The class name of the NUIGadget.</param>
/// <param name="useDefaultContext">The flag it true, use a default context. Otherwise, use a new load context.</param>
}
/// <summary>
- /// Gets the instance of the running NUIGadgets.
+ /// Retrieves the instances of currently running NUIGadgets.
/// </summary>
- /// <returns>The NUIGadget list.</returns>
+ /// <returns>An enumerable list containing all the active NUIGadgets.</returns>
/// <since_tizen> 10 </since_tizen>
public static IEnumerable<NUIGadget> GetGadgets()
{
}
/// <summary>
- /// Gets the information of the available NUIGadgets.
+ /// Retrieves information about available NUIGadgets.
/// </summary>
/// <remarks>
- /// This method only returns the available gadget informations, not all installed gadget informations.
- /// The resource package of the NUIGadget can set the allowed packages using "allowed-package".
- /// When executing an application, the platform mounts the resource package into the resource path of the application.
+ /// This method provides details on gadgets that are currently accessible rather than listing all installed gadgets.
+ /// A NUIGadget's resource package may specify which applications have access through the "allowed-packages" setting.
+ /// During execution, the platform mounts the resource package in the application's resources directory.
/// </remarks>
- /// <returns>The NUIGadgetInfo list.</returns>
+ /// <returns>An enumerable list of NUIGadgetInfo objects.</returns>
/// <since_tizen> 10 </since_tizen>
public static IEnumerable<NUIGadgetInfo> GetGadgetInfos()
{
}
/// <summary>
- /// Removes the NUIGadget from the NUIGadgetManager.
+ /// Removes the specified NUIGadget from the NUIGadgetManager.
/// </summary>
- /// <param name="gadget">The NUIGadget object.</param>
+ /// <param name="gadget">The NUIGadget object that needs to be removed.</param>
+ /// <remarks>
+ /// This method allows you to remove a specific NUIGadget from the NUIGadgetManager.
+ /// By passing the NUIGadget object as an argument, you can ensure that only the desired gadget is removed.
+ /// It is important to note that once a gadget is removed, any references to it become invalid.
+ /// Therefore, it is crucial to handle the removal process carefully to avoid any potential issues.
+ /// </remarks>
/// <since_tizen> 10 </since_tizen>
public static void Remove(NUIGadget gadget)
{
/// <summary>
/// Removes all NUIGadgets from the NUIGadgetManager.
/// </summary>
+ /// <remarks>
+ /// This method is called to remove all NUIGadgets that are currently registered in the NUIGadgetManager.
+ /// It ensures that no more NUIGadgets exist after calling this method.
+ /// </remarks>
/// <since_tizen> 10 </since_tizen>
public static void RemoveAll()
{
}
/// <summary>
- /// Resumes the running NUIGadget.
+ /// Resumes the execution of the specified NUIGadget.
/// </summary>
- /// <param name="gadget">The NUIGadget object.</param>
+ /// <remarks>
+ /// By calling this method, you can resume the execution of the currently suspended NUIGadget.
+ /// It takes the NUIGadget object as an argument which represents the target gadget that needs to be resumed.
+ /// </remarks>
+ /// <param name="gadget">The NUIGadget object whose execution needs to be resumed.</param>
+ /// <exception cref="ArgumentNullException">Thrown if the 'gadget' argument is null.</exception>
+ /// <example>
+ /// To resume the execution of a specific NUIGadget named 'MyGadget', you can call the following code snippet:
+ ///
+ /// <code>
+ /// // Get the reference to the NUIGadget object
+ /// NUIGadget MyGadget = ...;
+ ///
+ /// // Resume its execution
+ /// GadgetResume(MyGadget);
+ /// </code>
+ /// </example>
/// <since_tizen> 10 </since_tizen>
public static void Resume(NUIGadget gadget)
{
+ if (gadget == null)
+ {
+ throw new ArgumentNullException(nameof(gadget));
+ }
+
if (!_gadgets.Contains(gadget))
{
return;
}
/// <summary>
- /// Pauses the running NUIGadget.
+ /// Pauses the execution of the specified NUIGadget.
/// </summary>
- /// <param name="gadget">The NUIGadget object.</param>
+ /// <remarks>
+ /// Calling this method pauses the currently executing NUIGadget. It does not affect any other gadgets that may be running simultaneously.
+ /// </remarks>
+ /// <param name="gadget">The NUIGadget object whose execution needs to be paused.</param>
+ /// <exception cref="ArgumentNullException">Thrown if the argument 'gadget' is null.</exception>
/// <since_tizen> 10 </since_tizen>
public static void Pause(NUIGadget gadget)
{
+ if (gadget == null)
+ {
+ throw new ArgumentNullException(nameof(gadget));
+ }
+
if (!_gadgets.Contains(gadget))
{
return;
}
/// <summary>
- /// Sends the appcontrol to the running NUIGadget.
+ /// Sends the specified application control to the currently running NUIGadget.
/// </summary>
- /// <param name="gadget">The NUIGadget object.</param>
- /// <param name="appControl">The appcontrol object.</param>
- /// <exception cref="ArgumentException">Thrown when failed because of a invalid argument.</exception>
- /// <exception cref="ArgumentNullException">Thrown when failed because the argument is null.</exception>
+ /// <param name="gadget">The NUIGadget object that will receive the app control.</param>
+ /// <param name="appControl">The app control object containing the desired arguments and actions.</param>
+ /// <exception cref="ArgumentException">Thrown if any of the arguments are invalid or missing.</exception>
+ /// <exception cref="ArgumentNullException">Thrown if either 'gadget' or 'appControl' is null.</exception>
/// <since_tizen> 10 </since_tizen>
public static void SendAppControl(NUIGadget gadget, AppControl appControl)
{
namespace Tizen.NUI
{
/// <summary>
- /// This class has the methods of the NUIGadgetResourceManager.
+ /// Manages resources related to NUI gadgets.
/// </summary>
/// <since_tizen> 10 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
/// Initializes the resource manager of the gadget.
/// </summary>
/// <param name="info">The information of the gadget.</param>
- /// <exception cref="ArgumentNullException">Thrown when failed because of a invalid argument.</exception>
- /// <since_tizen> 11 </since_tizen>
+ /// <exception cref="ArgumentNullException">Thrown when the argument is not valid.</exception>
+ /// <since_tizen> 10 </since_tizen>
public NUIGadgetResourceManager(NUIGadgetInfo info)
{
if (info == null)
/// <summary>
/// Initializes the resource manager of the gadget.
/// </summary>
- /// <param name="resourcePath">The path of the resource</param>
- /// <param name="resourceDll">The file name of the resource.</param>
- /// <param name="resourceClassName">The class name of the resource.</param>
+ /// <param name="resourcePath">The path where the resources are located.</param>
+ /// <param name="resourceDll">The name of the DLL containing the resources.</param>
+ /// <param name="resourceClassName">The name of the class that represents the resources.</param>
/// <since_tizen> 10 </since_tizen>
public NUIGadgetResourceManager(string resourcePath, string resourceDll, string resourceClassName)
{
}
/// <summary>
- /// Get the value of the specified string resource.
+ /// Retrieves the value of the specified string resource.
/// </summary>
- /// <param name="name">The name of the resource to retrieve.</param>
- /// <returns>The value of the resource, or null if name cannot be found in a resource set.</returns>
+ /// <param name="name">The unique identifier for the string resource to retrieve.</param>
+ /// <returns>The value of the requested string resource, or null if no matching resource could be found.</returns>
+ /// <remarks>
+ /// This function allows you to access localized string resources by providing their names.
+ /// It returns the actual value of the requested resource, which can then be displayed to users or used elsewhere in your application logic.
+ /// If the specified resource does not exist or cannot be found, the function will return null instead.
+ /// </remarks>
+ /// <example>
+ /// Here's an example demonstrating how to retrieve a string resource named "greeting" from the current context:
+ ///
+ /// <code>
+ /// // Retrieve the greeting message
+ /// string greetingMessage = GetString("greeting");
+ ///
+ /// // Display the greeting message to the user
+ /// Console.WriteLine(greetingMessage);
+ /// </code>
+ /// </example>
/// <since_tizen> 10 </since_tizen>
public string GetString(string name)
{
}
/// <summary>
- /// Gets the return value of the string resource localized for the specified culture.
+ /// Retrieves the localized string resource for the specified culture.
/// </summary>
- /// <param name="name">The name of the resource to retrieve.</param>
- /// <param name="cultureInfo">An object that represents the culture for which the resource is localied.</param>
- /// <returns>The value of the resource localied for the specified culture, or null if name cannot be found in a resource set.</returns>
- /// <exception cref="ArgumentNullException">Thrown when failed because of a invalid argument.</exception>
+ /// <remarks>
+ /// This method enables you to obtain a localized version of a specific string resource based on the provided culture.
+ /// It returns the desired resource value or null if the requested resource cannot be found in the resource set.
+ /// </remarks>
+ /// <param name="name">The name of the resource to fetch.</param>
+ /// <param name="cultureInfo">An object representing the culture for which the resource needs to be localized.</param>
+ /// <returns>The localized string resource for the specified culture, or null if the resource cannot be found.</returns>
+ /// <exception cref="ArgumentNullException">Thrown when an invalid argument causes failure.</exception>
/// <since_tizen> 10 </since_tizen>
public string GetString(string name, CultureInfo cultureInfo)
{