예제 #1
0
        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);
                }
            }
        }
예제 #2
0
        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);
            }
        }