Пример #1
0
        public Options LoadOptions()
        {
            SerializeUtility <Options> utility = new SerializeUtility <Options>();
            Options options = null;

            try
            {
                if (File.Exists(SerializeUtility <Options> .GetFilePath(OptionsFilename)))
                {
                    options = utility.DeserializeData(OptionsFilename);
                }
            }
            finally
            {
                if (options == null)
                {
                    options = new Options();
                }
            }
            return(options);
        }
Пример #2
0
        public void SaveOptions(Options options)
        {
            SerializeUtility <Options> utility = new SerializeUtility <Options>();

            utility.SerializeData(options, OptionsFilename);
        }