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(); } } }
private void MostrarFoto() { try { if (InvokeRequired) { MétodoCallback método = new MétodoCallback(MostrarFoto); BeginInvoke(método); } else { Foto foto = fMercadorias[mercadoriaAtual]; if (!foto.Preparada) { MostrarNotícias(); if (carregar == null) { carregar = new Thread(new ThreadStart(CarregarPróximasFotos)); carregar.IsBackground = true; carregar.Start(); } } else { if (infoMercadoria != null) infoMercadoria.Dispose(); infoMercadoria = new InfoMercadoria(foto); InitializeMercadoriaView(); ModoAtual = Modo.Mercadoria; } } } catch { ModoAtual = Modo.Notícia; } }