I am now using the VB.Net version in my application. But I am having around 70000 nested nodes which on filter taking 3 to 4 minutes to filter the treeview.
Is their any issue with _Filter code in code block 3 which results into this much time ?
Hello,
How can I filter treeview in winforms on textBox change event using C# ? I want to check hide or remove nodes from treeview If filter string not matched. In my case, treeview may have multiple levels so filter should work at multiple levels.
I found on the solution which matches my...
Don't you mean that you have two List<Qualifier> rather than two List<Object> ? Its two List<Qualifier>.
First List<Qualifier> is named as oldValue and second List<Qualifier> is named as newValue.
If the Name in both List<Qualifier> are same and apart from Name other properties like datatype or...
Hello,
I have two list of object and I want to get added, removed and updated by comparing two List<Object>.
I have managed to get removed and added but I am not able to find out how I can get updated by comparing two List<Object>.
Eg.
oldValue = {
Name : Q1,
DataType: Bool,
IsActive: True
}...
How to check if GPU hardware acceleration is available ? Is their any nuget package or API or assembly available by which I can check if GPU hardware acceleration is available or not ?
I modified the code a bit and Its working well now.
//start with file2 (modify as we go), remove groups that doesn't exist in file1
foreach (var group in doc1.XPathSelectElement("//Model[Name='" + glbFileNameWithoutExtension + "']").Descendants("Group").ToArray())
{
var xpath =...
doc1 is the file2 in my case and doc1 is the file I share above with multiple models.
If I pass file1 as doc1 then ToBeDeleted logic is not working. So I reversed where everything works except adding of suffix for specific model.
No still the same. Another model groups is still affected.
var doc1 = XDocument.Load(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "EquipmentModel.xml"));
var doc2 = XDocument.Load(exportFileName)...
ToBedeleted is added to other groups belonging to other model as well.
Below is the code for reference.
var doc1 = XDocument.Load(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "EquipmentModel.xml"));
var doc2 =...
Can we perform the modification for only specific 'Model' as In my case their can also be a case where Models in FIle1 can be multiple so I want to modify only for the Model name which exists in Fie2. File2 will always have a single Model.
What about the suffix to be added to a group name Of group exists in file 1 but not in file 2 than. Group should get added in output file and suffix should get add to the name.
Also, if group exists in file 2 and not in file 1 it shouldn't be removed. It should be their in output file..
Yes and If we can add the suffix in the same logic would be nicer. Else I was thinking of iterating and checking whether nodes existing in File2 are part of Output file If not than or remove suffix '_ToBeDeleted'.
Attached is the sample files for reference.
File1 has a group 'ABSR001' and File2 has a group 'ABSR001_New'.
So output should have both 'ABSR001' with a suffix '_ToBeDeleted' and 'ABSR001_New'.
Below is my current code for your reference. With my existing code. It only adds nodes that are missing in File2.xml. Whereas I want to combine both the files create a new xml file and than iterate to mark the nodes as '_ToBeDeleted'.
Which is not happening.
Case 1 :
File 1...
I shared just an example I my case their are more than 2000 groups and length of groups can be varied in both file1 and file2.
Nodes missing can be either in file1 or in file2. It should get added in file2 if nodes are missing in file1 and vice versa.
Hello,
I am creating two xml files by serializing xml class object and I want to compare both the files and create a new one.
Is there any simpler way to do so.
Eg.
* Case 1
File1.xml
<Model>
<ChildGroups>
<Group>
<Name>Grp1</Name>
</Group>
<Group>
<Name>Grp2</Name>
</Group>
</ChildGroups>...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.