private void Optimize_Click(object sender, RoutedEventArgs e) { if (currentBSP != null) { Util.Optimizer.optimize(currentBSP); currentBSP.Modified(); } }