示例#1
0
        public static bool SavePosition(SavedPosition position, string fullPath)
        {
            if (position == null)
            {
                return(false);
            }

            var json = JsonService.SerializeToJson(position);

            return(SaveFile(fullPath, json));
        }
示例#2
0
 public static SavedPosition LoadPosition(string fullPath)
 {
     return(File.Exists(fullPath)
         ? JsonService.DeserializeToString(LoadJson(fullPath))
         : null);
 }