Пример #1
0
        public object Parse(string filepath)
        {
            GKG_PrinterData ret = new GKG_PrinterData();

            try
            {
                XElement GKG = XElement.Load(filepath);

                ret.ModelName = GKG.getValue("ModelName");
                ret.PrintTime = GKG.getValue("PrintTime");
                ret.SN        = GKG.getValue("SN");
                ret.Barcode   = GKG.getValue("Barcode");
                ret.Direction = GKG.getValue("Direction");
                ret.Thickness = GKG.getValue("Thickness");
                double thickness = 0.1;
                if (double.TryParse(GKG.getValue("StencilThickness"), out thickness) == true)
                {
                    StencilThickness = thickness;
                }
            }
            catch (Exception exception)
            {
                Log4.PrinterLogger.ErrorFormat("GKG Printer Data Pasre Exception: {0}", filepath);
                Log4.PrinterLogger.ErrorFormat("Message: {0}", exception.Message);
                return(null);
            }
            return(ret);
        }
Пример #2
0
        public bool IsBarcodeMatched(object fileobj, string barcode)
        {
            GKG_PrinterData data = fileobj as GKG_PrinterData;

            if (data.Barcode == barcode)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #3
0
        public override object Match(InspectedPanel currentPanel)
        {
            GKG_PrinterData tmpTool = new GKG_PrinterData();

            return((GKG_PrinterData)Match(currentPanel, (IParser)tmpTool, WatchedFolder));
        }