private void securityGroupToolStripMenuItem_Click(object sender, EventArgs e) { TerraformGen tfGen = new TerraformGen(); // For Loading Security Group List <amazonSecurityGrp> secgrpList = new List <amazonSecurityGrp>(); tfGen.LoadSecurityGroup(drawFilename, secgrpList); foreach (amazonSecurityGrp aSNet in secgrpList) { richTextBox1.Text += aSNet.ToString(); } dataGridView1.DataSource = secgrpList; }
private string GenerateSecurityGroup(string InputFile) { TerraformGen tfGen = new TerraformGen(); string outputTF = ""; // For Loading Security Group List <amazonSecurityGrp> secgrpList = new List <amazonSecurityGrp>(); tfGen.LoadSecurityGroup(InputFile, secgrpList); foreach (amazonSecurityGrp aSNet in secgrpList) { outputTF += aSNet.ToString(); } return(outputTF); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void openForLINQToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == DialogResult.OK) { var path = openFileDialog.FileName; TerraformGen tfGen = new TerraformGen(); // For Loading VPC /* List<amazonVPC> VPCList = new List<amazonVPC>(); * * tfGen.LoadVPC(path, VPCList); * * foreach ( amazonVPC aVpc in VPCList) * { * richTextBox1.Text += aVpc.ToString(); * } * dataGridView1.DataSource = VPCList; */ /* * // For Loading Subnets * List<amazonSubnet> subnetList = new List<amazonSubnet>(); * * tfGen.LoadSubnet(path, subnetList); * * foreach (amazonSubnet aSNet in subnetList) * { * richTextBox1.Text += aSNet.ToString(); * } * dataGridView1.DataSource = subnetList; */ // For Loading Security Group List <amazonSecurityGrp> secgrpList = new List <amazonSecurityGrp>(); tfGen.LoadSecurityGroup(path, secgrpList); foreach (amazonSecurityGrp aSNet in secgrpList) { richTextBox1.Text += aSNet.ToString(); } dataGridView1.DataSource = secgrpList; } }
private void LoadPropWindowWithSG(string SGName) { TerraformGen tfGen = new TerraformGen(); // For Loading SG List <amazonSecurityGrp> sgList = new List <amazonSecurityGrp>(); tfGen.LoadSecurityGroup(GlobalVars.varPrj.DiagramFilename, sgList); foreach (amazonSecurityGrp aSG in sgList) { if (aSG.name == SGName) { prgPropGrid.SelectedObject = aSG; return; } } }
private void LoadTreeWithSecurityGroup() { TerraformGen tfGen = new TerraformGen(); // For Loading Security Group List <amazonSecurityGrp> sgList = new List <amazonSecurityGrp>(); tfGen.LoadSecurityGroup(GlobalVars.varPrj.DiagramFilename, sgList); foreach (amazonSecurityGrp sg in sgList) { TreeNode[] tvwNode = tvwStructure.Nodes.Find("SG:" + sg.vpc_id, true); if (tvwNode.Length > 0) { tvwNode[0].Nodes.Add(sg.name, "SG[" + sg.name + "|" + sg.vpc_id + "]"); tvwNode[0].ExpandAll(); } } }