private void ChangeAppPoolMode(object sender, RoutedEventArgs e) { try { if (this.CheckSqlServer()) { MainWindowHelper.ChangeAppPoolMode((System.Windows.Controls.MenuItem)sender); } } catch (Exception ex) { this.HandleError(ex); } }