Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            // no smaller than design time size
            this.MinimumSize = new System.Drawing.Size(this.Width, this.Height);

            // no larger than screen size
            this.MaximumSize = new System.Drawing.Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);

            this.AutoSize = true;
            this.AutoSizeMode = AutoSizeMode.GrowAndShrink;

            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();
        }