public HotPathItem(HotPathInfo info) { InitializeComponent(); this.info = info; txtID.Text = info.ID; txtName.Text = info.fastName; txtPath.Text = info.path; //判断路径是否存在 if (!File.Exists(info.path) && !Directory.Exists(info.path)) { txtPath.Foreground = new SolidColorBrush(Colors.Red); } }
//在快捷列表中添加Item public void AddItemInListBox(HotPathInfo info) { lbItem.Items.Add(new HotPathItem(info)); }