Class EditablesContainer

Definition

Namespace:
Tizen.Applications.WatchfaceComplication
Assembly:
Tizen.Applications.WatchfaceComplication.dll
API Level:
6

Represents the editables container for a watch application.

C#
Copy
public abstract class EditablesContainer : IDisposable
Inheritance
System.Object
EditablesContainer
Implements
System.IDisposable

Constructors

View Source

EditablesContainer()

Initializes the EditablesContainer class.

Declaration
C#
Copy
protected 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

View Source

Add(Complication, Int32)

Adds the Complication to edit list.

Declaration
C#
Copy
public void Add(Complication comp, int editableId)
Parameters
Type Name Description
Complication comp

The Complication object.

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
View Source

Add(DesignElement, Int32)

Adds the DesignElement to edit list.

Declaration
C#
Copy
public void Add(DesignElement de, int editableId)
Parameters
Type Name Description
DesignElement de

The DesignElement object.

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
View Source

Dispose()

Releases all resources used by the EditablesContainer instance.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Dispose(Boolean)

Releases the unmanaged resources used by the EditablesContainer class specifying whether or not to perform a normal dispose operation.

Declaration
C#
Copy
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
Boolean disposing

true for a normal dispose operation; false to finalize the handle.

API Level: 3
View Source

Finalize()

Destructor of the EditablesContainer class.

Declaration
C#
Copy
protected void Finalize()
View Source

IsExist(Int32)

Checks whether editableId already exists in edit list.

Declaration
C#
Copy
public bool IsExist(int editableId)
Parameters
Type Name Description
Int32 editableId

The target editable Id.

Returns
Type Description
Boolean

true if the editable already exists in edit list, otherwise false

API Level: 6
View Source

LoadCurrentData(Int32)

Loads the editable's current data.

Declaration
C#
Copy
public static Bundle LoadCurrentData(int editableId)
Parameters
Type Name Description
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
Copy
internal 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
View Source

OnEditReady(String)

Overrides this method if you want to handle the behavior when the editor is ready to edit.

Declaration
C#
Copy
protected abstract void OnEditReady(string editorId)
Parameters
Type Name Description
System.String editorId

The appid of ready to edit editor.

API Level: 6
View Source

Remove(Int32)

Removes the editable from edit list.

Declaration
C#
Copy
public void Remove(int editableId)
Parameters
Type Name Description
Int32 editableId

The editable id.

Examples
Copy
if (myContainer.IsExist(_colorEditId) myContainer.Remove(_colorEditId);
Exceptions
Type Condition
System.ArgumentException

Thrown when the invalid parameter is passed.

API Level: 6
View Source

RequestEdit()

Requests edit to editor application.

Declaration
C#
Copy
public void RequestEdit()
Examples
Copy
public 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.

API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharing

Implements

System.IDisposable