Exemplo n.º 1
0
        private static int CheckSettings()
        {
            var      Manager = new ToFolder(Path + @"\\Settings.json");
            Settings SettingsData;

            try
            {
                SettingsData = Manager.Deserialize <Settings>()[0];
            }
            catch (System.Exception)
            {
                SettingsData = new Settings
                {
                    NumberOfRealisation = 1
                };

                Manager.ClearFile();
                Manager.Serialize(SettingsData);
            }

            return(SettingsData.NumberOfRealisation);
        }
Exemplo n.º 2
0
 public void AddData(T data)
 {
     Manager.Serialize(data);
 }