private void Execute(string filename) { log.InfoFormat("Importing search from '{0}'", filename); if (filename.EndsWith("." + BrandManager.ExtensionSearch) && MainWindowCommandInterface.DoSearch(filename)) { log.InfoFormat("Imported search from '{0}' successfully.", filename); } else { log.ErrorFormat("Failed to import search from '{0}'", filename); using (var dlg = new ErrorDialog(String.Format(Messages.UNABLE_TO_IMPORT_SEARCH, filename, BrandManager.ExtensionSearch))) { dlg.ShowDialog(Parent); } } }
private void Execute(string filename) { log.InfoFormat("Importing search from '{0}'", filename); if (MainWindowCommandInterface.DoSearch(filename)) { log.InfoFormat("Imported search from '{0}' successfully.", filename); } else { log.ErrorFormat("Failed to import search from '{0}'", filename); new ThreeButtonDialog( new ThreeButtonDialog.Details( SystemIcons.Error, String.Format(Messages.UNABLE_TO_IMPORT_SEARCH, filename), Messages.XENCENTER)).ShowDialog(Parent); } }