I have this Xml file that i browse from my HDD into my C# program. Now the nodes of this Xml doc get displayed in a tree view in my winform. All my logic is in the winform right now. There are three methods:
- To load the Xml doc in memory.
- Add nodes to tree which is called by the previous method in point 1.
- And event that works when i click on any node to find its attributes.
Rest, i have various buttons like browse, expand tree, clear. all are in the winform. My browse button click event is also in the winform class which is obvious.
Now what i have to do it i have to make a separate class for business logic that includes the method in point 1 and point 2. Rest remains in the winform class. this new class is in the same project. Now the project has two classes - 1 is winforms and the other is that i made to store my business logic so as to keeping frontend class free from business logic.
I cannot do that by making use of objects but i have to make use of giving file path in the class that has the logic. so that, that class knows the file path. Do you have any idea how can i do it?
Please tell me the syntax as i am a newbie.