13-11-23
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
Public Class Helpers
|
||||
Imports System.Drawing
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
|
||||
Public Class Helpers
|
||||
|
||||
''' <summary>
|
||||
''' Encodes the EnvelopeUUID and the ReceiverSignature into an EnvelopeKey
|
||||
@@ -8,7 +11,7 @@
|
||||
''' <returns>The EnvelopeKey</returns>
|
||||
Public Shared Function EncodeEnvelopeReceiverId(pEnvelopeUuid As String, pReceiverSignature As String) As String
|
||||
Dim oString = $"{pEnvelopeUuid}::{pReceiverSignature}"
|
||||
Dim oBytes = Text.Encoding.UTF8.GetBytes(oString)
|
||||
Dim oBytes = System.Text.Encoding.UTF8.GetBytes(oString)
|
||||
Dim oBase64String = Convert.ToBase64String(oBytes)
|
||||
|
||||
Return oBase64String
|
||||
@@ -21,7 +24,7 @@
|
||||
''' <returns>A tuple containing EnvelopeUUID and Receiver Signature</returns>
|
||||
Public Shared Function DecodeEnvelopeReceiverId(pEnvelopeReceiverId As String) As Tuple(Of String, String)
|
||||
Dim oBytes = Convert.FromBase64String(pEnvelopeReceiverId)
|
||||
Dim oString = Text.Encoding.UTF8.GetString(oBytes)
|
||||
Dim oString = System.Text.Encoding.UTF8.GetString(oBytes)
|
||||
Dim oSplit = oString.Split(New String() {"::"}, StringSplitOptions.None)
|
||||
|
||||
Return New Tuple(Of String, String)(oSplit(0), oSplit(1))
|
||||
@@ -33,4 +36,39 @@
|
||||
Return oURL
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function ColorTypeToColor(pColorType As ColorType) As Color
|
||||
Select Case pColorType
|
||||
Case ColorType.ReceiverColor1
|
||||
Return Color.Blue
|
||||
|
||||
Case ColorType.ReceiverColor2
|
||||
Return Color.Maroon
|
||||
|
||||
Case ColorType.ReceiverColor3
|
||||
Return Color.LightSeaGreen
|
||||
|
||||
Case ColorType.ReceiverColor4
|
||||
Return Color.LimeGreen
|
||||
|
||||
Case ColorType.ReceiverColor5
|
||||
Return Color.Magenta
|
||||
|
||||
Case ColorType.ReceiverColor6
|
||||
Return Color.MediumSpringGreen
|
||||
|
||||
Case ColorType.ReceiverColor7
|
||||
Return Color.OrangeRed
|
||||
|
||||
Case ColorType.ReceiverColor8
|
||||
Return Color.DodgerBlue
|
||||
|
||||
Case ColorType.ReceiverColor9
|
||||
Return Color.Purple
|
||||
|
||||
Case ColorType.ReceiverColor10
|
||||
Return Color.Gold
|
||||
|
||||
End Select
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user