Class EditablesContainer
Definition
- Namespace:
- Tizen.Applications.WatchfaceComplication
- Assembly:
- Tizen.Applications.WatchfaceComplication.dll
- API Level:
- 6
Represents the editables container for a watch application.
C#Copypublic abstract class EditablesContainer : IDisposable
- Inheritance
-
System.ObjectEditablesContainer
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copyprotected EditablesContainer()
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when some parameter are invalid. |
System.InvalidOperationException | Thrown when the method failed due to invalid operation. |
System.NotSupportedException | Thrown when the watchface complication is not supported. |
API Level: 6
Methods
Declaration
C#Copypublic void Add(Complication comp, int editableId)
Parameters
Type | Name | Description |
---|---|---|
Complication | comp | The Complication object. |
System.Int32 | editableId | The editable id. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when the invalid parameter is passed. |
System.InvalidOperationException | Thrown when the method failed due to invalid operation. |
API Level: 6
Declaration
C#Copypublic void Add(DesignElement de, int editableId)
Parameters
Type | Name | Description |
---|---|---|
DesignElement | de | The DesignElement object. |
System.Int32 | editableId | The editable id. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when the invalid parameter is passed. |
System.InvalidOperationException | Thrown when the method failed due to invalid operation. |
API Level: 6
Declaration
C#Copypublic void Dispose()
API Level: 3
Dispose(Boolean)
Releases the unmanaged resources used by the EditablesContainer class specifying whether or not to perform a normal dispose operation.
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true for a normal dispose operation; false to finalize the handle. |
API Level: 3
Declaration
C#Copyprotected void Finalize()
Declaration
C#Copypublic bool IsExist(int editableId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | editableId | The target editable Id. |
Returns
Type | Description |
---|---|
System.Boolean | true if the editable already exists in edit list, otherwise false |
API Level: 6
Declaration
C#Copypublic static Bundle LoadCurrentData(int editableId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | editableId | The id of the editable. |
Returns
Type | Description |
---|---|
Bundle | The editable's latest data that selected by editor. |
Remarks
This method loads the last editable data which is updated by editor application.
Examples
Copyinternal void InitEditables() { _container = new MyContainer(); Bundle curData = EditablesContainer.LoadCurrentData(_colorEditId); List<Bundle> candidatesList = new List<Bundle>(); int curIdx = 0; int i = 0; foreach (string str in _colorArr) { Bundle data = new Bundle(); data.AddItem(_colorKey, str); candidatesList.Add(data); if (curData != null && curData.GetItem(_colorKey) != null && curData.GetItem(_colorKey).Equals(str)) { curIdx = i; } i++; } ColorDesign colorEdit = new ColorDesign(candidatesList, curIdx, "COLOR", _complicationBtn); colorEdit.Highlight = new Highlight(ShapeType.Circle, 0, 40, 10, 10); _container.Add(colorEdit, _colorEditId); }
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when some parameter are invalid. |
System.InvalidOperationException | Thrown when the method failed due to invalid operation. |
System.NotSupportedException | Thrown when the watchface complication is not supported. |
API Level: 6
OnEditReady(String)
Overrides this method if you want to handle the behavior when the editor is ready to edit.
Declaration
C#Copyprotected abstract void OnEditReady(string editorId)
Parameters
Type | Name | Description |
---|---|---|
System.String | editorId | The appid of ready to edit editor. |
API Level: 6
Declaration
C#Copypublic void Remove(int editableId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | editableId | The editable id. |
Examples
Copyif (myContainer.IsExist(_colorEditId) myContainer.Remove(_colorEditId);
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when the invalid parameter is passed. |
API Level: 6
Declaration
C#Copypublic void RequestEdit()
Examples
Copypublic class MyContainer : EditablesContainer { public MyContainer() : base() { } protected override void OnEditReady(string editorId) { this.RequestEdit(); } }
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the method failed due to invalid operation. |
System.NotSupportedException | Thrown when the watchface complication is not supported. |
UnauthorizedAccessException | Thrown when the application does not have privilege to access this method. |