private void Button_Click_2(object sender, RoutedEventArgs e) { if (sndr != null) { sndr.Dispose(); sndr = null; } if (rcvr != null) { rcvr.Dispose(); rcvr = null; } Application.Current.Exit(); }
private async void Button_Click_3(object sender, RoutedEventArgs e) { Button butt = (Button)sender; if (butt != null) { string txt = (string)butt.Content; if (txt != "Stop Recv") { RecvTxt = txt; rcvr = new OBEX_Receiver(); await rcvr.Initialize(); BtnRecv.Content = "Stop Recv"; } else { rcvr.Dispose(); rcvr = null; BtnRecv.Content = "RecvTxt"; PostMessage("", "Stopped Listening"); } } }
private void Button_Click_1(object sender, RoutedEventArgs e) { rcvr.Dispose(); rcvr = null; BtnRecv.Content = "RecvTxt"; }