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);
                    });
                }
            }
        }
示例#2
0
        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);
                    });
                }
            }
        }