void ht_FileWatchEvent(object sender, CompleteEventArgs e) { Dictionary<string, string> DicItem = new Dictionary<string, string>(); DicItem = ItemDetailHelper.GetContent(type, e.Node); if (DicItem.Count > 0) { foreach (var item in DicItem) { this.Dispatcher.BeginInvoke(() => { string title = item.Key; string content = string.Empty; if (item.Value == null || item.Value == "") { content = "暂无"; } else { content = item.Value; } UIElement oItem; if (title == "详细信息") { oItem = new MyUserControl.ItemControlHttp(title, content); } else { oItem = new MyUserControl.ItemControl(title, content.Replace("<p>", string.Empty).Replace("</p>", "\n")); } this.SPContentArea.Children.Add(oItem); }); } } }
private void Ht_FileWatchEvent(object sender, CompleteEventArgs e) { oInfo = infoser.InfoObjectDeserializer(e.Node); this.Dispatcher.BeginInvoke(() => { this.TBTitle.Text = oInfo.title; this.TBTime.Text = TimeHelper.TimeStamptoDateTime(oInfo.time.ToString()).ToString("MM月dd日"); this.TBCount.Text = oInfo.count.ToString(); this.TBRcount.Text = oInfo.rcount.ToString(); Uri uri = HtmlHelper.StrToHTML(oInfo.message); this.wb.Navigate(uri); }); }
private void ResponseReadySocket(IAsyncResult asyncResult) { try { WebRequest request = asyncResult.AsyncState as WebRequest; WebResponse response = request.EndGetResponse(asyncResult) as HttpWebResponse; result = GetResponseString(response); CompleteEventArgs args = new CompleteEventArgs(result); FileWatchEvent(this, args); } catch (Exception e) { Console.WriteLine(e.Message); } }
private void Ht_FileWatchEvent(object sender, CompleteEventArgs e) { List<InfoShowItem> temp = infoser.InfoShowDeserializer(e.Node).ToList(); this.Dispatcher.BeginInvoke(() => { this.LBInfo.ItemsSource = temp.Select(c => new { id = c.id, title = c.title, time = TimeHelper.TimeStamptoDateTime(c.time.ToString()).ToString("MM月dd日"), count = c.count, rcount = c.rcount }); }); }
private void ResponseReadySocket(IAsyncResult asyncResult) { try { WebRequest request = asyncResult.AsyncState as WebRequest; WebResponse response = request.EndGetResponse(asyncResult) as HttpWebResponse; result = GetResponseString(response); CompleteEventArgs args = new CompleteEventArgs(result); FileWatchEvent(this, args ); } catch (Exception e) { Console.WriteLine(e.Message); } }
private void Ht_FileWatchEvent(object sender, CompleteEventArgs e) { result = GetData(keyword, e.Node); Render(); }