P
Policy standard local admin account with Active Di
Guest
Hello
This is a continuation from a code that I have posted before. The last question was answered satisfactorily but I have a new dude.
In my code, I found a specific attribut and if I use the console.writeline command, I can show by console all the information (similar code using console) but if I use system.windows.form and I try try to show in a list view, the View is empty. How can I show the results in the listview?
- the listview name is SearchResults2
Please, follow the design below:
please, follow my code below
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
private void button2_Click(object sender, EventArgs e)
{
XElement GetAttribut = XElement.Load(@"C:\mis documentos\c#\xml\SipServer.config");
IEnumerable<XElement> sipeliafile = GetAttribut.Elements();
var GetCodec = from codec in sipeliafile.Descendants("Codec")
where codec.Attribute("Enabled")?.Value == "True"
select codec;
foreach (XElement codec in GetCodec)
{
SearchResults2.Items.Add(codec.Value);
}
}
}
}
Regards,
Jose
Continue reading...
This is a continuation from a code that I have posted before. The last question was answered satisfactorily but I have a new dude.
In my code, I found a specific attribut and if I use the console.writeline command, I can show by console all the information (similar code using console) but if I use system.windows.form and I try try to show in a list view, the View is empty. How can I show the results in the listview?
- the listview name is SearchResults2
Please, follow the design below:
please, follow my code below
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
private void button2_Click(object sender, EventArgs e)
{
XElement GetAttribut = XElement.Load(@"C:\mis documentos\c#\xml\SipServer.config");
IEnumerable<XElement> sipeliafile = GetAttribut.Elements();
var GetCodec = from codec in sipeliafile.Descendants("Codec")
where codec.Attribute("Enabled")?.Value == "True"
select codec;
foreach (XElement codec in GetCodec)
{
SearchResults2.Items.Add(codec.Value);
}
}
}
}
Regards,
Jose
Continue reading...