public StatusLine(StatusLineType type) { _belowLine = GameGraphics.GetTexture("red_bar"); if (type == StatusLineType.Green) _topLine = GameGraphics.GetTexture("green_bar"); else _topLine = GameGraphics.GetTexture("yellow_bar"); }
public PeachStatus Parse(Stream statusFileStream) { PeachStatus peachStatus = new PeachStatus(); using (StreamReader sr = new StreamReader(statusFileStream)) { while (!sr.EndOfStream) { string line = sr.ReadLine(); StatusLineType lineType = identifyLineType(line); UInt64 startingIteration; UInt64 finalIteration; UInt64 faultingIteration; switch (lineType) { case StatusLineType.FaultDetected: ParseFaultDetectedLine(line, out faultingIteration); peachStatus.LastCompletedIteration = faultingIteration; peachStatus.LastUpdate = ParseDate(line); break; case StatusLineType.IterationX: ParseIterationXLine(line, out startingIteration); peachStatus.LastCompletedIteration = startingIteration - 1; peachStatus.LastUpdate = ParseDate(line); break; case StatusLineType.IterationXofN: ParseIterationXofNLine(line, out startingIteration, out finalIteration); peachStatus.LastCompletedIteration = startingIteration - 1; peachStatus.FinalIteration = finalIteration; peachStatus.LastUpdate = ParseDate(line); break; case StatusLineType.TestFinished: peachStatus.Finished = true; return(peachStatus); default: break; } } } return(peachStatus); }