Exemplo n.º 1
0
 public void AddPoint(SignatureState state, int x, int y)
 {
     if (state == SignatureState.Start)
     {
         currentPath = new List<Point>();
     }
     if (x != 0 && y != 0)
     {
         currentPath.Add(new Point(x, y));
     }
     if (state == SignatureState.End)
     {
         if (currentPath != null)
         {
             _Paths.Add(currentPath);
         }
     }
     OnPointAdded(EventArgs.Empty);
 }
Exemplo n.º 2
0
        private static DWORD GetErrorFromSignatureState(SignatureState signatureState)
        {
            switch (signatureState)
            {
            case SignatureState.Unsigned:
                return(Win32Errors.TRUST_E_NOSIGNATURE);

            case SignatureState.SignedAndTrusted:
                return(Win32Errors.NO_ERROR);

            case SignatureState.SignedAndNotTrusted:
                return(Win32Errors.TRUST_E_EXPLICIT_DISTRUST);

            case SignatureState.Invalid:
                return(Win32Errors.TRUST_E_BAD_DIGEST);

            default:
                System.Diagnostics.Debug.Fail("Should not get here - could not map FileSignatureInfo.State");
                return(Win32Errors.TRUST_E_NOSIGNATURE);
            }
        }