Пример #1
0
        public ScanDetailsView(IScan scan, string computerName, ITreeService treeService = null)
        {
            InitializeComponent();

            // IOC injection
            treeService = treeService ?? new TreeService();

            TreScan.Nodes.Clear();
            LblScanTitle.Text = $"Computer: {computerName ?? string.Empty} | Scan: {scan.Id.ToString()} from {scan.ScanDate.ToString("dd-MM-yyyy HH:mm")}";
            treeService.BuildTree(TreScan, scan);
        }
Пример #2
0
        public ScanCompareView(IScan leftScan, IScan rightScan, string computerNameLeft, string computerNameRight, ITreeService treeService = null)
        {
            InitializeComponent();

            // IOC injection
            treeService = treeService ?? new TreeService();

            TreLeft.Nodes.Clear();
            TreRight.Nodes.Clear();

            LblScanTitleLeft.Text  = $"Computer: {computerNameLeft ?? string.Empty} | Scan: {leftScan.Id.ToString()} from {leftScan.ScanDate.ToString("dd-MM-yyyy HH:mm")}";
            LblScanTitleRight.Text = $"Computer: {computerNameRight ?? string.Empty} | Scan: {rightScan.Id.ToString()} from {rightScan.ScanDate.ToString("dd-MM-yyyy HH:mm")}";

            // Build the tree structures
            treeService.BuildTree(TreLeft, leftScan);
            BuildCompareTree(TreRight, leftScan, rightScan);
        }