Example #1
0
        public MainPage()
        {
            InitializeComponent();
            players = new ComposerControlHelper();

            jwSkinPackage            = new JwSkinPackage();
            jwSkinPackage.SkinReady += JwSkinPackageSkinPackageReady;

            Player.MouseLeftButtonUp += Player_MouseLeftButtonUp;
            Player.Cursor             = Cursors.Hand;

            bridge = new HtmlInteraction(this);
            bridge.AddBinding(Player);

            if (!String.IsNullOrEmpty(srcPlaylist))
            {
                Player.LoadPlaylist(srcPlaylist);
            }

            AddBinding(Player);
            ControlBarView.AddBinding(Player);
            DisplayView.AddBinding(Player);
            DockView.AddBinding(Player);
            PlaylistView.AddBinding(Player);
            CaptionView.AddBinding(Player);

            DockView.CaptionVisibilityChanged += DockView_CaptionVisibilityChanged;

            controlBarFader = new OpacityFader(ControlBarView);
            dockFader       = new OpacityFader(DockView);
            SetFadeTimer();
            CaptionView.Margin = new Thickness(0, 0, 0, 75);            // we don't know the height until images are all loaded... take a guess for now!
        }
Example #2
0
        void JwSkinPackageSkinPackageReady(object sender, EventArgs e)
        {
            ControlBarView.SetSkin(jwSkinPackage);
            DisplayView.SetSkin(jwSkinPackage);
            DockView.SetSkin(jwSkinPackage);
            PlaylistView.SetSkin(jwSkinPackage);

            var color = (
                jwSkinPackage.GetSettingValue("display", "backgroundcolor")
                ??
                jwSkinPackage.GetSettingValue("screencolor")
                ??
                jwSkinPackage.GetSettingValue("backcolor")
                ??
                "0x000000"
                ).HexToColor();

            LayoutRoot.Background  = new SolidColorBrush(color);
            Player.BackgroundColor = color;
            UpdateCaptionsMargin();
        }