예제 #1
0
 public void Dispose()
 {
     NewInstanciaHijo.Eraser();
     ThreadHijo1.Abort();
     NewInstanciaHijo = null;
     //NewInstanciaHijo.NewConnection += NewInstanciaHijo1_NewConnection;
     //NewInstanciaHijo.NoConexion += NewInstanciaHijo1_NoConexion;
     InstanciaHijo.PasaRefHijo -= InstanciaHijo1_PasaRefHijo;
     InstanciaHijo              = null;
 }
예제 #2
0
        private void Initialize(CSearchUDP _externalSearcherUDP)
        {
            // VBConversions Note: Non-static class variable initialization is below.  Class variables cannot be initially assigned non-static values in C#.
            InstanciaHijo              = new CSearchConnectTCP_Base(this);
            InstanciaHijo.PasaRefHijo += InstanciaHijo1_PasaRefHijo;

            externalSearcherUDP = _externalSearcherUDP;

            ThreadHijo1      = new Thread(new System.Threading.ThreadStart(InstanciaHijo.CrearNuevoProceso));
            ThreadHijo1.Name = "SearchConnectTCP_Base";
            ThreadHijo1.SetApartmentState(ApartmentState.STA);
            ThreadHijo1.Start();
        }