Visual Studio 2019 - Load from XML (C#)

sgt_johnny 1 Reputation point
2020-08-17T19:10:54.537+00:00

Hi everyone,

I'm just starting with Visual 2019 but I'm familiar with C++, but only on hardware devices, not computers!

My goal is to build a Windows Forms Application with C# that does network connection checks and then update a status panel and execute a batch file if needed. For this i created custom label class (graphic formatting etc) and did basic tests.

A timer function is called that does ping one or multiple servers and updates their state with timestamp and red/green/blue label on the form

Now i want to make my application universal, for this i would like to use a .xml file (or other common file) that contains the information, like that:

<servers>
<server>
<text>Server Name 1</text>
<host>SRV1010101 </host>
</server>
</servers>

Then on form load, the application should create a button and some labels for each of the servers in XML, and also ping each server when the timer is elapsed.

Can someone provide help/hints to do this?

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,901 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Muthukrishnan Ramasamy 1 Reputation point
    2020-08-21T15:00:20.713+00:00

    Use WPF/UWP/WinForms for your UI

    Use System.Xml or System.Xml.Linq for Parsing XML data

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.