예제 #1
0
        public void ActivateDisplay()
        {
            // Create the stage the first time we are activated
            // This is not done when the source is created, even
            // though it would avoid a bit of flickering, to help
            // decrease startup time
            if (stage == null)
            {
                stage = new NowPlayingStage(video_texture)
                {
                    Visible = true
                };
                display.Stage.BackgroundColor = Color.New(0, 0, 0, 0xff);
                display.Stage.AddChild(stage);
            }

            // The clutter embed gets reparented to the toplevel
            // child container when we go away, so if it's the
            // first time, we pack it, otherwise we reparent
            if (display.Parent == null)
            {
                PackStart(display, true, true, 0);
            }
            else
            {
                display.Reparent(this);
            }

            // Our stage supports pausing/resuming so when it's
            // not visible, we're not running timeouts/animations
            display.Show();
            stage.Resume();
        }
예제 #2
0
        public void ActivateDisplay()
        {
            // Create the stage the first time we are activated
            // This is not done when the source is created, even
            // though it would avoid a bit of flickering, to help
            // decrease startup time
            if (stage == null) {
                stage = new NowPlayingStage (video_texture) {
                    IsVisible = true
                };
                display.Stage.Color = new Color (0, 0, 0);
                display.Stage.Add (stage);
            }

            // The clutter embed gets reparented to the toplevel
            // child container when we go away, so if it's the
            // first time, we pack it, otherwise we reparent
            if (display.Parent == null) {
                PackStart (display, true, true, 0);
            } else {
                display.Reparent (this);
            }

            // Our stage supports pausing/resuming so when it's
            // not visible, we're not running timeouts/animations
            display.Show ();
            stage.Resume ();
        }