alielie
2025-03-28 dedcf4174c8540ee3a912daad2ff13e014e495b1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using Panuon.WPF.UI;
using Plugin.TestResult_WPF.Model;
using System.Collections.ObjectModel;
 
namespace Plugin.TestResult_WPF
{
    /// <summary>
    /// InfoWindow.xaml 的交互逻辑
    /// </summary>
    public partial class InfoWindow : WindowX
    {
 
        private string _title;
        public string title
        {
            get => _title;
            set => Set(ref _title, value);
        }
 
        private ObservableCollection<Info> _dataSource;
 
        public ObservableCollection<Info> dataSource
        {
            get => _dataSource == null ? new ObservableCollection<Info>() : _dataSource;
            set => Set(ref _dataSource, value);
        }
 
        public InfoWindow(string title, ObservableCollection<Info> infos)
        {
            this.title = title;
            this.dataSource = infos;
            DataContext = this;
            Topmost = false;
            InitializeComponent();
        }
 
        public void UpdateSource(ObservableCollection<Info> infos)
        {
            this.dataSource = infos;
        }
    }
}