Пример #1
0
 /// <summary>
 /// Initializes RemoteViewFactory.
 /// </summary>
 /// <param name="win">Window object that will contain RemoteViews that are generated by RemoteViewFactory.
 /// All the remote views will be located in the specified window object.
 /// </param>
 /// <privilege>http://tizen.org/privilege/widget.viewer</privilege>
 /// <exception cref="InvalidOperationException">Thrown when this operation failed.</exception>
 /// <exception cref="UnauthorizedAccessException">Thrown when this operation is denied.</exception>
 /// <exception cref="NotSupportedException">Thrown when this operation is not supported for this device.</exception>
 /// <since_tizen> 3 </since_tizen>
 public static void Init(EvasObject win)
 {
     if (_ready)
     {
         throw new InvalidOperationException("Already initialized");
     }
     RemoteView.CheckException(Interop.WidgetViewerEvas.Init(win));
     _ready = true;
 }
Пример #2
0
 /// <summary>
 /// Finalizes the RemoteViewFactory.
 /// </summary>
 /// <privilege>http://tizen.org/privilege/widget.viewer</privilege>
 /// <exception cref="InvalidOperationException">Thrown when this operation failed.</exception>
 /// <exception cref="UnauthorizedAccessException">Thrown when this operation is denied.</exception>
 /// <exception cref="NotSupportedException">Thrown when this operation is not supported for this device.</exception>
 /// <since_tizen> 3 </since_tizen>
 public static void Shutdown()
 {
     if (!_ready)
     {
         throw new InvalidOperationException("Not initialized");
     }
     RemoteView.CheckException(Interop.WidgetViewerEvas.Fini());
     _ready = false;
 }
Пример #3
0
        private static EvasObject PrepareHandle(EvasObject parent, string widgetId, string content, double period)
        {
            _handle = Interop.WidgetViewerEvas.AddWidget(parent, widgetId, content, period);

            int err = Internals.Errors.ErrorFacts.GetLastResult();

            RemoteView.CheckException((Interop.WidgetViewerEvas.ErrorCode)err);

            if (_handle == IntPtr.Zero)
            {
                throw new InvalidOperationException("Return null pointer");
            }

            return(parent);
        }