public static void ShowResult(Graphics g, DataStruct.ProductIndex index, DataStruct.TestType ttype, DataStruct.TestResult result) { if (data.AllShapes == null) { return; } foreach (DataStruct.ShowShapes r in data.AllShapes) { if (data.GenShapeName(index, ttype) == r.shape.Name()) { if (result == DataStruct.TestResult.PASSED) { r.shape.Draw(g, DataStruct.myColor.PASS, DataStruct.myColor.PASS, r.solidFill, 1); } else if (result == DataStruct.TestResult.FAILED) { r.shape.Draw(g, DataStruct.myColor.FAIL, DataStruct.myColor.FAIL, r.solidFill, 1); } else if (result == DataStruct.TestResult.STDBY) { r.shape.Draw(g, DataStruct.myColor.STDBY, DataStruct.myColor.STDBY, r.solidFill, 1); } else { r.shape.Draw(g, DataStruct.myColor.STDBY2, DataStruct.myColor.STDBY2, r.solidFill, 1); } } } }
public static DataStruct.ShowShapes GetShape(DataStruct.ProductIndex index, DataStruct.TestType ttype) { if (data.AllShapes == null) { return(null); } foreach (DataStruct.ShowShapes r in data.AllShapes) { if (data.GenShapeName(index, ttype) == r.shape.Name()) { return(r); } } return(null); }
public static string GenShapeName(DataStruct.ProductIndex product, DataStruct.TestType ttype) { return(product.ToString() + ttype.ToString()); }