Previously checked-in a wrong version.
Previously checked-in the wrong version
This commit is contained in:
parent
ae196cfb5f
commit
2bf3fc3844
@ -174,32 +174,6 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
public void ListROIDs()
|
|
||||||
{
|
|
||||||
Console.WriteLine("'roid','ParentID','ID','Value','Title'");
|
|
||||||
foreach (string roid in dicRos.Keys)
|
|
||||||
{
|
|
||||||
rochild child = dicRos[roid];
|
|
||||||
if (child.children != null)
|
|
||||||
{
|
|
||||||
Console.WriteLine("'Group','R{0}',{1},{2},{3},'{4}'", child.roid, child.ParentID, child.ID, child.type, child.title);
|
|
||||||
foreach (rochild child1 in child.children)
|
|
||||||
{
|
|
||||||
if (child1.type == 1)
|
|
||||||
Console.WriteLine("'RO','R{0}',{1},{2},{3},'{4}'", child1.roid, child1.ParentID, child1.ID, child1.type, child1.value);
|
|
||||||
else
|
|
||||||
Console.WriteLine("'RO','R{0}',{1},{2},{3}", child1.roid, child1.ParentID, child1.ID, child1.type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(child.type == 1)
|
|
||||||
Console.WriteLine("'RO','R{0}',{1},{2},{3},'{4}'", child.roid, child.ParentID, child.ID, child.type, child.value);
|
|
||||||
else
|
|
||||||
Console.WriteLine("'RO','R{0}',{1},{2},{3}", child.roid, child.ParentID, child.ID, child.type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public rochild GetRoChild(string ROID)
|
public rochild GetRoChild(string ROID)
|
||||||
{
|
{
|
||||||
if (dicRos == null) ParseIntoDictionary(_ROFst != null ? _ROFst.ROLookup : _ROFstInfo.ROLookup);
|
if (dicRos == null) ParseIntoDictionary(_ROFst != null ? _ROFst.ROLookup : _ROFstInfo.ROLookup);
|
||||||
@ -741,33 +715,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (child.appid != null && child.appid != "" && child.ID != 0)
|
if (child.appid != null && child.appid != "" && child.ID != 0)
|
||||||
{
|
{
|
||||||
string key = string.Format("{0}-{1}", prefix, child.appid);
|
string key = string.Format("{0}-{1}", prefix, child.appid);
|
||||||
if (_dicROAPID.ContainsKey(key))
|
if (!_dicROAPID.ContainsKey(key))
|
||||||
{
|
|
||||||
rochild child1 = _dicROAPID[key];
|
|
||||||
Console.WriteLine("'Dupicate AppID','{0}',{1},'{2}',{3},{4},'{5}','{6}','{7}'",
|
|
||||||
key, child.type, child.roid, child.ParentID, child.ID, child.title, child.appid, child.value);
|
|
||||||
Console.WriteLine("'Dupicate AppID','{0}',{1},'{2}',{3},{4},'{5}','{6}','{7}'",
|
|
||||||
key, child1.type, child1.roid, child1.ParentID, child1.ID, child1.title, child1.appid, child1.value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
_dicROAPID.Add(key, child);
|
_dicROAPID.Add(key, child);
|
||||||
}
|
}
|
||||||
if (child.children != null)
|
if (child.children != null)
|
||||||
BuildROAPIDDictionary(prefix, child.children);
|
BuildROAPIDDictionary(prefix, child.children);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private bool IsFirstReturn(rochild child)
|
|
||||||
{
|
|
||||||
if (child.roid.Length < 13) return true;
|
|
||||||
string SubID = child.roid.Substring(12);
|
|
||||||
if (SubID == "") return true;
|
|
||||||
if (SubID == "0000") return true;
|
|
||||||
if (SubID == "0001") return true;
|
|
||||||
if (SubID == "0002") return true;
|
|
||||||
Console.WriteLine("'Not First','{0}',{1},'{2}',{3},{4},'{5}','{6}'",
|
|
||||||
SubID, child.type, child.roid, child.ParentID, child.ID, child.title, child.appid);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
private void ProcessMultiReturnValues(string str, int len)
|
private void ProcessMultiReturnValues(string str, int len)
|
||||||
{
|
{
|
||||||
string tstr = str.Substring(0, len);
|
string tstr = str.Substring(0, len);
|
||||||
|
@ -250,11 +250,9 @@ namespace XYPlots
|
|||||||
{
|
{
|
||||||
string rtnval;
|
string rtnval;
|
||||||
int ptr;
|
int ptr;
|
||||||
while (BuffPtr >= 0 && BuffPtr < Buff.Length && Buff[BuffPtr] != 0 && isWhiteSpace(Buff[BuffPtr]))
|
while (BuffPtr >= 0 && Buff[BuffPtr] != 0 && isWhiteSpace(Buff[BuffPtr])) BuffPtr++;
|
||||||
BuffPtr++;
|
|
||||||
ptr = BuffPtr;
|
ptr = BuffPtr;
|
||||||
while (BuffPtr >= 0 && BuffPtr < Buff.Length && Buff[BuffPtr] != 0 && !isWhiteSpace(Buff[BuffPtr]))
|
while (BuffPtr >= 0 && Buff[BuffPtr] != 0 && !isWhiteSpace(Buff[BuffPtr])) BuffPtr++;
|
||||||
BuffPtr++;
|
|
||||||
if (EndOfCommand()) EndFlag = 1;
|
if (EndOfCommand()) EndFlag = 1;
|
||||||
rtnval = Buff.Substring(ptr, BuffPtr - ptr);
|
rtnval = Buff.Substring(ptr, BuffPtr - ptr);
|
||||||
BuffPtr++;
|
BuffPtr++;
|
||||||
@ -263,16 +261,12 @@ namespace XYPlots
|
|||||||
private bool EndOfCommand()
|
private bool EndOfCommand()
|
||||||
{
|
{
|
||||||
int tmpPtr = BuffPtr;
|
int tmpPtr = BuffPtr;
|
||||||
while (tmpPtr < Buff.Length && !Buff[tmpPtr].Equals('\0') && Buff[tmpPtr].Equals(' '))
|
while (!Buff[tmpPtr].Equals('\0') && Buff[tmpPtr].Equals(' ')) tmpPtr++;
|
||||||
tmpPtr++;
|
|
||||||
if (tmpPtr >= Buff.Length)
|
|
||||||
return true;
|
|
||||||
if (!Buff[tmpPtr].Equals('\0') && !isWhiteSpace(Buff[tmpPtr]))
|
if (!Buff[tmpPtr].Equals('\0') && !isWhiteSpace(Buff[tmpPtr]))
|
||||||
return false;
|
return false;
|
||||||
if (Buff[tmpPtr] == '\r' || Buff[tmpPtr] == '\n' )
|
else if (Buff[tmpPtr] == '\r' || Buff[tmpPtr] == '\n' || Buff[tmpPtr] == '\0')
|
||||||
return true;
|
|
||||||
if(Buff[tmpPtr] == '\0')
|
|
||||||
return true;
|
return true;
|
||||||
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
private bool LoadBuff(string FileName)
|
private bool LoadBuff(string FileName)
|
||||||
@ -364,14 +358,7 @@ namespace XYPlots
|
|||||||
double x, y;
|
double x, y;
|
||||||
char[] sepchar = { ',' };
|
char[] sepchar = { ',' };
|
||||||
string[] xystr = NextPiece().Split(sepchar);
|
string[] xystr = NextPiece().Split(sepchar);
|
||||||
try
|
|
||||||
{
|
|
||||||
x = double.Parse(xystr[0]);
|
x = double.Parse(xystr[0]);
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
throw new Exception("Error Parsing XYPlot", ex);
|
|
||||||
}
|
|
||||||
y = double.Parse(xystr[1]);
|
y = double.Parse(xystr[1]);
|
||||||
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);
|
||||||
@ -440,18 +427,14 @@ namespace XYPlots
|
|||||||
if (Buff[ptr + 3] == ' ')
|
if (Buff[ptr + 3] == ' ')
|
||||||
Buff = Buff.Remove(ptr, 3);
|
Buff = Buff.Remove(ptr, 3);
|
||||||
}
|
}
|
||||||
//ptr = Buff.IndexOf(">>\r\n", Buff.Length - 5); // back up past >>\r\n
|
ptr = Buff.Length - 5; // back up past >>\r\n
|
||||||
//if (ptr > 0)
|
if (Buff.IndexOf(">>\r\n", ptr) > 0)
|
||||||
//{
|
{
|
||||||
// Buff = Buff.Remove(ptr, 2);
|
Buff = Buff.Remove(ptr, 2);
|
||||||
// Buff = Buff.Insert(ptr, " ");
|
Buff = Buff.Insert(ptr, " ");
|
||||||
// Buff += "\0x00";
|
}
|
||||||
//}
|
else if (Buff.EndsWith(">>")) // doesn't end with return chars...
|
||||||
//else
|
|
||||||
if (Buff.EndsWith(">>")) // doesn't end with return chars...
|
|
||||||
Buff = Buff.Substring(0, Buff.Length - 2) + " \r\n\0x00"; // needs to end with null
|
Buff = Buff.Substring(0, Buff.Length - 2) + " \r\n\0x00"; // needs to end with null
|
||||||
else
|
|
||||||
Console.WriteLine("Oopsie!");
|
|
||||||
}
|
}
|
||||||
private void CloseGraph()
|
private void CloseGraph()
|
||||||
{
|
{
|
||||||
@ -1812,16 +1795,9 @@ namespace XYPlots
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="PlotCommands">Plot Commands</param>
|
/// <param name="PlotCommands">Plot Commands</param>
|
||||||
public XYPlot(string PlotCommands)
|
public XYPlot(string PlotCommands)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
LoadBuffFromString(PlotCommands);
|
LoadBuffFromString(PlotCommands);
|
||||||
Setup();
|
Setup();
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine("{0}\r\n{1}", ex.Message, ex.StackTrace);
|
|
||||||
}
|
|
||||||
//#if DEBUG
|
//#if DEBUG
|
||||||
//VG.VG_Arc.iColor = 0;
|
//VG.VG_Arc.iColor = 0;
|
||||||
//#endif
|
//#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user