public static BarcodeSettingDataDoc LoadObj() { BarcodeSettingDataDoc m_Doc = new BarcodeSettingDataDoc(); try { if (File.Exists(@".//Parameter/BarcodeData" + ".xml")) { using (FileStream file = File.OpenRead(@".//Parameter/BarcodeData" + ".xml")) { XmlSerializer xml = new XmlSerializer(typeof(BarcodeSettingDataDoc)); m_Doc = (BarcodeSettingDataDoc)xml.Deserialize(file); m_Doc.barcodeDataDic = m_Doc.barcodeData.ToDictionary(m => m.StationName); return(m_Doc); } } } catch (Exception) { throw; } return(m_Doc); }
public static void Load() { barcodeSettingDataDoc = BarcodeSettingDataDoc.LoadObj(); scannerDic = new Dictionary <string, Datalogic_Scanner>(); }