Class TimeData
Definition
- Namespace:
- Tizen.Applications.WatchfaceComplication
- Assembly:
- Tizen.Applications.WatchfaceComplication.dll
Represents the time data for a complication.
public class TimeData : ComplicationData
- Inheritance
Constructors
View SourceTimeData(long, string, string)
Initializes the TimeData class.
Declaration
public TimeData(long timestamp, string iconPath, string extraData)
Parameters
Type | Name | Description |
---|---|---|
long | timestamp | The timestamp value. |
string | iconPath | The icon path. |
string | extraData | The extra data. |
Examples
protected override ComplicationData OnDataUpdateRequested(string reqestAppId, ComplicationTypes type, Bundle contextData)
{
if (type == ComplicationTypes.Time)
{
return new TimeData((Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds, "icon path", "extra");
}
else if (type == ComplicationTypes.LongText)
{
return new LongTextData("longlong", "icon path", "title", null);
}
}
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when parameter is invalid. |
Properties
View SourceExtraData
The extra data.
Declaration
public string ExtraData { get; set; }
Property Value
Type | Description |
---|---|
string |
IconPath
The icon path data.
Declaration
public string IconPath { get; set; }
Property Value
Type | Description |
---|---|
string |
ScreenReaderText
The information about the screen reader text of complication data.
Declaration
public string ScreenReaderText { get; set; }
Property Value
Type | Description |
---|---|
string |
Timestamp
The information about the timestamp of complication data.
Declaration
public long Timestamp { get; set; }
Property Value
Type | Description |
---|---|
long |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when try to set invalid value. |