Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainEditControl"/> class.
        /// </summary>
        public MainEditControl()
        {
            InitializeComponent();

            // Too lazy to wrap these events into the bundle class, so the Installer is exposed to access them
            _manager.Installer.OnStatusUpdate += new QueueInstaller.InstallStatusHandler(_installer_OnStatusUpdate);
            _manager.Installer.OnError        += new QueueInstaller.ErrorEventHandler(_installer_OnError);

            _manager.Installer.OnComplete += new EventHandler(Installer_OnComplete);

            // Define all the locations where registry changes are being made.
            _registryAnalyzers = new RegistryAnalyzerDictionary();

            // Open the registry file and load all of the entries, these will be monitored, and this allows
            // a way for adding more paths to monitor if needed.
            XmlDocument registryXml = new XmlDocument();

            registryXml.Load("RegistryPaths.xml");

            foreach (XmlNode node in registryXml.SelectNodes("//Path"))
            {
                var hive     = EnumUtil.Parse <RegistryHive>(node.Attributes["Hive"].Value);
                var analyzer = new RegistryAnalyzer(hive, node.InnerText);
                _registryAnalyzers.Add(analyzer.Key, analyzer);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RegistryInformationForm"/> class.
        /// </summary>
        /// <param name="analyzers">The analyzers.</param>
        /// <param name="snapshots">The snapshots.</param>
        /// <param name="sizes">The sizes.</param>
        public RegistryInformationForm(RegistryAnalyzerDictionary analyzers, RegistrySnapshotDictionary snapshots, RegistrySizeDictionary sizes)
        {
            if (snapshots == null)
            {
                throw new ArgumentNullException("snapshots");
            }

            InitializeComponent();
            _analyzers = analyzers;
            _snapshots = snapshots;
            _sizes     = sizes;

            noData_Label.Visible = (_snapshots.Keys.Count == 0);
        }