-
Notifications
You must be signed in to change notification settings - Fork 241
/
IconData.cs
executable file
·95 lines (91 loc) · 2.87 KB
/
IconData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using System;
using System.Collections.Generic;
using System.Text;
namespace Tizen.Applications.WatchfaceComplication
{
/// <summary>
/// Represents the icon data for a complication.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public class IconData : ComplicationData
{
/// <summary>
/// Initializes the IconData class.
/// </summary>
/// <param name="iconPath">The icon path.</param>
/// <param name="extraData">The extra data.</param>
/// <exception cref="ArgumentException">Thrown when parameter is invalid.</exception>
/// <example>
/// <code>
/// protected override ComplicationData OnDataUpdateRequested(string reqestAppId, ComplicationTypes type, Bundle contextData)
/// {
/// if (type == ComplicationTypes.Icon)
/// {
/// return new IconData("Icon", "extra");
/// }
/// else if (type == ComplicationTypes.LongText)
/// {
/// return new LongTextData("longlong", "icon path", "title", null);
/// }
/// }
/// </code>
/// </example>
/// <since_tizen> 6 </since_tizen>
public IconData(string iconPath, string extraData)
{
if (iconPath == null)
ErrorFactory.ThrowException(ComplicationError.InvalidParam, "icon path can not be null");
Type = ComplicationTypes.Icon;
IconPath = iconPath;
ExtraData = extraData;
}
/// <summary>
/// The icon path data.
/// </summary>
/// <exception cref="ArgumentException">Thrown when try to set invalid value.</exception>
/// <since_tizen> 6 </since_tizen>
public new string IconPath
{
get
{
return base.IconPath;
}
set
{
if (value == null)
ErrorFactory.ThrowException(ComplicationError.InvalidParam, "icon path can not be null");
base.IconPath = value;
}
}
/// <summary>
/// The extra data.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public new string ExtraData
{
get
{
return base.ExtraData;
}
set
{
base.ExtraData = value;
}
}
/// <summary>
/// The information about the screen reader text of complication data.
/// </summary>
/// <since_tizen> 6 </since_tizen>
public new string ScreenReaderText
{
get
{
return base.ScreenReaderText;
}
set
{
base.ScreenReaderText = value;
}
}
}
}