Ejemplo n.º 1
0
        protected override void Dispose(DisposeTypes type)
        {
            if (disposed)
            {
                return;
            }

            if (type == DisposeTypes.Explicit)
            {
                if (selectAnimation != null)
                {
                    if (selectAnimation.State == Animation.States.Playing)
                    {
                        selectAnimation.Stop();
                    }
                    selectAnimation.Dispose();
                    selectAnimation = null;
                }

                container.RemoveAll();
                indicatorList.Clear();

                this.Remove(container);
                container.Dispose();
                container = null;
            }

            base.Dispose(type);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// you can override it to clean-up your own resources.
        /// </summary>
        /// <param name="type">DisposeTypes</param>
        /// <since_tizen> 8 </since_tizen>
        protected override void Dispose(DisposeTypes type)
        {
            if (disposed)
            {
                return;
            }

            if (type == DisposeTypes.Explicit)
            {
                container.RemoveAll();
                indicatorList.Clear();

                this.Remove(container);
                container.Dispose();
                container = null;
            }

            base.Dispose(type);
        }
Ejemplo n.º 3
0
        public void VisualViewConstructorWithCustomViewBehaviour()
        {
            tlog.Debug(tag, $"VisualViewConstructorWithCustomViewBehaviour START");

            ViewStyle style = new ViewStyle()
            {
                Size = new Size2D(200, 200),
                PositionUsesPivotPoint = true,
                ParentOrigin           = ParentOrigin.CenterRight,
                PivotPoint             = PivotPoint.CenterRight,
                BackgroundColor        = Color.Azure,
                Focusable = true,
            };

            var testingTarget = new VisualView(CustomViewBehaviour.DisableStyleChangeSignals, style);

            Assert.IsNotNull(testingTarget, "Can't create success object VisualView");
            Assert.IsInstanceOf <VisualView>(testingTarget, "Should be an instance of VisualView type.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"VisualViewConstructorWithCustomViewBehaviour END (OK)");
        }