Example #1
0
        public static void DeserializerProcess(ProcessHandler processhandler)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(List <MyProcess>));

            if (File.Exists(filepath))
            {
                using (FileStream fs = File.OpenRead(filepath))
                {
                    processhandler.allMyProcess = (List <MyProcess>)serializer.Deserialize(fs);
                }
            }
            else
            {
                throw new FileNotFoundException("This file does not exist");
            }
        }
Example #2
0
 public static void SaveData(ProcessHandler processhandler)
 {
     SerializeProcess(processhandler.allMyProcess);
 }