Esempio n. 1
0
        private void fullDownloadBtn_Click(object sender, EventArgs e)
        {
            var movies = AerialContext.GetAllMovies();


            var cacheFree = NativeMethods.GetExplorerFileSize(Caching.CacheSpace());

            if (MessageBox.Show("Downloading all videos may take over 10GB of space, do you want to procede? " +
                                "(You currently have " + cacheFree + " of space free)", "Download?", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                //don't download if user cancels
                return;
            }

            try
            {
                foreach (var movie in movies)
                {
                    if (!Caching.IsHit(movie.url))
                    {
                        Caching.StartDelayedCache(movie.url);
                        Trace.WriteLine("Downloading " + movie.url);
                    }
                    else
                    {
                        Trace.WriteLine(movie.url + " is already cached");
                    }
                }
            } catch (WebException err)
            {
                Trace.WriteLine("Error downloading all videos: " + err.ToString());
            }
        }
        private void ScreenSaverForm_Load(object sender, EventArgs e)
        {
            Cursor.Hide();
            TopMost = true;

            // ex: http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/b2-1.mov
            this.axWindowsMediaPlayer1.settings.autoStart          = true;
            this.axWindowsMediaPlayer1.settings.enableErrorDialogs = true;
            this.axWindowsMediaPlayer1.uiMode            = "none";
            this.axWindowsMediaPlayer1.enableContextMenu = false;
            Application.AddMessageFilter(new IgnoreMouseClickMessageFilter(this, axWindowsMediaPlayer1));

            this.axWindowsMediaPlayer1.Size = this.Size;
            this.axWindowsMediaPlayer1.Top  = 0;
            this.axWindowsMediaPlayer1.Left = 0;
            this.axWindowsMediaPlayer1.settings.setMode("loop", true);
            this.axWindowsMediaPlayer1.MouseMoveEvent += AxWindowsMediaPlayer1_MouseMoveEvent;
            this.axWindowsMediaPlayer1.KeyPressEvent  += AxWindowsMediaPlayer1_KeyPressEvent;


            var list = axWindowsMediaPlayer1.playlistCollection.newPlaylist("Aerial");

            var movies = new AerialContext().GetMovies();

            foreach (var item in movies)
            {
                var m = axWindowsMediaPlayer1.newMedia(item.url);
                list.appendItem(m);
            }

            axWindowsMediaPlayer1.currentPlaylist = list;

            //this.axWindowsMediaPlayer1.URL = @"http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/b2-1.mov";
            this.axWindowsMediaPlayer1.Ctlcontrols.play();
        }
Esempio n. 3
0
        private void ScreenSaverForm_Load(object sender, EventArgs e)
        {
            if (!previewMode && !windowMode)
            {
                Cursor.Hide();
            }

            if (this.providedBounds != null)
            {
                Bounds = providedBounds;
            }
            //MessageBox.Show($"Bounds (ScreenSaverForm_Load): {Bounds.Left}+{Bounds.Top}, {Bounds.Size.Width}x{Bounds.Size.Height}");
            LayoutPlayer();

            this.BackgroundImageLayout = ImageLayout.None;

            if (showVideo) // testing preview video speed didn't work well && !previewMode
            {
                Movies = AerialContext.GetMovies();

#if DEBUG && false
                Movies = new List <Asset>
                {
                    new Asset {
                        url = @"http://18292-presscdn-0-89.pagely.netdna-cdn.com/wp-content/uploads/2015/07/stripe-checkout.mp4?_=1"
                    },
                    new Asset {
                        url = @"http://18292-presscdn-0-89.pagely.netdna-cdn.com/wp-content/uploads/2015/07/stripe-shake.mp4?_=3"
                    },
                };
#endif

                //NextVideoTimer.Tick += NextVideoTimer_Tick;
                //NextVideoTimer.Interval = 1000;
                //NextVideoTimer.Enabled = true;

                currentVideoIndex = selector.next(Movies.Count);
                SetNextVideo();
            }
            else if (previewMode)
            {
                // on preview - hide player.
                ShowButtons(false);

                // show picture preview in the windows screensaver dialog inside the 1980s CRT monitor with that CD rom drive at it's bottom

                var pictureBox1 = new PictureBox();
                pictureBox1.Image    = global::Aerial.Properties.Resources.bridgeSm3;
                pictureBox1.Location = new System.Drawing.Point(0, 0);
                pictureBox1.Name     = "pictureBox1";
                pictureBox1.Size     = new System.Drawing.Size(166, 130);
                pictureBox1.TabIndex = 3;
                pictureBox1.TabStop  = false;
                this.Controls.Add(pictureBox1);
            }
        }
Esempio n. 4
0
        private void PopulateChosenVideoGroup()
        {
            var movies = AerialContext.GetAllMovies();

            movies.Sort();
            if (movies.Count == 0)
            {
                return;                    // error
            }
            AddHumanNumbers(movies);

            var selected = new RegSettings().ChosenMovies.Split(';').ToList();

            tvChosen.BuildTree(movies, selected);
        }
Esempio n. 5
0
        private void ScreenSaverForm_Load(object sender, EventArgs e)
        {
            if (!previewMode) Cursor.Hide();
            TopMost = true;

            // ex: http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/b2-1.mov
            this.axWindowsMediaPlayer1.settings.autoStart = true;
            this.axWindowsMediaPlayer1.settings.enableErrorDialogs = true;
            this.axWindowsMediaPlayer1.uiMode = "none";
            this.axWindowsMediaPlayer1.enableContextMenu = false;
            Application.AddMessageFilter(new IgnoreMouseClickMessageFilter(this, axWindowsMediaPlayer1));

            this.Size = new Size(screenWidth, screenHeight);
            this.Location = new Point(screenLeft, screenTop);

            this.axWindowsMediaPlayer1.Size = this.Size;
            this.axWindowsMediaPlayer1.Top = 0;
            this.axWindowsMediaPlayer1.Left = 0;
            this.axWindowsMediaPlayer1.settings.setMode("loop", true);
            this.axWindowsMediaPlayer1.MouseMoveEvent += AxWindowsMediaPlayer1_MouseMoveEvent;
            this.axWindowsMediaPlayer1.KeyPressEvent += AxWindowsMediaPlayer1_KeyPressEvent;

            var list = axWindowsMediaPlayer1.playlistCollection.newPlaylist("Aerial");

            var movies = new AerialContext().GetMovies();
            foreach (var item in movies)
            {
                var m = axWindowsMediaPlayer1.newMedia(item.url);
                list.appendItem(m);
            }

            axWindowsMediaPlayer1.currentPlaylist = list;

            //this.axWindowsMediaPlayer1.URL = @"http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/b2-1.mov";

            this.axWindowsMediaPlayer1.Ctlcontrols.play();
        }
Esempio n. 6
0
        private void ScreenSaverForm_Load(object sender, EventArgs e)
        {
            if (!previewMode) Cursor.Hide();
            TopMost = true;

            LayoutPlayer();

            if (ShowVideo)
            {
                var list = axWindowsMediaPlayer1.playlistCollection.newPlaylist("Aerial");

                var movies = new AerialContext().GetMovies();
                foreach (var item in movies)
                {
                    var m = axWindowsMediaPlayer1.newMedia(item.url);
                    list.appendItem(m);
                }

                axWindowsMediaPlayer1.currentPlaylist = list;

                //this.axWindowsMediaPlayer1.URL = @"https://vimeo.com/91711013/download?t=1446647256&v=243511274&s=30ad93a6909c33cb955241b7159418522a8ba05b887b1e0600c81fa32ea495af";
                this.axWindowsMediaPlayer1.Ctlcontrols.play();
            }
        }