Ejemplo n.º 1
0
        protected override void OnClosed(EventArgs e)
        {
            client.Disconnect();

            base.OnClosed(e);
            //Application.Current.Shutdown();
        }
Ejemplo n.º 2
0
 private void exit_ButtonClick(object sender, EventArgs e)
 {
     try { client.Disconnect(); } catch { }
     //this.Close();
     //Environment.Exit(Environment.ExitCode);
     //InitializeComponent();
     Application.Exit();
     Environment.Exit(Environment.ExitCode);
     InitializeComponent();
 }