forked from GNOME/chronojump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
multiChronopic.cs
665 lines (593 loc) · 19.7 KB
/
multiChronopic.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
/*
* This file is part of ChronoJump
*
* ChronoJump is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* ChronoJump is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Copyright (C) 2004-2009 Xavier de Blas <xaviblas@gmail.com>
*/
using System;
using System.Data;
using System.Collections; //ArrayList
public class MultiChronopic : Event
{
private int cp1StartedIn;
private int cp2StartedIn;
private int cp3StartedIn;
private int cp4StartedIn;
private string cp1InStr;
private string cp1OutStr;
private string cp2InStr;
private string cp2OutStr;
private string cp3InStr;
private string cp3OutStr;
private string cp4InStr;
private string cp4OutStr;
private string vars; //distance at runAnalysis (unused currently on multiChronopic default)
private ArrayList array;
private bool arrayDone;
public MultiChronopic() {
}
//after inserting database (SQL)
public MultiChronopic(int uniqueID, int personID, int sessionID, string type,
int cp1StartedIn, int cp2StartedIn, int cp3StartedIn, int cp4StartedIn,
string cp1InStr, string cp1OutStr,
string cp2InStr, string cp2OutStr,
string cp3InStr, string cp3OutStr,
string cp4InStr, string cp4OutStr,
string vars, string description, int simulated)
{
this.uniqueID = uniqueID;
this.personID = personID;
this.sessionID = sessionID;
this.type = type;
this.cp1StartedIn = cp1StartedIn;
this.cp2StartedIn = cp2StartedIn;
this.cp3StartedIn = cp3StartedIn;
this.cp4StartedIn = cp4StartedIn;
this.cp1InStr = cp1InStr;
this.cp1OutStr = cp1OutStr;
this.cp2InStr = cp2InStr;
this.cp2OutStr = cp2OutStr;
this.cp3InStr = cp3InStr;
this.cp3OutStr = cp3OutStr;
this.cp4InStr = cp4InStr;
this.cp4OutStr = cp4OutStr;
this.vars = vars;
this.description = description;
this.simulated = simulated;
arrayDone = false;
}
//used to select a event at SqliteMultiChronopic.SelectMultiChronopicData and at Sqlite.convertTables
//Util.ConvertToPointIfNeeded is used because multichronopic data is recorded by mistake as ',' instead of '.' on database
public MultiChronopic(string [] eventString) {
this.uniqueID = Convert.ToInt32(eventString[0]);
this.personID = Convert.ToInt32(eventString[1]);
this.sessionID = Convert.ToInt32(eventString[2]);
this.type = eventString[3].ToString();
this.cp1StartedIn = Convert.ToInt32(eventString[4]);
this.cp2StartedIn = Convert.ToInt32(eventString[5]);
this.cp3StartedIn = Convert.ToInt32(eventString[6]);
this.cp4StartedIn = Convert.ToInt32(eventString[7]);
this.cp1InStr = Util.ConvertToPointIfNeeded(eventString[8]);
this.cp1OutStr = Util.ConvertToPointIfNeeded(eventString[9]);
this.cp2InStr = Util.ConvertToPointIfNeeded(eventString[10]);
this.cp2OutStr = Util.ConvertToPointIfNeeded(eventString[11]);
this.cp3InStr = Util.ConvertToPointIfNeeded(eventString[12]);
this.cp3OutStr = Util.ConvertToPointIfNeeded(eventString[13]);
this.cp4InStr = Util.ConvertToPointIfNeeded(eventString[14]);
this.cp4OutStr = Util.ConvertToPointIfNeeded(eventString[15]);
this.vars = eventString[16];
this.description = eventString[17];
this.simulated = Convert.ToInt32(eventString[18]);
}
public override int InsertAtDB (bool dbconOpened, string tableName) {
return SqliteMultiChronopic.Insert(dbconOpened, tableName,
uniqueID.ToString(),
personID, sessionID,
type,
cp1StartedIn, cp2StartedIn, cp3StartedIn, cp4StartedIn,
cp1InStr, cp1OutStr,
cp2InStr, cp2OutStr,
cp3InStr, cp3OutStr,
cp4InStr, cp4OutStr,
vars, description, simulated);
}
public ArrayList AsArrayList(int pDN)
{
if(arrayDone)
return array;
if(type == Constants.RunAnalysisName)
return asArrayListRunA(pDN);
else
return asArrayListDefault(pDN);
}
public double GetTimeRunA() {
string [] cp1InFull = this.Cp1InStr.Split(new char[] {'='});
string [] cp1OutFull = this.Cp1OutStr.Split(new char[] {'='});
return Convert.ToDouble(cp1InFull[0]) + Convert.ToDouble(cp1OutFull[1]);
}
public double GetAVGSpeedRunA() {
double runADistanceMeters = Convert.ToDouble(vars) / 100;
return runADistanceMeters / GetTimeRunA();
}
public ArrayList asArrayListRunA(int pDN)
{
ArrayList returnArray = new ArrayList(1);
string [] returnLine = new String[20];
string [] cp2InFull = this.Cp2InStr.Split(new char[] {'='});
string [] cp2OutFull = this.Cp2OutStr.Split(new char[] {'='});
double avgSpeed = GetAVGSpeedRunA();
for(int lineCount=0; lineCount < cp2InFull.Length; lineCount++) {
int count=0;
double tc = Convert.ToDouble(cp2InFull[lineCount]);
double tf = Convert.ToDouble(cp2OutFull[lineCount]);
double totalTime = tc + tf;
double freq = 1 / totalTime;
double width = avgSpeed / freq;
double height = 1.22 * System.Math.Pow (tf, 2);
double angle = System.Math.Atan(System.Math.Sqrt(2 * 9.81 * height) / avgSpeed ) * 180 / System.Math.PI;
returnLine[count++] = (lineCount+1).ToString();
returnLine[count++] = Util.TrimDecimals(tc, pDN);
returnLine[count++] = Util.TrimDecimals(tf, pDN);
returnLine[count++] = Util.TrimDecimals(totalTime, pDN);
returnLine[count++] = Util.TrimDecimals(freq, pDN);
returnLine[count++] = Util.TrimDecimals(width, pDN);
returnLine[count++] = Util.TrimDecimals(height, pDN);
returnLine[count++] = Util.TrimDecimals(angle, pDN);
for(int i=0; i < 10; i++)
returnLine[count++] = "";
returnLine[count++] = ""; //description column (unused because this array if for eg. treeview subLines)
returnLine[count++] = "-1"; //mark to non select here, select first line
returnArray.Add(Util.StringArrayToString(returnLine, ":"));
}
array = returnArray;
arrayDone = true;
return array;
}
public ArrayList asArrayListDefault(int pDN)
{
ArrayList returnArray = new ArrayList(1);
string [] returnLine = new String[20];
string [] cp1InFull = this.Cp1InStr.Split(new char[] {'='});
string [] cp1OutFull = this.Cp1OutStr.Split(new char[] {'='});
string [] cp2InFull = this.Cp2InStr.Split(new char[] {'='});
string [] cp2OutFull = this.Cp2OutStr.Split(new char[] {'='});
string [] cp3InFull = this.Cp3InStr.Split(new char[] {'='});
string [] cp3OutFull = this.Cp3OutStr.Split(new char[] {'='});
string [] cp4InFull = this.Cp4InStr.Split(new char[] {'='});
string [] cp4OutFull = this.Cp4OutStr.Split(new char[] {'='});
bool ended = false;
bool cp1NextIn = Util.IntToBool(this.Cp1StartedIn);
bool cp2NextIn = Util.IntToBool(this.Cp2StartedIn);
bool cp3NextIn = Util.IntToBool(this.Cp3StartedIn);
bool cp4NextIn = Util.IntToBool(this.Cp4StartedIn);
double cp1NextTime;
double cp2NextTime;
double cp3NextTime;
double cp4NextTime;
double runningTime = 0;
int cp1InCount = 0;
int cp1OutCount = 0;
int cp2InCount = 0;
int cp2OutCount = 0;
int cp3InCount = 0;
int cp3OutCount = 0;
int cp4InCount = 0;
int cp4OutCount = 0;
double cp1Sum = 0;
double cp2Sum = 0;
double cp3Sum = 0;
double cp4Sum = 0;
double rt1InRecorded = 0;
double rt1OutRecorded = 0;
double rt2InRecorded = 0;
double rt2OutRecorded = 0;
double rt3InRecorded = 0;
double rt3OutRecorded = 0;
double rt4InRecorded = 0;
double rt4OutRecorded = 0;
double iibefore = -1;
double oobefore = -1;
int lineCount = 0;
while(! ended) {
int nextCp = -1;
/*
need the last && mcCp1InStr.Length>0
because if string it's empty cp1InFull will be created with lenght 1
*/
if(cp1NextIn && cp1InFull.Length > cp1InCount && this.Cp1InStr.Length>0)
cp1NextTime = Convert.ToDouble(cp1InFull[cp1InCount]) + cp1Sum;
else if(! cp1NextIn && cp1OutFull.Length > cp1OutCount && this.Cp1OutStr.Length>0)
cp1NextTime = Convert.ToDouble(cp1OutFull[cp1OutCount]) + cp1Sum;
else
cp1NextTime = 99999;
if(cp2NextIn && cp2InFull.Length > cp2InCount && this.Cp2InStr.Length>0)
cp2NextTime = Convert.ToDouble(cp2InFull[cp2InCount]) + cp2Sum;
else if(! cp2NextIn && cp2OutFull.Length > cp2OutCount && this.Cp2OutStr.Length>0)
cp2NextTime = Convert.ToDouble(cp2OutFull[cp2OutCount]) + cp2Sum;
else
cp2NextTime = 99999;
if(cp3NextIn && cp3InFull.Length > cp3InCount && this.Cp3InStr.Length>0)
cp3NextTime = Convert.ToDouble(cp3InFull[cp3InCount]) + cp3Sum;
else if(! cp3NextIn && cp3OutFull.Length > cp3OutCount && this.Cp3OutStr.Length>0)
cp3NextTime = Convert.ToDouble(cp3OutFull[cp3OutCount]) + cp3Sum;
else
cp3NextTime = 99999;
if(cp4NextIn && cp4InFull.Length > cp4InCount && this.Cp4InStr.Length>0)
cp4NextTime = Convert.ToDouble(cp4InFull[cp4InCount]) + cp4Sum;
else if(! cp4NextIn && cp4OutFull.Length > cp4OutCount && this.Cp4OutStr.Length>0)
cp4NextTime = Convert.ToDouble(cp4OutFull[cp4OutCount]) + cp4Sum;
else
cp4NextTime = 99999;
if(cp1NextTime == 99999 && cp2NextTime == 99999 && cp3NextTime == 99999 && cp4NextTime == 99999)
ended = true;
else {
if(cp1NextTime <= cp2NextTime) {
if(cp1NextTime <= cp3NextTime) {
if(cp1NextTime <= cp4NextTime)
nextCp = 1;
else
nextCp = 4;
} else {
if(cp3NextTime <= cp4NextTime)
nextCp = 3;
else
nextCp = 4;
}
} else {
if(cp2NextTime <= cp3NextTime) {
if(cp2NextTime <= cp4NextTime)
nextCp = 2;
else
nextCp = 4;
} else {
if(cp3NextTime <= cp4NextTime)
nextCp = 3;
else
nextCp = 4;
}
}
int pos=0;
double thisTime = 0;
string thisState = Constants.Out;
iibefore = -1;
oobefore = -1;
pos = nextCp -1;
if(nextCp == 1)
{
thisTime = cp1NextTime - cp1Sum;
cp1Sum += thisTime;
runningTime = cp1Sum;
if(cp1NextIn) {
cp1InCount ++;
if( ! (rt1OutRecorded == 0 && Util.IntToBool(this.cp1StartedIn)) )
oobefore = runningTime - rt1OutRecorded; //runningTime minus runningtime recorded at last out
rt1OutRecorded = runningTime;
} else {
cp1OutCount ++;
if( ! (rt1InRecorded == 0 && ! Util.IntToBool(this.cp1StartedIn)) )
iibefore = runningTime - rt1InRecorded; //runningTime minus runningtime recorded at last in
rt1InRecorded = runningTime;
}
cp1NextIn = ! cp1NextIn;
thisState = Util.BoolToInOut(cp1NextIn);
}
else if(nextCp == 2)
{
thisTime = cp2NextTime - cp2Sum;
cp2Sum += thisTime;
runningTime = cp2Sum;
if(cp2NextIn) {
cp2InCount ++;
if( ! (rt2OutRecorded == 0 && Util.IntToBool(this.cp2StartedIn)) )
oobefore = runningTime - rt2OutRecorded; //runningTime minus runningtime recorded at last out
rt2OutRecorded = runningTime;
} else {
cp2OutCount ++;
if( ! (rt2InRecorded == 0 && ! Util.IntToBool(this.cp2StartedIn)) )
iibefore = runningTime - rt2InRecorded; //runningTime minus runningtime recorded at last in
rt2InRecorded = runningTime;
}
cp2NextIn = ! cp2NextIn;
thisState = Util.BoolToInOut(cp2NextIn);
}
else if(nextCp == 3)
{
thisTime = cp3NextTime - cp3Sum;
cp3Sum += thisTime;
runningTime = cp3Sum;
if(cp3NextIn) {
cp3InCount ++;
if( ! (rt3OutRecorded == 0 && Util.IntToBool(this.cp3StartedIn)) )
oobefore = runningTime - rt3OutRecorded; //runningTime minus runningtime recorded at last out
rt3OutRecorded = runningTime;
} else {
cp3OutCount ++;
if( ! (rt3InRecorded == 0 && ! Util.IntToBool(this.cp3StartedIn)) )
iibefore = runningTime - rt3InRecorded; //runningTime minus runningtime recorded at last in
rt3InRecorded = runningTime;
}
cp3NextIn = ! cp3NextIn;
thisState = Util.BoolToInOut(cp3NextIn);
}
else if(nextCp == 4)
{
thisTime = cp4NextTime - cp4Sum;
cp4Sum += thisTime;
runningTime = cp4Sum;
if(cp4NextIn) {
cp4InCount ++;
if( ! (rt4OutRecorded == 0 && Util.IntToBool(this.cp4StartedIn)) )
oobefore = runningTime - rt4OutRecorded; //runningTime minus runningtime recorded at last out
rt4OutRecorded = runningTime;
} else {
cp4OutCount ++;
if( ! (rt4InRecorded == 0 && ! Util.IntToBool(this.cp4StartedIn)) )
iibefore = runningTime - rt4InRecorded; //runningTime minus runningtime recorded at last in
rt4InRecorded = runningTime;
}
cp4NextIn = ! cp4NextIn;
thisState = Util.BoolToInOut(cp4NextIn);
}
int count=0;
returnLine[count++] = (++lineCount).ToString();
returnLine[count++] = Util.TrimDecimals(runningTime.ToString(), pDN);
for(int i=0; i<16; i++) {
if(i==pos)
returnLine[count++] = thisState;
else if(i == (pos +4))
returnLine[count++] = Util.TrimDecimals(thisTime.ToString(), pDN);
else if(i == (pos +8) && iibefore != -1)
returnLine[count++] = Util.TrimDecimals(iibefore.ToString(), pDN);
else if(i == (pos +12) && oobefore != -1)
returnLine[count++] = Util.TrimDecimals(oobefore.ToString(), pDN);
else
returnLine[count++] = "";
}
returnLine[count++] = ""; //description column (unused because this array if for eg. treeview subLines)
returnLine[count++] = "-1"; //mark to non select here, select first line
returnArray.Add(Util.StringArrayToString(returnLine, ":"));
}
}
array = returnArray;
arrayDone = true;
return array;
}
public string [] Statistics(bool averageOrSD, int pDN) { //if averageOrSD is false, then SD
ArrayList array = this.AsArrayList(pDN);
string cp1iiStr = "";
string cp2iiStr = "";
string cp3iiStr = "";
string cp4iiStr = "";
string cp1ooStr = "";
string cp2ooStr = "";
string cp3ooStr = "";
string cp4ooStr = "";
string sep1ii = "";
string sep1oo = "";
string sep2ii = "";
string sep2oo = "";
string sep3ii = "";
string sep3oo = "";
string sep4ii = "";
string sep4oo = "";
int col = 10; //in-in cp1
foreach(string str in array) {
string [] strFull = str.Split(new char[] {':'});
if(strFull[col] != "") {
cp1iiStr += sep1ii + strFull[col];
sep1ii = "=";
}
if(strFull[col+1] != "") {
cp2iiStr += sep2ii + strFull[col+1];
sep2ii = "=";
}
if(strFull[col+2] != "") {
cp3iiStr += sep3ii + strFull[col+2];
sep3ii = "=";
}
if(strFull[col+3] != "") {
cp4iiStr += sep4ii + strFull[col+3];
sep4ii = "=";
}
if(strFull[col+4] != "") {
cp1ooStr += sep1oo + strFull[col+4];
sep1oo = "=";
}
if(strFull[col+5] != "") {
cp2ooStr += sep2oo + strFull[col+5];
sep2oo = "=";
}
if(strFull[col+6] != "") {
cp3ooStr += sep3oo + strFull[col+6];
sep3oo = "=";
}
if(strFull[col+7] != "") {
cp4ooStr += sep4oo + strFull[col+7];
sep4oo = "=";
}
}
string [] myData = new String [8];
int count = 0;
myData[count++] = getIndex(averageOrSD, cp1iiStr);
myData[count++] = getIndex(averageOrSD, cp2iiStr);
myData[count++] = getIndex(averageOrSD, cp3iiStr);
myData[count++] = getIndex(averageOrSD, cp4iiStr);
myData[count++] = getIndex(averageOrSD, cp1ooStr);
myData[count++] = getIndex(averageOrSD, cp2ooStr);
myData[count++] = getIndex(averageOrSD, cp3ooStr);
myData[count] = getIndex(averageOrSD, cp4ooStr);
return myData;
}
private string getIndex(bool averageOrSD, string str) {
if(averageOrSD)
return Util.GetAverage(str).ToString();
else
return Util.CalculateSD(
Util.ChangeEqualForColon(str),
Util.GetTotalTime(str),
Util.GetNumberOfJumps(str, false)).ToString();
}
public int CPs() {
if(cp3InStr == "" && cp3OutStr == "")
return 2;
else if(cp4InStr == "" && cp4OutStr == "")
return 3;
else
return 4;
}
public string GetCPsString () {
string cpsStr = "";
string sep = "";
if(this.cp1InStr.Length + this.cp1OutStr.Length > 0) {
cpsStr += sep + "1";
sep = ", ";
}
if(this.cp2InStr.Length + this.cp2OutStr.Length > 0) {
cpsStr += sep + "2";
sep = ", ";
}
if(CPs() >= 3 && this.cp3InStr.Length + this.cp3OutStr.Length > 0) {
cpsStr += sep + "3";
sep = ", ";
}
if(CPs() == 4 && this.cp4InStr.Length + this.cp4OutStr.Length > 0) {
cpsStr += sep + "4";
sep = ", ";
}
return cpsStr;
}
/*
we pass maxCPs because treeviewMultiChronopic will use maxCPs in session (from sqliteMultiChronopic)
but exportSession will use mc.CPs (cps of this multiChronopic)
*/
public string [] DeleteCols(string [] s1, int maxCPs, bool deleteSubRowId) {
if(type == Constants.RunAnalysisName)
return deleteColsRunA(s1, maxCPs, deleteSubRowId);
else
return deleteColsDefault(s1, maxCPs, deleteSubRowId);
}
//export session passes a string instead of a stringArray
public string DeleteCols(string s1, int maxCPs, bool deleteSubRowId) {
string [] strArr = s1.Split(new char[] {':'});
strArr = DeleteCols(strArr, maxCPs, deleteSubRowId);
return Util.StringArrayToString(strArr, ":");
}
private string [] deleteColsRunA(string [] s1, int maxCPs, bool deleteSubRowId) {
/*
deleteSubRowId is reffered to the "-1" at end of each row in treeview
this is not used in exportSession, then this bools allows to delete it
*/
if(deleteSubRowId)
s1[19] = "";
if(maxCPs == 2) {
string [] s2 = new String[11+1];
for(int i=0, count=0; i < s1.Length; i++) {
if(i < 10 || i > 17)
s2[count++] = s1[i];
}
return s2;
}
else if(maxCPs == 3) {
string [] s2 = new String[15+1];
for(int i=0, count=0; i < s1.Length; i++) {
if(i < 14 || i > 17)
s2[count++] = s1[i];
}
return s2;
}
else //maxCPs == 4
return s1;
}
private string [] deleteColsDefault(string [] s1, int maxCPs, bool deleteSubRowId) {
/*
deleteSubRowId is reffered to the "-1" at end of each row in treeview
this is not used in exportSession, then this bools allows to delete it
*/
if(deleteSubRowId)
s1[19] = "";
if(maxCPs == 2) {
string [] s2 = new String[11+1];
for(int i=0, count=0; i < s1.Length; i++) {
if(i != 4 && i != 5 && i != 8 && i != 9 && i != 12 && i != 13 && i != 16 && i != 17)
s2[count++] = s1[i];
}
return s2;
}
else if(maxCPs == 3) {
string [] s2 = new String[15+1];
for(int i=0, count=0; i < s1.Length; i++) {
if(i != 5 && i != 9 && i != 13 && i != 17)
s2[count++] = s1[i];
}
return s2;
}
else //maxCPs == 4
return s1;
}
public int Cp1StartedIn {
get { return cp1StartedIn; }
set { cp1StartedIn = value; }
}
public int Cp2StartedIn {
get { return cp2StartedIn; }
set { cp2StartedIn = value; }
}
public int Cp3StartedIn {
get { return cp3StartedIn; }
set { cp3StartedIn = value; }
}
public int Cp4StartedIn {
get { return cp4StartedIn; }
set { cp4StartedIn = value; }
}
public string Cp1InStr {
get { return cp1InStr; }
set { cp1InStr = value; }
}
public string Cp1OutStr {
get { return cp1OutStr; }
set { cp1OutStr = value; }
}
public string Cp2InStr {
get { return cp2InStr; }
set { cp2InStr = value; }
}
public string Cp2OutStr {
get { return cp2OutStr; }
set { cp2OutStr = value; }
}
public string Cp3InStr {
get { return cp3InStr; }
set { cp3InStr = value; }
}
public string Cp3OutStr {
get { return cp3OutStr; }
set { cp3OutStr = value; }
}
public string Cp4InStr {
get { return cp4InStr; }
set { cp4InStr = value; }
}
public string Cp4OutStr {
get { return cp4OutStr; }
set { cp4OutStr = value; }
}
public string Vars {
get { return vars; }
set { vars = value; }
}
~MultiChronopic() {}
}