Click here to Skip to main content
15,906,766 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my windows form combobox. I have two modes called "CELL" and "MODE". the cell has 12 submodes in it and "MODE" has two. i have to define it in class. I have used it but I dint face a problem. My problem is i have units called Amplitude;frequency;Duration;Speed;Distance; under each mode. For example if i select mode1 in combo box it has to specify Amplitude;frequency;Duration and mode2 the others. This final attained value from the textbox i have to convert into xml file. how can i call the xml file using this values from class.?

i have achieved without class but my code is lengthy and in case if i need to add an extra integer i have to code in everything. Please help since i am new..

What I have tried:

i have used without class defining the integers everytime in class.
Posted
Updated 23-May-17 5:59am
Comments
CHill60 23-May-17 9:43am    
Not at all clear. Try to describe your data carefully - remember we cannot see your screen.
Member 13153191 23-May-17 10:03am    
i have to use class for integer called CELLS, i have 12 cells fro example cell_1, cell_2.....cell_12 and modes for example mode_1, mode_2. how can i used this in class
i have used like>>> public String Cell { get; set; }
public String Mode { get; set; }

i have to use extra things like Amplitude;frequency;Duration;Speed;Distance; which i enter values for this in a textbox. as of CELL AND MODE i use combobox. how can i use with the class.
I have got XML file from my GUI. I need to have exact through class. because in case if i need to add something in between class would be easy.


<?xml version="1.0" encoding="UTF-8"?>
-<timecode>
-<trial1>
<time_start>23 May 2017
-<motor1>
<direction>Down
<distance>4
<speed>545

-<motor2>
<direction>Up
<distance>89
<speed>68
<frequency>68
<duration>68

-<motor3>
<direction>Down
<distance>68
<speed>76

-<estim>
-<cell_1>
<amplitude>6
<frequency>64
<duration>4




1 solution

Reading MSDN documentation is always good point for start:
Generating Data Type Classes from XML[^]
Walkthrough: Creating Your Own Collection Class[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900