private void WindowClosingExecute() { CloseCommand.Execute(this); if (SelectedBoard != null) { SelectedBoard.Dispose(); } }
private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { CloseCommandExecute(); if (SelectedBoard != null) { SelectedBoard.Dispose(); } else { TreehopperUSB.UsbExit(); } }