protected void link_TextChanged(object sender, EventArgs e) { try { string id = GoogleDocsHandler.getGoogleDocID(link.Text); idBox.Text = id; List <string> st = GoogleDocsHandler.downloadFileGetList(id); foreach (string announcement in st) { Panel1.Controls.Add(new LiteralControl("<tr><td>" + announcement + "</td></tr>")); } } catch (Exception ee) { Debug.WriteLine(ee); } }
public void doWork() { if (GlobalHandlers.DatabaseHandler.deleteAnnouncementsOnUpdate() == true) { bool f = GlobalHandlers.DatabaseHandler.deleteAnnouncements(false); if (f == true) { Updater d = GlobalHandlers.DatabaseHandler.getUpdater(handlers.instances.ViewerHandler.Feature.ANNOUNCEMENTS); List <string> st = GoogleDocsHandler.downloadFileGetList(d.Link); bool t = GlobalHandlers.DatabaseHandler.setupAnnouncements(st); if (t == true) { GlobalHandlers.Debugger.write("Updated announcements at: " + DateTime.Now.ToString()); Updates.LastUpdated_Announcements = DateTime.Now; } } } }