protected override void OnStop() { if (SB != null) { SB.StopAllEventWatcher(); } }
private void SB_Controller_FormClosing(object sender, FormClosingEventArgs e) { if (sb != null) { sb.sbArriveEvent -= sb_sbArriveEvent; sb.StopAllEventWatcher(); } }
private void button1_Click(object sender, RoutedEventArgs e) { Application.Current.Shutdown(); if (SB != null) { SB.StopAllEventWatcher(false); } }