Ejemplo n.º 1
0
        private void rSACryptoToolStripMenuItem_Click( object sender, EventArgs e )
        {
            Cancelled = false;

            RSACryptoWorkerInfo WInfo = new RSACryptoWorkerInfo();
            WInfo.ProcessName = "RSA Make Keys";
            RSACryptoBack = new RSACryptoBackground( MForm, WInfo );
            RSACryptoBack.RunWorkerAsync( WInfo );
        }
Ejemplo n.º 2
0
        internal void FreeEverything()
        {
            if( IsDisposed )
              return;

            if( RSACryptoBack != null )
              {
              if( RSACryptoBack.IsBusy )
            {
            if( !RSACryptoBack.CancellationPending )
              RSACryptoBack.CancelAsync();

            }

              RSACryptoBack.Dispose();
              RSACryptoBack = null;
              }

            if( QuadResCombinBackgArray != null )
              {
              try
              {
              for( int Count = 0; Count < QuadResCombinBackgArray.Length; Count++ )
            {
            if( QuadResCombinBackgArray[Count] == null )
              continue;

            if( QuadResCombinBackgArray[Count].IsBusy )
              {
              if( !QuadResCombinBackgArray[Count].CancellationPending )
            QuadResCombinBackgArray[Count].CancelAsync();

              }

            QuadResCombinBackgArray[Count].Dispose();
            QuadResCombinBackgArray[Count] = null;
            }
              }
              catch( Exception Except )
            {
            ShowStatus( "Exception for QuadResCombinBackgArray[] on closing:\r\n" + Except.Message );
            }
              }

            if( ExpVectorArray != null )
              {
              try
              {
              for( int Count = 0; Count < ExpVectorArray.Length; Count++ )
            {
            if( ExpVectorArray[Count] == null )
              continue;

            if( ExpVectorArray[Count].IsBusy )
              {
              if( !ExpVectorArray[Count].CancellationPending )
            ExpVectorArray[Count].CancelAsync();

              }

            ExpVectorArray[Count].Dispose();
            ExpVectorArray[Count] = null;
            }
              }
              catch( Exception Except )
            {
            ShowStatus( "Exception for ExpVectorArray[] on closing:\r\n" + Except.Message );
            }
              }
        }