Exemple #1
0
        /* Get File state from the file */
        private void ParseAppState()
        {
            try
            {
                using (FileStream stream = new FileStream(FileName, FileMode.OpenOrCreate))
                {
                    BinaryFormatter bin = new BinaryFormatter();

                    AppData = (WholeAppState)bin.Deserialize(stream);
                }
            }
            catch (Exception e)
            {
                log.Error("ParseAppState Error: " + e.Message);
            }
        }
Exemple #2
0
 public AppState()
 {
     AppData = new WholeAppState();
     log     = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
     this.ParseAppState();
 }