Ejemplo n.º 1
0
        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);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public static string GenShapeName(DataStruct.ProductIndex product, DataStruct.TestType ttype)
 {
     return(product.ToString() + ttype.ToString());
 }