Пример #1
0
        public override void OnKeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            base.OnKeyDown(sender, e);
            if (e.Handled)
            {
                return;
            }

            if (e.KeyCode == System.Windows.Forms.Keys.Escape)
            {
                SingletonSoundCache.Instance.PlaySound(DefaultSoundList.Cancel);
                RaiseExitEvent();
                e.Handled = true;
                return;
            }

            // Go to and from Library Button
            if (e.KeyCode == System.Windows.Forms.Keys.Right)
            {
                if (_library.Focus())
                {
                    _view.Focus();
                }
                else
                {
                    _library.Focus();
                }
            }

            if (e.KeyCode == System.Windows.Forms.Keys.Left)
            {
                if (_view.Focus())
                {
                    _library.Focus();
                }
                else
                {
                    _trailerlist.Focus();
                }
            }

            if (e.KeyCode == System.Windows.Forms.Keys.Down)
            {
                _trailerlist.Focus();
            }

            return;
        }
        /// <summary>
        /// Creates the ComicsScreen
        /// </summary>
        public YahooTrailersDetailsScreen()
        {
            System.Reflection.Assembly a  = System.Reflection.Assembly.GetExecutingAssembly();
            System.IO.FileInfo         fi = new System.IO.FileInfo(a.Location);

            homedir = fi.DirectoryName;

            // Text Objects
            _header = new TextWindow();
            Add(_header);

            _poster = new PosterWindow();
            Add(_poster);

            _details = new TextWindow();
            Add(_details);

            _starring = new TextWindow();
            Add(_starring);

            _genre = new TextWindow();
            Add(_genre);

            _releasedate = new TextWindow();
            Add(_releasedate);

            _rating = new TextWindow();
            Add(_rating);

            _trailers = new VariableItemList();
            Add(_trailers);
            _trailers.ItemActivated += new ItemActivatedEventHandler(List_ItemActivated);
            _trailers.Visible        = true;
            _trailers.Focus();

            // Logo
            _yahoologo = new Window();
            Add(_yahoologo);

            // Downloading logo
            _downloading = new Window();
            Add(_downloading);

            // Create the timer
            updateTimer          = new System.Windows.Forms.Timer();
            updateTimer.Interval = 250;
            updateTimer.Tick    += new EventHandler(updateTimer_Tick);
            updateTimer.Start();
        }
        /// <summary>
        /// Creates the Screen
        /// </summary>
        public YahooTrailersScreen()
        {
            SnapStream.Logging.WriteLog("YahooTrailers Plugin Started");

            System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
            System.IO.FileInfo fi = new System.IO.FileInfo( a.Location );

            homedir = fi.DirectoryName;

            // Text Objects
            _header = new TextWindow();
            Add( _header );

            // Text Button for the library
            _library = new TextButton();
            _library.Click +=new EventHandler(_library_Click);
            Add( _library );

            // Text Button for the view
            _view = new TextButton();
            _view.Click +=new EventHandler(_view_Click);
            Add( _view );

            // Create the list viewer
            _trailerlist = new VariableItemList();
            Add( _trailerlist );
            _trailerlist.ItemActivated += new ItemActivatedEventHandler(List_ItemActivated);
            _trailerlist.Visible = true;
            _trailerlist.Focus();

            // Logo
            _yahoologo = new Window();
            Add( _yahoologo );

            // Downloading logo
            _downloading = new Window();
            Add( _downloading );

            // Get the trailers
            GetTrailers();

            // Create the timer
            updateTimer = new System.Windows.Forms.Timer();
            updateTimer.Interval = 250;
            updateTimer.Tick += new EventHandler(updateTimer_Tick);
            updateTimer.Start();

            return;
        }
Пример #4
0
        /// <summary>
        /// Creates the Screen
        /// </summary>
        public YahooTrailersScreen()
        {
            SnapStream.Logging.WriteLog("YahooTrailers Plugin Started");

            System.Reflection.Assembly a  = System.Reflection.Assembly.GetExecutingAssembly();
            System.IO.FileInfo         fi = new System.IO.FileInfo(a.Location);

            homedir = fi.DirectoryName;

            // Text Objects
            _header = new TextWindow();
            Add(_header);

            // Text Button for the library
            _library        = new TextButton();
            _library.Click += new EventHandler(_library_Click);
            Add(_library);

            // Text Button for the view
            _view        = new TextButton();
            _view.Click += new EventHandler(_view_Click);
            Add(_view);

            // Create the list viewer
            _trailerlist = new VariableItemList();
            Add(_trailerlist);
            _trailerlist.ItemActivated += new ItemActivatedEventHandler(List_ItemActivated);
            _trailerlist.Visible        = true;
            _trailerlist.Focus();

            // Logo
            _yahoologo = new Window();
            Add(_yahoologo);

            // Downloading logo
            _downloading = new Window();
            Add(_downloading);

            // Get the trailers
            GetTrailers();

            // Create the timer
            updateTimer          = new System.Windows.Forms.Timer();
            updateTimer.Interval = 250;
            updateTimer.Tick    += new EventHandler(updateTimer_Tick);
            updateTimer.Start();

            return;
        }
        /// <summary>
        /// Creates the ComicsScreen
        /// </summary>
        public YahooTrailersDetailsScreen()
        {
            System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
            System.IO.FileInfo fi = new System.IO.FileInfo( a.Location );

            homedir = fi.DirectoryName;

            // Text Objects
            _header = new TextWindow();
            Add( _header );

            _poster = new PosterWindow();
            Add( _poster );

            _details = new TextWindow();
            Add( _details );

            _starring = new TextWindow();
            Add( _starring );

            _genre = new TextWindow();
            Add( _genre );

            _releasedate = new TextWindow();
            Add( _releasedate );

            _rating = new TextWindow();
            Add( _rating );

            _trailers = new VariableItemList();
            Add( _trailers );
            _trailers.ItemActivated += new ItemActivatedEventHandler(List_ItemActivated);
            _trailers.Visible = true;
            _trailers.Focus();

            // Logo
            _yahoologo = new Window();
            Add( _yahoologo );

            // Downloading logo
            _downloading = new Window();
            Add( _downloading );

            // Create the timer
            updateTimer = new System.Windows.Forms.Timer();
            updateTimer.Interval = 250;
            updateTimer.Tick += new EventHandler(updateTimer_Tick);
            updateTimer.Start();
        }
Пример #6
0
        /// <summary>
        /// Creates the ComicsScreen
        /// </summary>
        public ComicsScreen()
        {
            SnapStream.Logging.WriteLog("Comics Plugin Started");

            System.Reflection.Assembly a  = System.Reflection.Assembly.GetExecutingAssembly();
            System.IO.FileInfo         fi = new System.IO.FileInfo(a.Location);

            _homeDirectory = fi.DirectoryName;

            // Create a new updater
            //_updater = new ComicsUpdater();
            SingletonComicsUpdater.Instance.Initialize(fi.DirectoryName);

            // Register the handler for changing days
            daysChanged.Execute += new CommandExecuteHandler(daysChanged_Execute);

            // Text Objects
            // Show the instructions
            _instructions = new TextWindow();
            Add(_instructions);

            // Create the viewer window for the comics
            _comicsViewer = new VariableItemList();
            Add(_comicsViewer);

            // Sort by option
            _sortBy = new OptionList();
            _sortBy.DefaultItemTextHeightPercent = 0.5;
            OptionListItem byWhat = new OptionListItem("Sort By");

            byWhat.AddSelectorItem("Date", "Date");
            byWhat.AddSelectorItem("Comic", "Comic");
            _sortBy.AddItem(byWhat);
            Add(_sortBy);
            byWhat.SelectorValueChanged += new SelectorValueChangedEventHandler(sortBy_SelectorValueChanged);
            _sortBy.Visible              = false;

            _comicsViewer.ItemActivated += new ItemActivatedEventHandler(ComicsViewer_ItemActivated);
            _comicsViewer.Visible        = true;
            _comicsViewer.Focus();
            _comicsViewer.Height = 480;
            this.Render();

            _comicsViewer.HighlightItemImage = String.Empty;
            _comicsViewer.DefaultItemImage   = String.Empty;

            return;
        }
Пример #7
0
        /// <summary>
        /// Creates the ComicsScreen
        /// </summary>
        public ComicsScreen()
        {
            SnapStream.Logging.WriteLog("Comics Plugin Started");

            System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
            System.IO.FileInfo fi = new System.IO.FileInfo( a.Location );

            _homeDirectory = fi.DirectoryName;

            // Create a new updater
            //_updater = new ComicsUpdater();
            SingletonComicsUpdater.Instance.Initialize( fi.DirectoryName );

            // Register the handler for changing days
            daysChanged.Execute += new CommandExecuteHandler( daysChanged_Execute );

            // Text Objects
            // Show the instructions
            _instructions = new TextWindow();
            Add( _instructions );

            // Create the viewer window for the comics
            _comicsViewer = new VariableItemList();
            Add( _comicsViewer );

            // Sort by option
            _sortBy = new OptionList();
            _sortBy.DefaultItemTextHeightPercent = 0.5;
            OptionListItem byWhat = new OptionListItem("Sort By");
            byWhat.AddSelectorItem("Date","Date");
            byWhat.AddSelectorItem("Comic","Comic");
            _sortBy.AddItem(byWhat);
            Add ( _sortBy );
            byWhat.SelectorValueChanged += new SelectorValueChangedEventHandler( sortBy_SelectorValueChanged );
            _sortBy.Visible = false;

            _comicsViewer.ItemActivated += new ItemActivatedEventHandler(ComicsViewer_ItemActivated);
            _comicsViewer.Visible = true;
            _comicsViewer.Focus();
            _comicsViewer.Height = 480;
            this.Render();

            _comicsViewer.HighlightItemImage = String.Empty;
            _comicsViewer.DefaultItemImage = String.Empty;

            return;
        }
Пример #8
0
        public override void OnKeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            base.OnKeyDown(sender, e);

            if (e.KeyCode == System.Windows.Forms.Keys.Up && _comicsViewer.SelectedIndex == 0)
            {
                if (previousItem == 1)
                {
                    previousItem = 0;
                    return;
                }
                if (previousItem == 0)
                {
                    _sortBy.Visible = true;
                    _sortBy.FadeIn();
                    _sortBy.Focus();
                    previousItem = 1;
                    return;
                }
            }

            if (e.KeyCode == System.Windows.Forms.Keys.Down && _sortBy.IsFocused())
            {
                _comicsViewer.Focus();
                _sortBy.FadeOut();
            }

            if (e.Handled)
            {
                return;
            }

            if (e.KeyCode == System.Windows.Forms.Keys.Escape)
            {
                SingletonSoundCache.Instance.PlaySound(DefaultSoundList.Cancel);
                RaiseExitEvent();
                e.Handled = true;
                return;
            }

            return;
        }
Пример #9
0
        /// <summary>
        /// Creates the ComicsScreen
        /// </summary>
        public iTunesScreen()
        {
            SnapStream.Logging.WriteLog("iTunes Plugin Started");

            System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly();
            System.IO.FileInfo fi = new System.IO.FileInfo( a.Location );

            // Text Objects
            _header = new TextWindow();
            Add( _header );

            _volume = new TextWindow();
            Add( _volume );

            // Create the list viewer
            _list = new VariableItemList();
            //Add( _list );

            // Create control button
            _nextButton = new TextButton();
            _nextButton.Click +=new EventHandler(_nextButton_Click);
            Add(_nextButton);

            // Create control button
            _shuffleButton = new TextButton();
            _shuffleButton.Click +=new EventHandler(_shuffleButton_Click);
            Add(_shuffleButton);

            // Create control button
            _searchButton = new TextButton();
            _searchButton.Click +=new EventHandler(_searchButton_Click);
            Add(_searchButton);

            // Search
            _searchEntry = new TextEntry();
            Add( _searchEntry );
            _searchEntry.Accept += new EventHandler(SearchEntry_Accept);
            _searchEntry.Cancel += new EventHandler(SearchEntry_Cancel);

            // Create control button
            _playallButton = new TextButton();
            _playallButton.Click +=new EventHandler(_playallButton_Click);
            Add(_playallButton);

            _list.ItemActivated += new ItemActivatedEventHandler(List_ItemActivated);
            _list.Visible = true;
            _list.Focus();

            misc1 = new TextWindow();
            misc1.RelativeBounds = new Rectangle(210,170,200,40);
            misc1.FontSize = 20;
            misc1.Text = "(N or >> button on Firefly)";
            Add(misc1);

            misc2 = new TextWindow();
            misc2.RelativeBounds = new Rectangle(210,210,300,40);
            misc2.FontSize = 20;
            misc2.Text = "(S or A button on Firefly)";
            Add(misc2);

            misc3 = new TextWindow();
            misc3.RelativeBounds = new Rectangle(0,240,400,40);
            misc3.FontSize = 20;
            misc3.Text = "+/- controls volume on keyboard and Firefly remote";
            Add(misc3);

            // Create the windows media player object
            wmp = new WMPLib.WindowsMediaPlayerClass();

            // Create the timer
            updateTimer = new Timer();
            updateTimer.Interval = 1000;
            updateTimer.Tick += new EventHandler(updateTimer_Tick);

            return;
        }
Пример #10
0
        /// <summary>
        /// Creates the ComicsScreen
        /// </summary>
        public iTunesScreen()
        {
            SnapStream.Logging.WriteLog("iTunes Plugin Started");

            System.Reflection.Assembly a  = System.Reflection.Assembly.GetExecutingAssembly();
            System.IO.FileInfo         fi = new System.IO.FileInfo(a.Location);

            // Text Objects
            _header = new TextWindow();
            Add(_header);

            _volume = new TextWindow();
            Add(_volume);

            // Create the list viewer
            _list = new VariableItemList();
            //Add( _list );

            // Create control button
            _nextButton        = new TextButton();
            _nextButton.Click += new EventHandler(_nextButton_Click);
            Add(_nextButton);

            // Create control button
            _shuffleButton        = new TextButton();
            _shuffleButton.Click += new EventHandler(_shuffleButton_Click);
            Add(_shuffleButton);

            // Create control button
            _searchButton        = new TextButton();
            _searchButton.Click += new EventHandler(_searchButton_Click);
            Add(_searchButton);

            // Search
            _searchEntry = new TextEntry();
            Add(_searchEntry);
            _searchEntry.Accept += new EventHandler(SearchEntry_Accept);
            _searchEntry.Cancel += new EventHandler(SearchEntry_Cancel);

            // Create control button
            _playallButton        = new TextButton();
            _playallButton.Click += new EventHandler(_playallButton_Click);
            Add(_playallButton);

            _list.ItemActivated += new ItemActivatedEventHandler(List_ItemActivated);
            _list.Visible        = true;
            _list.Focus();

            misc1 = new TextWindow();
            misc1.RelativeBounds = new Rectangle(210, 170, 200, 40);
            misc1.FontSize       = 20;
            misc1.Text           = "(N or >> button on Firefly)";
            Add(misc1);

            misc2 = new TextWindow();
            misc2.RelativeBounds = new Rectangle(210, 210, 300, 40);
            misc2.FontSize       = 20;
            misc2.Text           = "(S or A button on Firefly)";
            Add(misc2);

            misc3 = new TextWindow();
            misc3.RelativeBounds = new Rectangle(0, 240, 400, 40);
            misc3.FontSize       = 20;
            misc3.Text           = "+/- controls volume on keyboard and Firefly remote";
            Add(misc3);

            // Create the windows media player object
            wmp = new WMPLib.WindowsMediaPlayerClass();

            // Create the timer
            updateTimer          = new Timer();
            updateTimer.Interval = 1000;
            updateTimer.Tick    += new EventHandler(updateTimer_Tick);

            return;
        }