protected override string [] getLineToStore(System.Object myObject) { MultiChronopic mc = (MultiChronopic)myObject; ArrayList array = mc.AsArrayList(pDN); string title; string typeExtra = mc.GetCPsString(); if (mc.Type == Constants.RunAnalysisName) { typeExtra = mc.Vars + "cm " + Util.TrimDecimals(mc.GetTimeRunA(), pDN) + "s " + Util.TrimDecimals(mc.GetAVGSpeedRunA(), pDN) + "m/s"; } title = mc.Type + " " + typeExtra; title += " " + array.Count.ToString() + "n"; if (mc.Simulated == Constants.Simulated) { title += Constants.SimulatedTreeview + " "; } string [] myData = new String [19 + 1]; int count = 0; myData[count++] = title; for (int i = 0; i < 17; i++) { myData[count++] = ""; } myData[count++] = mc.Description; myData[count++] = mc.UniqueID.ToString(); return(mc.DeleteCols(myData, maxCPs, false)); }
protected override string [] getSubLineToStore(System.Object myObject, int lineCount) { MultiChronopic mc = (MultiChronopic)myObject; //write line for treeview string [] myData = new String [19 + 1]; if (mc.Type == Constants.RunAnalysisName) { if (lineCount == 0) { int count = 0; myData[count++] = Catalog.GetString("Stride"); myData[count++] = "TC"; myData[count++] = "TF"; myData[count++] = "TT"; myData[count++] = Catalog.GetString("Freq."); myData[count++] = Catalog.GetString("Width"); myData[count++] = Catalog.GetString("Height"); myData[count++] = Catalog.GetString("Angle"); for (int i = 0; i < 10; i++) { myData[count++] = ""; } myData[count++] = ""; //description column myData[count++] = "-1"; //mark to non select here, select first line return(mc.DeleteCols(myData, maxCPs, false)); } else { ArrayList array = mc.AsArrayList(pDN); return(mc.DeleteCols(array[lineCount - 1].ToString().Split(new char[] { ':' }), maxCPs, false)); } } //not runAnalsysis if (lineCount == 0) { int count = 0; myData[count++] = "0"; myData[count++] = "0"; myData[count++] = Util.BoolToInOut(Util.IntToBool(mc.Cp1StartedIn)); myData[count++] = Util.BoolToInOut(Util.IntToBool(mc.Cp2StartedIn)); myData[count++] = Util.BoolToInOut(Util.IntToBool(mc.Cp3StartedIn)); myData[count++] = Util.BoolToInOut(Util.IntToBool(mc.Cp4StartedIn)); for (int i = 0; i < 12; i++) { myData[count++] = ""; } myData[count++] = ""; //description column myData[count++] = "-1"; //mark to non select here, select first line return(mc.DeleteCols(myData, maxCPs, false)); } else { ArrayList array = mc.AsArrayList(pDN); return(mc.DeleteCols(array[lineCount - 1].ToString().Split(new char[] { ':' }), maxCPs, false)); } }
protected void printMCs(string title) { int dec=preferences.digitsNumber; //decimals ArrayList myData = new ArrayList(1); if(myMCs.Length > 0) printTitles(title); foreach (string testString in myMCs) { myData = new ArrayList(1); myData.Add( "\n" + Catalog.GetString("Person ID") + ":" + Catalog.GetString("Person name") + ":" + Catalog.GetString("MC ID") + ":" + Catalog.GetString("Type") + ":" + Catalog.GetString("Description") + ":" + Catalog.GetString("Simulated") ); string [] myStr = testString.Split(new char[] {':'}); MultiChronopic mc = new MultiChronopic(); mc.UniqueID = Convert.ToInt32(myStr[1].ToString()); mc.PersonID = Convert.ToInt32(myStr[2].ToString()); mc.Type = myStr[4].ToString(); mc.Cp1StartedIn = Convert.ToInt32(myStr[5].ToString()); mc.Cp2StartedIn = Convert.ToInt32(myStr[6].ToString()); mc.Cp3StartedIn = Convert.ToInt32(myStr[7].ToString()); mc.Cp4StartedIn = Convert.ToInt32(myStr[8].ToString()); mc.Cp1InStr = myStr[9].ToString(); mc.Cp1OutStr = myStr[10].ToString(); mc.Cp2InStr = myStr[11].ToString(); mc.Cp2OutStr = myStr[12].ToString(); mc.Cp3InStr = myStr[13].ToString(); mc.Cp3OutStr = myStr[14].ToString(); mc.Cp4InStr = myStr[15].ToString(); mc.Cp4OutStr = myStr[16].ToString(); mc.Vars = myStr[17].ToString(); mc.Description = myStr[18].ToString(); mc.Simulated = Convert.ToInt32(myStr[19].ToString()); string typeExtra = mc.GetCPsString(); if(mc.Type == Constants.RunAnalysisName) typeExtra = mc.Vars + " cm."; myData.Add ( mc.PersonID + ":" + myStr[0] + ":" + mc.UniqueID + ":" + //person.name, mc.uniqueID mc.Type + " " + typeExtra + ":" + Util.RemoveNewLine(mc.Description, true) + ":" + Util.SimulatedTestNoYes(Convert.ToInt32(mc.Simulated.ToString())) ); writeData(myData); myData = new ArrayList(1); string cols4 = ": : : :"; myData.Add( mc.DeleteCols( " " + ":" + Catalog.GetString ("Time") + ":" + Catalog.GetString ("State") + cols4 + Catalog.GetString ("Change") + cols4 + Catalog.GetString ("IN-IN") + cols4 + Catalog.GetString ("OUT-OUT") + cols4 , mc.CPs(), false) ); string titleStr = "CP1:CP2:CP3:CP4:"; myData.Add( mc.DeleteCols( " " + ":" + " " + ":" + titleStr + titleStr + titleStr + titleStr , mc.CPs(), false) ); string [] averages = mc.Statistics(true, dec); //first boolean is averageOrSD int count = 0; myData.Add( mc.DeleteCols( Catalog.GetString("AVG") + ": : " + cols4 + " " + cols4 + Util.RemoveZeroOrMinus(Util.TrimDecimals( averages[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( averages[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( averages[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( averages[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( averages[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( averages[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( averages[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( averages[count++], dec )) , mc.CPs(), false) ); string [] sds = mc.Statistics(false, dec); //first boolean is averageOrSD count = 0; myData.Add( mc.DeleteCols( Catalog.GetString("SD") + ": : " + cols4 + " " + cols4 + Util.RemoveZeroOrMinus(Util.TrimDecimals( sds[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( sds[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( sds[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( sds[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( sds[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( sds[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( sds[count++], dec )) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals( sds[count++], dec )) , mc.CPs(), false) ); ArrayList array = mc.AsArrayList(dec); foreach(string row in array) myData.Add(mc.DeleteCols(row, mc.CPs(), true)); writeData(myData); writeData("VERTICAL-SPACE"); } }
protected void printMCs(string title) { int dec = preferences.digitsNumber; //decimals ArrayList myData = new ArrayList(1); if (myMCs.Length > 0) { printTitles(title); } foreach (string testString in myMCs) { myData = new ArrayList(1); myData.Add("\n" + Catalog.GetString("Person ID") + ":" + Catalog.GetString("Person name") + ":" + Catalog.GetString("MC ID") + ":" + Catalog.GetString("Type") + ":" + Catalog.GetString("Description") + ":" + Catalog.GetString("Simulated")); string [] myStr = testString.Split(new char[] { ':' }); MultiChronopic mc = new MultiChronopic(); mc.UniqueID = Convert.ToInt32(myStr[1].ToString()); mc.PersonID = Convert.ToInt32(myStr[2].ToString()); mc.Type = myStr[4].ToString(); mc.Cp1StartedIn = Convert.ToInt32(myStr[5].ToString()); mc.Cp2StartedIn = Convert.ToInt32(myStr[6].ToString()); mc.Cp3StartedIn = Convert.ToInt32(myStr[7].ToString()); mc.Cp4StartedIn = Convert.ToInt32(myStr[8].ToString()); mc.Cp1InStr = myStr[9].ToString(); mc.Cp1OutStr = myStr[10].ToString(); mc.Cp2InStr = myStr[11].ToString(); mc.Cp2OutStr = myStr[12].ToString(); mc.Cp3InStr = myStr[13].ToString(); mc.Cp3OutStr = myStr[14].ToString(); mc.Cp4InStr = myStr[15].ToString(); mc.Cp4OutStr = myStr[16].ToString(); mc.Vars = myStr[17].ToString(); mc.Description = myStr[18].ToString(); mc.Simulated = Convert.ToInt32(myStr[19].ToString()); string typeExtra = mc.GetCPsString(); if (mc.Type == Constants.RunAnalysisName) { typeExtra = mc.Vars + " cm."; } myData.Add( mc.PersonID + ":" + myStr[0] + ":" + mc.UniqueID + ":" + //person.name, mc.uniqueID mc.Type + " " + typeExtra + ":" + Util.RemoveNewLine(mc.Description, true) + ":" + Util.SimulatedTestNoYes(Convert.ToInt32(mc.Simulated.ToString())) ); writeData(myData); myData = new ArrayList(1); string cols4 = ": : : :"; myData.Add(mc.DeleteCols( " " + ":" + Catalog.GetString("Time") + ":" + Catalog.GetString("State") + cols4 + Catalog.GetString("Change") + cols4 + Catalog.GetString("IN-IN") + cols4 + Catalog.GetString("OUT-OUT") + cols4 , mc.CPs(), false) ); string titleStr = "CP1:CP2:CP3:CP4:"; myData.Add(mc.DeleteCols( " " + ":" + " " + ":" + titleStr + titleStr + titleStr + titleStr , mc.CPs(), false) ); string [] averages = mc.Statistics(true, dec); //first boolean is averageOrSD int count = 0; myData.Add(mc.DeleteCols( Catalog.GetString("AVG") + ": : " + cols4 + " " + cols4 + Util.RemoveZeroOrMinus(Util.TrimDecimals(averages[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(averages[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(averages[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(averages[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(averages[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(averages[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(averages[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(averages[count++], dec)) , mc.CPs(), false) ); string [] sds = mc.Statistics(false, dec); //first boolean is averageOrSD count = 0; myData.Add(mc.DeleteCols( Catalog.GetString("SD") + ": : " + cols4 + " " + cols4 + Util.RemoveZeroOrMinus(Util.TrimDecimals(sds[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(sds[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(sds[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(sds[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(sds[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(sds[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(sds[count++], dec)) + ":" + Util.RemoveZeroOrMinus(Util.TrimDecimals(sds[count++], dec)) , mc.CPs(), false) ); ArrayList array = mc.AsArrayList(dec); foreach (string row in array) { myData.Add(mc.DeleteCols(row, mc.CPs(), true)); } writeData(myData); writeData("VERTICAL-SPACE"); } }