Example #1
0
        private void Initialize()
        {
            if (!Directory.Exists(Constants.SaveFolderPath))
            {
                Directory.CreateDirectory(Constants.SaveFolderPath);
            }
            if (!File.Exists(Constants.SaveFilePath))
            {
                SaveContext();
                return;
            }
            ChestContext loadContext = LoadContext();

            if (loadContext != null)
            {
                _users = loadContext._users;
            }
        }
Example #2
0
 public UserManager(ChestContext context)
 {
     _context             = context;
     User.UserHaveChange += (s, e) => SaveUser(s as User);
 }