public void SetUserProfile(uint userId, byte[] profileBytes) { if (profileBytes == null) { throw new NullReferenceException(); } EmoEngine.errorHandler(EdkDll.EE_SetUserProfile(userId, profileBytes, (uint)profileBytes.Length)); }
public void SetUserProfile(uint userId, Profile profile) { if (profile == null) { throw new NullReferenceException(); } byte[] bytes = profile.GetBytes(); EmoEngine.errorHandler(EdkDll.EE_SetUserProfile(userId, bytes, (uint)bytes.Length)); }
public void LoadProfile(string profileName) { Profile = profileName; FileStream fileStream = new FileStream(GetProfilePath(profileName), FileMode.Open, FileAccess.Read); Byte[] buffer = new byte[fileStream.Length]; fileStream.Read(buffer, 0, (int)fileStream.Length); fileStream.Close(); EdkDll.EE_SetUserProfile(UserID, buffer, (uint)buffer.Length); emoEngine.LoadUserProfile(UserID, GetProfilePath(profileName)); LoadTrainedActions(); }