/// http://tizen.org/privilege/haptic
/// For controlling the sound, privilege is not needed.
/// </privilege>
+ /// <example>
/// <code>
/// Feedback feedback = new Feedback();
/// bool res = feedback.IsSupportedPattern(FeedbackType.Vibration, "Tap");
/// </code>
+ /// </example>
public class Feedback
{
private const string LogTag = "Tizen.System.Feedback";
/// CapacityChanged is triggered when the battery charge percentage is changed.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
/// <code>
/// public static async Task BatteryEventHandler()
/// {
/// }
/// Battery.PercentChanged += handler;
/// await Task.Delay(20000);
- /// }
+ /// }
/// </code>
+ /// </example>
public static event EventHandler<BatteryPercentChangedEventArgs> PercentChanged
{
add
/// LevelChanged is triggered when the battery level is changed.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
/// <code>
/// public static async Task BatteryEventHandler()
/// {
/// }
/// Battery.LevelChanged += handler;
/// await Task.Delay(20000);
- /// }
+ /// }
/// </code>
+ /// </example>
public static event EventHandler<BatteryLevelChangedEventArgs> LevelChanged
{
add
/// This event is triggered when the charger is connected/disconnected.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
/// <code>
/// public static async Task BatteryEventHandler()
/// {
/// }
/// Battery.ChargingStateChanged += handler;
/// await Task.Delay(20000);
- /// }
+ /// }
/// </code>
+ /// </example>
public static event EventHandler<BatteryChargingStateChangedEventArgs> ChargingStateChanged
{
add
/// <privilege>
/// http://tizen.org/privilege/display
/// </privilege>
+ /// <example>
/// <code>
/// Console.WriteLine("Display current state is: {0}", Tizen.System.Display.State);
/// Console.WriteLine("Total number of Displays are: {0}", Tizen.System.Display.NumberOfDisplays);
/// </code>
+ /// </example>
public class Display
{
private readonly int _displayId;
/// The maximum brightness value that can be set for the specific display.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
/// <code>
/// Display display = Display.Displays[0];
/// Console.WriteLine("Display MaxBrightness is: {0}", display.MaxBrightness);
/// </code>
+ /// </example>
public int MaxBrightness
{
get
/// <since_tizen> 3 </since_tizen>
/// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
+ /// <example>
/// <code>
/// Display display = Display.Displays[0];
/// Console.WriteLine("Display current Brightness is: {0}", display.Brightness);
/// </code>
+ /// </example>
public int Brightness
{
get
/// StateChanged is raised when the state of the display is changed.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
/// <code>
/// public static async Task DisplayEventHandler()
/// {
/// }
/// Battery.StateChanged += handler;
/// await Task.Delay(20000);
- /// }
+ /// }
/// </code>
+ /// </example>
public static event EventHandler<DisplayStateChangedEventArgs> StateChanged
{
add
/// <privilege>
/// http://tizen.org/privilege/haptic
/// </privilege>
+ /// <example>
/// <code>
/// Console.WriteLine("Total number of Vibrators are: {0}", Tizen.System.Vibrator.NumberOfVibrators);
/// </code>
+ /// </example>
public class Vibrator : IDisposable
{
private readonly int _vibratorId;
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+ /// <example>
/// <code>
/// Vibrator vibrator = Vibrator.Vibrators[0];
/// try
/// {
/// }
/// </code>
+ /// </example>
public void Vibrate(int duration, int feedback)
{
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+ /// <example>
/// <code>
/// Vibrator vibrator = Vibrator.Vibrators[0];
/// try
/// {
/// }
/// </code>
+ /// </example>
public void Stop()
{
if (_hapticHandle != IntPtr.Zero)
/// <privilege>
/// http://tizen.org/privilege/use_ir
/// </privilege>
+ /// <example>
/// <code>
/// Console.WriteLine("IR availability for this device is: {0}", IR.IsAvailable);
/// </code>
+ /// </example>
public static class IR
{
/// <summary>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+ /// <example>
/// <code>
/// try
/// {
/// {
/// }
/// </code>
+ /// </example>
public static void Transmit(int carrierFreequency, IList<int> pattern)
{
int[] patternArray = pattern.ToArray();
/// <privilege>
/// http://tizen.org/privilege/led
/// </privilege>
+ /// <example>
/// <code>
/// Console.WriteLine("Led MaxBrightness is: {0}", Tizen.System.Led.MaxBrightness);
/// Console.WriteLine("Led current Brightness is: {0}", Tizen.System.Led.Brightness);
/// </code>
+ /// </example>
public static class Led
{
/// <summary>
/// <exception cref="ArgumentException"> When an invalid parameter value is set.</exception>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+ /// <example>
/// <code>
/// Console.WriteLine("Led current Brightness is: {0}", Tizen.System.Led.Brightness);
/// Tizen.System.Led.Brightness = 50;
/// Console.WriteLine("Led current Brightness is: {0}", Tizen.System.Led.Brightness);
/// </code>
+ /// </example>
public static int Brightness
{
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+ /// <example>
/// <code>
/// try
/// {
/// {
/// }
/// </code>
+ /// </example>
public static void Play(int on, int off, Color color)
{
//looks like only blink option is supported. So hard coded to default blink option.
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+ /// <example>
/// <code>
/// try
/// {
/// {
/// }
/// </code>
+ /// </example>
public static void Stop()
{
/// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
+ /// <example>
/// <code>
/// Tizen.System.Power.RequestCpuLock(2000);
/// </code>
+ /// </example>
public static void RequestCpuLock(int timeout)
{
/// <since_tizen> 3 </since_tizen>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
+ /// <example>
/// <code>
/// Tizen.System.Power.ReleaseCpuLock();
/// </code>
+ /// </example>
public static void ReleaseCpuLock()
{
DeviceError res = (DeviceError)Interop.Device.DevicePowerReleaseLock(0);