Esempio n. 1
0
		/// <summary>
		/// Request information of the profile
		/// </summary>
		/// <param name="profileName">profile's name</param>
		public void GetProfileInfo(string profileName)
		{
			if (IsSupportPenProfile())
			{
				if (string.IsNullOrEmpty(profileName))
					throw new ArgumentNullException("profileName");

				byte[] profileNameBytes = Encoding.UTF8.GetBytes(profileName);
				if (profileNameBytes.Length > PenProfile.LIMIT_BYTE_LENGTH_PROFILE_NAME)
					throw new ArgumentOutOfRangeException("profileName", $"profileName byte length must be {PenProfile.LIMIT_BYTE_LENGTH_PROFILE_NAME} or less");

				Request(() => mClientV1.ReqProfileInfo(profileNameBytes), () => mClientV2.ReqProfileInfo(profileNameBytes));
			}
			else
				throw new NotSupportedException($"CreateProfile is not supported at this pen firmware version");
		}