Beispiel #1
0
        /// <summary>
        /// Creates and initializes a new instance of the Button class.
        /// </summary>
        /// <param name="parent">
        /// The EvasObject to which the new Button will be attached as a child.
        /// </param>
        /// <since_tizen> preview </since_tizen>
        public Button(EvasObject parent) : base(parent)
        {
            _clicked  = new SmartEvent(this, this.RealHandle, "clicked");
            _repeated = new SmartEvent(this, this.RealHandle, "repeated");
            _pressed  = new SmartEvent(this, this.RealHandle, "pressed");
            _released = new SmartEvent(this, this.RealHandle, "unpressed");

            _clicked.On += (sender, e) =>
            {
                Clicked?.Invoke(this, EventArgs.Empty);
            };

            _repeated.On += (sender, e) =>
            {
                Repeated?.Invoke(this, EventArgs.Empty);
            };

            _pressed.On += (sender, e) =>
            {
                Pressed?.Invoke(this, EventArgs.Empty);
            };

            _released.On += (sender, e) =>
            {
                Released?.Invoke(this, EventArgs.Empty);
            };
        }
Beispiel #2
0
        /// <summary>
        /// Creates and initializes a new instance of the AnimationView class.
        /// </summary>
        /// <param name="parent">The parent is a given container, which will be attached by AnimationView as a child. It's <see cref="EvasObject"/> type.</param>
        /// <since_tizen> preview </since_tizen>
        public AnimationView(EvasObject parent) : base(parent)
        {
            _started  = new SmartEvent(this, this.Handle, "play,start");
            _repeated = new SmartEvent(this, this.Handle, "play,repeat");
            _finished = new SmartEvent(this, this.Handle, "play,done");
            _paused   = new SmartEvent(this, this.Handle, "play,pause");
            _resumed  = new SmartEvent(this, this.Handle, "play,resume");
            _stopped  = new SmartEvent(this, this.Handle, "play,stop");
            _updated  = new SmartEvent(this, this.Handle, "play,update");

            _started.On += (sender, e) =>
            {
                Started?.Invoke(this, EventArgs.Empty);
            };

            _repeated.On += (sender, e) =>
            {
                Repeated?.Invoke(this, EventArgs.Empty);
            };

            _finished.On += (sender, e) =>
            {
                Finished?.Invoke(this, EventArgs.Empty);
            };

            _paused.On += (sender, e) =>
            {
                Paused?.Invoke(this, EventArgs.Empty);
            };

            _resumed.On += (sender, e) =>
            {
                Resumed?.Invoke(this, EventArgs.Empty);
            };

            _stopped.On += (sender, e) =>
            {
                Stopped?.Invoke(this, EventArgs.Empty);
            };

            _updated.On += (sender, e) =>
            {
                Updated?.Invoke(this, EventArgs.Empty);
            };
        }
Beispiel #3
0
 protected internal virtual void OnRepeated(Todo nextTodo)
 {
     Repeated?.Invoke(this, new EventArgs <Todo>(nextTodo));
 }