Пример #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         Element.SeekRequested     -= OnSeekRequested;
         Element.StateRequested    -= OnStateRequested;
         Element.PositionRequested -= OnPositionRequested;
         _mediaView?.Unrealize();
         if (_player != null)
         {
             _player.PlaybackStarted          -= OnPlaybackStarted;
             _player.PlaybackPaused           -= OnPlaybackPaused;
             _player.PlaybackStopped          -= OnPlaybackStopped;
             _player.PlaybackCompleted        -= OnPlaybackCompleted;
             _player.BufferingProgressUpdated -= OnBufferingProgressUpdated;
             _player.ErrorOccurred            -= OnErrorOccurred;
             _player.MediaPrepared            -= OnMediaPrepared;
             _player.Dispose();
         }
         if (_controller != null)
         {
             _controller.Parent = null;
             Platform.SetRenderer(_controller, null);
         }
         _nativeController?.Unrealize();
         Control?.Unrealize();
     }
     base.Dispose(disposing);
 }
Пример #2
0
 void RemoveCircleSurfaceItem(ICircleSurfaceItem item)
 {
     if (_circleSurfaceItems.TryGetValue(item, out var widget))
     {
         EvasObject obj = widget as EvasObject;
         obj?.Unrealize();
         _circleSurfaceItems.Remove(item);
     }
 }
Пример #3
0
 public override void RemoveNativeView(EvasObject native)
 {
     UnBinding(native);
     if (_nativeTable.TryGetValue(native, out View? view))
     {
         native.Unrealize();
         _nativeTable.Remove(native);
     }
 }
        void RemovePage(EvasObject del)
        {
            _pageToNative.Remove(_nativeToPage[del]);
            _nativeToPage.Remove(del);
            _navigationStack.Remove(del);

            del.Hide();
            del.Unrealize();
        }
Пример #5
0
 public void Remove(EvasObject view)
 {
     InternalStack.Remove(view);
     UnPack(view);
     UpdateTopView();
     Device.BeginInvokeOnMainThread(() =>
     {
         view?.Unrealize();
     });
 }
Пример #6
0
 public void Remove(EvasObject view)
 {
     InternalStack.Remove(view);
     UnPack(view);
     UpdateTopView();
     EcoreMainloop.Post(() =>
     {
         view?.Unrealize();
     });
 }
Пример #7
0
 public void Remove(EvasObject view)
 {
     InternalStack.Remove(view);
     UnPack(view);
     UpdateTopView();
     Application.Current.Dispatcher.Dispatch(() =>
     {
         view?.Unrealize();
     });
 }
Пример #8
0
        void UpdateTitleView(View titleView)
        {
            _nativeTitleView?.Unrealize();
            _nativeTitleView = null;

            if (titleView != null)
            {
                var renderer = Platform.GetOrCreateRenderer(titleView);
                (renderer as LayoutRenderer)?.RegisterOnLayoutUpdated();
                _nativeTitleView = renderer.NativeView;
                PackEnd(_nativeTitleView);
            }
        }
Пример #9
0
        /// <summary>
        /// Handles the disposing of a dialog widget.
        /// </summary>
        protected override void OnUnrealize()
        {
            _content?.Unrealize();
            _positiveButton?.Unrealize();
            _neutralButton?.Unrealize();
            _negativeButton?.Unrealize();
            ApplyButton(ButtonPosition.Positive, null);
            ApplyButton(ButtonPosition.Neutral, null);
            ApplyButton(ButtonPosition.Negative, null);
            ApplyContent(null);

            base.OnUnrealize();
        }
        void FillContent()
        {
            if (_content != null)
            {
                if (_content is Native.Box contentBox)
                {
                    contentBox.LayoutUpdated -= OnContentLayoutUpdated;
                }
                Control.SetContent(null, true);
                _content.Unrealize();
                _content = null;
            }

            if (Element.Content != null)
            {
                _content = Platform.GetOrCreateRenderer(Element.Content).NativeView;
                if (_content is Native.Box contentBox)
                {
                    contentBox.LayoutUpdated += OnContentLayoutUpdated;
                }
                Control.SetContent(_content, true);
                UpdateContentSize();
            }
        }
Пример #11
0
 public override void RemoveNativeView(EvasObject native)
 {
     native?.Unrealize();
 }
Пример #12
0
        public override EvasObject CreateContent(EvasObject parent)
        {
            if (_conformant == null)
            {
                return(null);
            }

            Box box = new ColoredBox(parent);

            box.Show();

            var rect = new Rectangle(parent)
            {
                WeightX    = 1,
                WeightY    = 1,
                AlignmentX = -1,
                AlignmentY = -1,
            };

            box.PackEnd(rect);

            #region FABs
            MFloatingActionButton fab = new MFloatingActionButton(_conformant);
            fab.Show();
            fab.Resize(180, 176);
            fab.Move(540, 1070);

            Image img = new Image(parent);
            //The source of icon resources is https://materialdesignicons.com/
            img.Load(Path.Combine(MaterialGallery.ResourceDir, "alarm.png"));
            img.Show();
            fab.Icon = img;

            MFloatingActionButton fab2 = new MFloatingActionButton(_conformant);
            fab2.Show();
            fab2.Resize(180, 176);
            fab2.Move(540, 940);

            Image img2 = new Image(parent);
            //The source of icon resources is https://materialdesignicons.com/
            img2.Load(Path.Combine(MaterialGallery.ResourceDir, "airplane.png"));
            img2.Show();
            fab2.Icon = img2;

            MFloatingActionButton fab3 = new MFloatingActionButton(_conformant);
            fab3.Show();
            fab3.Resize(180, 176);
            fab3.Move(540, 810);

            Image img3 = new Image(parent);
            //The source of icon resources is https://materialdesignicons.com/
            img3.Load(Path.Combine(MaterialGallery.ResourceDir, "bluetooth.png"));
            img3.Show();
            fab3.Icon = img3;
            #endregion

            if (Elementary.GetProfile() == "wearable")
            {
                fab.Move(90, 20);
                fab2.Move(90, 200);
                fab3.Move(90, 400);

                fab.Clicked += (s, e) =>
                {
                    parent.Unrealize();
                };
            }
            else if (Elementary.GetProfile() == "tv")
            {
                fab.Move(1340, 870);
                fab2.Move(1340, 740);
                fab3.Move(1340, 610);
            }

            return(box);
        }
Пример #13
0
		public override void RemoveNativeView(EvasObject platformView)
		{
			platformView?.Unrealize();
		}