Example #1
0
        private void subnetToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TerraformGen tfGen = new TerraformGen();
            // For Loading Subnets
            List <amazonSubnet> subnetList = new List <amazonSubnet>();

            tfGen.LoadSubnet(drawFilename, subnetList);

            foreach (amazonSubnet aSNet in subnetList)
            {
                richTextBox1.Text += aSNet.ToString();
            }
            dataGridView1.DataSource = subnetList;
        }
Example #2
0
        private string GenerateSubnet(string InputFile)
        {
            TerraformGen tfGen    = new TerraformGen();
            string       outputTF = "";
            // For Loading Subnets
            List <amazonSubnet> subnetList = new List <amazonSubnet>();

            tfGen.LoadSubnet(InputFile, subnetList);

            foreach (amazonSubnet aSNet in subnetList)
            {
                outputTF += aSNet.ToString();
            }


            return(outputTF);
        }
Example #3
0
        private void LoadPropWindowWithSN(string SNName)
        {
            TerraformGen tfGen = new TerraformGen();
            // For Loading Subnet
            List <amazonSubnet> SNList = new List <amazonSubnet>();

            tfGen.LoadSubnet(GlobalVars.varPrj.DiagramFilename, SNList);

            foreach (amazonSubnet aSN in SNList)
            {
                if (aSN.name == SNName)
                {
                    prgPropGrid.SelectedObject = aSN;
                    return;
                }
            }
        }
Example #4
0
        private void LoadTreeWithSubnet()
        {
            TerraformGen tfGen = new TerraformGen();
            // For Loading Subnets
            List <amazonSubnet> subnetList = new List <amazonSubnet>();

            tfGen.LoadSubnet(GlobalVars.varPrj.DiagramFilename, subnetList);

            foreach (amazonSubnet aSnet in subnetList)
            {
                TreeNode[] tvwNode = tvwStructure.Nodes.Find("SN:" + aSnet.vpc_id, true);

                if (tvwNode.Length > 0)
                {
                    TreeNode tn = tvwNode[0].Nodes.Add(aSnet.name, "SN[" + aSnet.name + "|" + aSnet.cidr_block + "]");

                    tn.Nodes.Add("INST:" + aSnet.name, "Instances");

                    tn.ExpandAll();
                }
            }
        }