public ScreenSaverForm(bool debugmode) { InitializeComponent(); isFeedViewShown = debugmode; isItemsViewShown = debugmode; // In debug mode, allow minimize after breakpoint if (debugmode) { this.FormBorderStyle = FormBorderStyle.Sizable; } LoadFeedList(); // may throw ApplicationException SetupScreenSaver(); // Initialize the ItemListView to display the list of items in the // current feed. It is placed on the left side of the screen. rssItemsView = new ItemListView <RssItem>(feedlist); InitializeRssItemsView(); // Initialize the ItemDescriptionView to display the description of the // RssItem. It is placed on the bottom of the screen. rssDescriptionView = new ItemDescriptionView <RssItem>(feedlist); InitializeRssDescriptionView(); // Initialize the FeedListView to display the list of feeds. It is placed // at the top of the screen. rssFeedsView = new FeedListView <RssFeed>("Picture Feeds", feedlist); InitializeRssFeedView(); InitializeListRefresh(); }
public ScreenSaverForm(bool debugmode) { InitializeComponent(); isFeedViewShown = debugmode; isItemsViewShown = debugmode; // In debug mode, allow minimize after breakpoint if (debugmode) this.FormBorderStyle = FormBorderStyle.Sizable; LoadFeedList(); // may throw ApplicationException SetupScreenSaver(); // Initialize the ItemListView to display the list of items in the // current feed. It is placed on the left side of the screen. rssItemsView = new ItemListView<RssItem>(feedlist); InitializeRssItemsView(); // Initialize the ItemDescriptionView to display the description of the // RssItem. It is placed on the bottom of the screen. rssDescriptionView = new ItemDescriptionView<RssItem>(feedlist); InitializeRssDescriptionView(); // Initialize the FeedListView to display the list of feeds. It is placed // at the top of the screen. rssFeedsView = new FeedListView<RssFeed>("Picture Feeds", feedlist); InitializeRssFeedView(); InitializeListRefresh(); }
public ScreenSaverForm() { InitializeComponent(); SetupScreenSaver(); LoadBackgroundImage(); LoadRssFeed(); // Initialize the ItemListView to display the list of items in the // RssItem. It is placed on the left side of the screen. rssView = new ItemListView<RssItem>(rssFeed.MainChannel.Title, rssFeed.MainChannel.Items); InitializeRssView(); // Initialize the ItemDescriptionView to display the description of the // RssItem. It is placed on the right side of the screen. rssDescriptionView = new ItemDescriptionView<RssItem>(); InitializeRssDescriptionView(); }
public ScreenSaverForm() { InitializeComponent(); SetupScreenSaver(); LoadBackgroundImage(); LoadRssFeed(); // Initialize the ItemListView to display the list of items in the // RssItem. It is placed on the left side of the screen. rssView = new ItemListView <RssItem>(rssFeed.MainChannel.Title, rssFeed.MainChannel.Items); InitializeRssView(); // Initialize the ItemDescriptionView to display the description of the // RssItem. It is placed on the right side of the screen. rssDescriptionView = new ItemDescriptionView <RssItem>(); InitializeRssDescriptionView(); }
void rssItemView_FadingComplete(object sender, EventArgs e) { try { switch (modo) { case Modo.Notícia: rssView.NextArticle(); rssDescriptionView.DisplayItem = rssView.SelectedItem; if (switchCount++ > 2 && fMercadorias != null) { switchCount = 3; ModoAtual = Modo.Mercadoria; rssDescriptionView.Dispose(); rssDescriptionView = null; } break; case Modo.Mercadoria: infoMercadoria.Dispose(); infoMercadoria = null; fMercadorias[mercadoriaAtual].LiberarFoto(); mercadoriaAtual = (mercadoriaAtual + 1) % fMercadorias.Length; if (mercadoriaAtual == 0) Carregar(); if (switchCount-- < 1 && rssView != null) { ModoAtual = Modo.Notícia; switchCount = 0; } else MostrarFoto(); if (mercadoriaAtual + 3 < fMercadorias.Length && !fMercadorias[mercadoriaAtual + 3].Preparada && carregar == null) { carregar = new Thread(CarregarPróximasFotos); carregar.Start(); } break; } } catch { Carregar(); } }
private void MostrarNotícias() { if (InvokeRequired) { MétodoCallback método = new MétodoCallback(MostrarNotícias); BeginInvoke(método); } else { if (rssView == null) { // Initialize the ItemListView to display the list of items in the // RssItem. It is placed on the left side of the screen. rssView = new ItemListView<RssItem>(rssFeed.MainChannel.Title, rssFeed.MainChannel.Items); InitializeRssView(); } if (rssDescriptionView == null) { // Initialize the ItemDescriptionView to display the description of the // RssItem. It is placed on the right side of the screen. rssDescriptionView = new ItemDescriptionView<RssItem>(); InitializeRssDescriptionView(); } } }