public ResponseLogForm() { InitializeComponent(); responses = ResponseLog.GetAllResponses(); if (!responses.Any()) { NoResponses(); } else { Initialize(); } }
private static ImgurResponse GetImgurResponse(byte[] data) { ImgurResponse res = new ImgurResponse() { Exception = null }; XElement xml; try { xml = XElement.Parse(Encoding.UTF8.GetString(data)); res.ResponseTime = DateTime.Now; res.DeleteLink = xml.Element("links").Element("delete_page").Value; res.DirectLink = xml.Element("links").Element("original").Value; res.ImgurPage = xml.Element("links").Element("imgur_page").Value; res.SmallThumb = xml.Element("links").Element("small_square").Value; res.LargeThumb = xml.Element("links").Element("large_thumbnail").Value; } catch (Exception exc) { res.Exception = exc; } ResponseLog.AddResponse(res); return(res); }
private void recentUploadsItem_Click(object sender, EventArgs e) { ResponseLog.ShowLogs(); }