예제 #1
0
        public object Parse(string filepath)
        {
            Htgd_PrinterData ret = new Htgd_PrinterData();

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

                ret.ModelName = Htgd.getValue("ModelName");
                ret.PrintTime = Htgd.getValue("PrintTime");
                ret.SN        = Htgd.getValue("SN");
                ret.Barcode   = Htgd.getValue("Barcode");
                ret.Direction = Htgd.getValue("Direction");
                ret.Thickness = Htgd.getValue("Thickness");
                double thickness = 0.1;
                if (double.TryParse(Htgd.getValue("StencilThickness"), out thickness) == true)
                {
                    StencilThickness = thickness;
                }
            }
            catch (Exception exception)
            {
                Log4.PrinterLogger.ErrorFormat("Htgd 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)
        {
            Htgd_PrinterData data = fileobj as Htgd_PrinterData;

            if (data.Barcode == barcode)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #3
0
        public override object Match(InspectedPanel currentPanel)
        {
            Htgd_PrinterData tmpTool = new Htgd_PrinterData();

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