Example #1
0
        void ReleaseDesignerOutlets()
        {
            if (FirstCell != null)
            {
                FirstCell.Dispose();
                FirstCell = null;
            }

            if (SecondCell != null)
            {
                SecondCell.Dispose();
                SecondCell = null;
            }

            if (ThirdCell != null)
            {
                ThirdCell.Dispose();
                ThirdCell = null;
            }

            if (PlayIcon != null)
            {
                PlayIcon.Dispose();
                PlayIcon = null;
            }
        }
Example #2
0
            public Section(Move move, State state)
            {
                this.move = move;
                switch (state)
                {
                case State.Attack:
                    attackIcon = new AttackIcon();
                    attackIcon.setTexture(AttackIcon.attackIcon);
                    break;

                case State.SoloAbility:
                    castIcon = new CastIcon();
                    castIcon.setTexture(CastIcon.castIcon);
                    break;

                case State.TargetAbility:
                    targetIcon = new TargetIcon();
                    targetIcon.setTexture(TargetIcon.targetIcon);
                    break;

                case State.PlayCard:
                    playIcon = new PlayIcon();
                    playIcon.setTexture(PlayIcon.playIcon);
                    break;
                }



                this.state = state;
                //attackIcon.setScale(CardScale.Hand);
            }
Example #3
0
        async void OnPlaybackStateChanged(object sender, EventArgs e)
        {
            if (BindingContext is not IMediaPlayer player)
            {
                throw new InvalidOperationException($"{nameof(BindingContext)} must be {nameof(IMediaPlayer)}");
            }

            if (player.State == PlaybackState.Playing)
            {
                await Task.WhenAll(PlayIcon.FadeTo(0, 100), PlayIcon.ScaleTo(3.0, 300));

                PlayIcon.IsVisible  = false;
                PlayIcon.Scale      = 1.0;
                PauseIcon.IsVisible = true;

                await PauseIcon.FadeTo(1, 50);
            }
            else
            {
                await Task.WhenAll(PauseIcon.FadeTo(0, 100), PauseIcon.ScaleTo(3.0, 300));

                PauseIcon.IsVisible = false;
                PauseIcon.Scale     = 1.0;
                PlayIcon.IsVisible  = true;

                await PlayIcon.FadeTo(1, 50);
            }
        }
Example #4
0
        private void RepositionCenterPlay()
        {
            double newLeft = (App.Current.Host.Content.ActualWidth / 2) - 50;
            double newTop  = (App.Current.Host.Content.ActualHeight / 2) - 50;

            PlayIcon.SetValue(Canvas.LeftProperty, newLeft);
            PlayIcon.SetValue(Canvas.TopProperty, newTop);

            LargeSpinnerArea.SetValue(Canvas.LeftProperty, newLeft);
            LargeSpinnerArea.SetValue(Canvas.TopProperty, newTop);
        }