private void SetByteArrayExpOutput() { mState = ExpState.ByteArray; SetIntText(GetStartIntValueFromBuffer()); ByteArrayString = mCodePage.GetString(ExpHepler.ByteArrayBuffer, 0, mByteArrayBufferCount); ExpOutputChanged?.Invoke(this, mState); }
private void SetError(ExpType reason) { mState = ExpState.Error; UnsignedDecString = String.Empty; SingedDecString = String.Empty; HexString = String.Empty; BinString = String.Empty; ByteArrayString = reason.ToString(); ExpOutputChanged?.Invoke(this, mState); }
private void SetConstOutput(Int64 value) { mState = ExpState.Exp; SetIntText(value); unsafe { ByteArrayString = ByteArrayToHexString((Byte *)&value, 8); } ExpOutputChanged?.Invoke(this, mState); }
private void SetToEmpty() { if (mState != ExpState.Ignore) { mState = ExpState.Ignore; SingedDecString = String.Empty; UnsignedDecString = String.Empty; HexString = String.Empty; BinString = String.Empty; ByteArrayString = String.Empty; ExpOutputChanged?.Invoke(this, mState); } }
private void SetStringExpOutput() { mByteArrayBufferCount = mCodePage.GetBytes(this.Text, 2, this.Text.Length - 2, ExpHepler.ByteArrayBuffer, 0); if (mByteArrayBufferCount == 0) { SetToEmpty(); return; } SetIntText(GetStartIntValueFromBuffer()); unsafe { fixed(Byte *pByte = ExpHepler.ByteArrayBuffer) { ByteArrayString = ByteArrayToHexString(pByte, mByteArrayBufferCount); } } mState = ExpState.String; ExpOutputChanged?.Invoke(this, mState); }