I have a csv file that has these values
MobileId;MenuTr eeView;MenuName ;MenuInfo;MenuA ction
1002;BTT_Menuba um;TS:Coord;22% 71%:0:0;TouchSc reen
1002;BTT_Menuba um;"Open bookmark";0;Wai t
1002;BTT_Menuba um;T;T;PressKey
If it found TouchScreen in the MenuAction Column it does the following multiply the value of 22 by length/100 and the value 71 by width/100. in the MenuInfo Column. and return the answer in x and y knowing that I have the length as a double List in another method and the width also..
second case if It found PressKey Value in MenuAction Column. It gets the X, Y for the Letter T in the MenuInfo from a second csv file which has this data
intKeyID;intMob ileID;strTasten _Name;strTasten funktion;strDru ckrichtung;dblX ;dblY;dblZ;;;
17999;1002;E;Ma ndatory;mitte;-20;-10;27.74;0;0;0
18000;1002;R;Ma ndatory;mitte;-20;-10;27.74;0;0;0
18001;1002;T;Ma ndatory;mitte;-20;-10;27.74;0;0;0
18002;1002;Z;Ma ndatory;mitte;-20;-10;27.74;0;0;0
and also save it in X and Y
What i did so far is
The question is how do i multiply the double with the length in the first if condition andin the second if condition how can i get the corresponding data from the second csv?.. Thanks in advance
MobileId;MenuTr eeView;MenuName ;MenuInfo;MenuA ction
1002;BTT_Menuba um;TS:Coord;22% 71%:0:0;TouchSc reen
1002;BTT_Menuba um;"Open bookmark";0;Wai t
1002;BTT_Menuba um;T;T;PressKey
If it found TouchScreen in the MenuAction Column it does the following multiply the value of 22 by length/100 and the value 71 by width/100. in the MenuInfo Column. and return the answer in x and y knowing that I have the length as a double List in another method and the width also..
second case if It found PressKey Value in MenuAction Column. It gets the X, Y for the Letter T in the MenuInfo from a second csv file which has this data
intKeyID;intMob ileID;strTasten _Name;strTasten funktion;strDru ckrichtung;dblX ;dblY;dblZ;;;
17999;1002;E;Ma ndatory;mitte;-20;-10;27.74;0;0;0
18000;1002;R;Ma ndatory;mitte;-20;-10;27.74;0;0;0
18001;1002;T;Ma ndatory;mitte;-20;-10;27.74;0;0;0
18002;1002;Z;Ma ndatory;mitte;-20;-10;27.74;0;0;0
and also save it in X and Y
What i did so far is
Code:
if(MenuActionList.Contains("TouchScreen")){
string a = MenuInfoList[i];
string [] x = a.Split(new char [] {'%'});
double Xcsv = Convert.ToDouble(x[0]);
double Ycsv = Convert.ToDouble(x[1]);
List<double> W;
List<double> K;
GetLengthWidth(MobileID, out W, out K);
// Knowing that this calls the List Length and //Width
}
else{
if (MenuActionList.Contains("PressKey")){
StreamReader MT = File.OpenText(@"C:\Robotron\Execution\MenuTree.csv");
StreamReader TT = File.OpenText(@"C:\Robotron\Execution\Tastatur.csv");
string line6;
string line7;
while ((line6 = MT.ReadLine()) != null)
{
string[] fll = line6.Split(';');
string []fl = line7.Split(';');
if (fll[3] == fl[2]) continue;
// should get x,y,z
}