private void mnuExit_Click(object sender, EventArgs e) { try { m_Symbologies.EnableAll(); m_BCreader.ScannerEnable = true; m_BCreader.Dispose(); m_Reader.Close(); HighBeep.Dispose(); LowBeep.Dispose(); this.Dispose(); } catch { } Application.Exit(); }
void ReleaseDesignerOutlets() { if (Bdelete != null) { Bdelete.Dispose(); Bdelete = null; } if (Bsave != null) { Bsave.Dispose(); Bsave = null; } if (Tfour != null) { Tfour.Dispose(); Tfour = null; } if (Tidentifier != null) { Tidentifier.Dispose(); Tidentifier = null; } if (Tone != null) { Tone.Dispose(); Tone = null; } if (Ttext != null) { Ttext.Dispose(); Ttext = null; } if (Tthree != null) { Tthree.Dispose(); Tthree = null; } if (Ttwo != null) { Ttwo.Dispose(); Ttwo = null; } }
public static void Close() { if (!Closed) { connector.InformationEvent -= Connector_InformationEvent; connector.CloseEvent -= Connector_CloseEvent; connector.Stop(); Player.Stop(); Player.Dispose(); Tone.Dispose(); microphone.Close(); connector.Close(); Noise.Dispose(); foreach (var elem in remoteCollection) { elem.Value.Dispose(); } Closed = true; } }