lundi 2 mars 2015

Multiple conditions, multiple outputs in C#

I'm at a loss here. Can anybody provide a sample program that is capable of reading multiple conditions and execute multiple outputs? To be specific, I'm dealing with checkboxes in TreeView, is there a particular snippet or syntax that when either a single node or multiple nodes checked, the data linked to the checked nodes would execute? I'm not sure if I'm making any sense here.


I tried the if-else statement, but it was only when a single node is checked/selected then the selected file would run. I'm looking up the switch statement right now if it would suit my wants but I don't know. Or do I have to go with the foreach or while loop?


[Working on an XML file parsed to TreeView list with checkboxes, so when node/s checked, it/they would run (external application)]


[C# newbie, still learning, using VS 2005 .NET 2.0, Winforms]


EDIT: I'm working on a long list, so there's too many nodes, user can check lots of nodes and run all of those checked nodes.


Aucun commentaire:

Enregistrer un commentaire