Example #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            vulnerabilities = new Vulnerabilities();
            System.Xml.Serialization.XmlSerializer reader = new
               System.Xml.Serialization.XmlSerializer(vulnerabilities.GetType());

            System.IO.StreamReader file =
               new System.IO.StreamReader(System.AppDomain.CurrentDomain.BaseDirectory + @"\..\..\XML\Vulnerabilities.xml");

            vulnerabilities = (Vulnerabilities)reader.Deserialize(file);

            staticVulnerabilities = new StaticVulnerabilities();
            reader = new
               System.Xml.Serialization.XmlSerializer(staticVulnerabilities.GetType());

            file =
               new System.IO.StreamReader(System.AppDomain.CurrentDomain.BaseDirectory + @"\..\..\XML\StaticVulnerabilities.xml");

            staticVulnerabilities = (StaticVulnerabilities)reader.Deserialize(file);

            disclosureVulnerabilities = new DisclosureVulnerabilities();
            reader = new
               System.Xml.Serialization.XmlSerializer(disclosureVulnerabilities.GetType());

            file =
               new System.IO.StreamReader(System.AppDomain.CurrentDomain.BaseDirectory + @"\..\..\XML\DisclosureVulnerabilities.xml");

            disclosureVulnerabilities = (DisclosureVulnerabilities)reader.Deserialize(file);

            file.Close();
        }