This commit is contained in:
parent
22ceb38325
commit
591e17fa42
@ -5,6 +5,7 @@ using System.IO;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using VG;
|
using VG;
|
||||||
|
|
||||||
namespace XYPlots
|
namespace XYPlots
|
||||||
@ -390,7 +391,8 @@ namespace XYPlots
|
|||||||
char[] sepchar = { ',' };
|
char[] sepchar = { ',' };
|
||||||
string[] xystr = NextPiece().Split(sepchar);
|
string[] xystr = NextPiece().Split(sepchar);
|
||||||
x = double.Parse(xystr[0]);
|
x = double.Parse(xystr[0]);
|
||||||
y = double.Parse(xystr[1]);
|
char[] trimEndDot = { '.' }; // Wolf Creek OFN SB-008, figure 3 had a string like 50.0. so trim the ending '.'
|
||||||
|
y = double.Parse(xystr[1].Trim(trimEndDot));
|
||||||
if (doLOG10[flag, X])
|
if (doLOG10[flag, X])
|
||||||
retval.xyValue[X] = (int)(Offset[flag, X] + Scale[flag, X] * Math.Log10(x) + .5);
|
retval.xyValue[X] = (int)(Offset[flag, X] + Scale[flag, X] * Math.Log10(x) + .5);
|
||||||
else
|
else
|
||||||
@ -446,6 +448,12 @@ namespace XYPlots
|
|||||||
{
|
{
|
||||||
Buff = Buff.Substring(4);
|
Buff = Buff.Substring(4);
|
||||||
}
|
}
|
||||||
|
// remove an extra spaces between ><
|
||||||
|
//Buff = Regex.Replace(Buff, @"[ ]+<", "<");
|
||||||
|
Buff = Buff.Replace(">\r ", ">\r\n ");
|
||||||
|
Buff = Regex.Replace(Buff, @"[ ]+<", "<");
|
||||||
|
// some data only had carriage return, replace these with cr/nl so that following code
|
||||||
|
// will work
|
||||||
Buff = Buff.Replace(">\r<", ">\r\n<");
|
Buff = Buff.Replace(">\r<", ">\r\n<");
|
||||||
|
|
||||||
while ((ptr = Buff.IndexOf(">\r\n<", ptr)) > 0)
|
while ((ptr = Buff.IndexOf(">\r\n<", ptr)) > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user