public Line(String line) //text parsing constructor { original = line; keyword = getKey(line, keyWords); if (keyword.found()) { String right = line.Remove(0, keyword.pos + keyWords[keyword.index].Length); if (getValue(right, keyword.index)) //look to the right of the keyword for the value { state = lineState.DONE; } else //nothin' there { state = lineState.NOVALUE; } } else //no keyword { state = lineState.NOKEY; findValue(line); //try to detect a value } }
public Color toLineColor(lineState lineSt) { Color lineColor = new Color(); switch (lineSt) { case lineState.drag: lineColor = Color.yellow; break; case lineState.light: lineColor = Color.blue; break; case lineState.normal: lineColor = Color.black; break; case lineState.used: lineColor = Color.red; break; } return(lineColor); }
//text parsing constructor public Line(String line) { original = line; keyword = getKey(line, keyWords); if (keyword.found()) { String right = line.Remove(0, keyword.pos + keyWords[keyword.index].Length); if (getValue(right, keyword.index)) //look to the right of the keyword for the value { state = lineState.DONE; } else //nothin' there { state = lineState.NOVALUE; } } else //no keyword { state = lineState.NOKEY; findValue(line); //try to detect a value } }
public Union unionValue; //used & built externally by buildUnions(); #endregion Fields #region Constructors //empty line constructor (used by buildUnions() to construct union lines) public Line() { original = ""; state = lineState.DONE; keyword = new KeyWord(); }
public Union unionValue; //used & built externally by buildUnions(); public Line() //empty line constructor (used by buildUnions() to construct union lines) { original = ""; state = lineState.DONE; keyword = new KeyWord(); }