public static DialogResult ShowDialog(CatalogSettings catalogSettings)
        {
            if (catalogSettings == null)
            {
                throw new ArgumentNullException("catalogSettings");
            }

            using (var form = new AdvancedHisCentralOptionsDialog(catalogSettings.Copy()))
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    catalogSettings.Copy(form._catalogSettings);
                }

                return(form.DialogResult);
            }
        }
Beispiel #2
0
        public static DialogResult ShowDialog(CatalogSettings catalogSettings,
                                              WebServicesSettings webServicesSettings,
                                              KeywordsSettings keywordsSettings)
        {
            if (catalogSettings == null)
            {
                throw new ArgumentNullException("catalogSettings");
            }
            if (webServicesSettings == null)
            {
                throw new ArgumentNullException("webServicesSettings");
            }
            if (keywordsSettings == null)
            {
                throw new ArgumentNullException("keywordsSettings");
            }

            using (var form = new SearchCatalogSettingsDialog(catalogSettings.Copy(),
                                                              webServicesSettings.Copy(),
                                                              keywordsSettings.Copy()))
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    if (catalogSettings.TypeOfCatalog != form._catalogSettings.TypeOfCatalog ||
                        catalogSettings.HISCentralUrl != form._catalogSettings.HISCentralUrl)
                    {
                        form.RefreshWebServices();
                        form.RefresKeywords();
                    }


                    catalogSettings.Copy(form._catalogSettings);
                    webServicesSettings.Copy(form._webServicesSettings);
                    keywordsSettings.Copy(form._keywordsSettings);
                }

                return(form.DialogResult);
            }
        }
Beispiel #3
0
        public static DialogResult ShowDialog(WebServicesSettings settings, CatalogSettings catalogSettings,
                                              KeywordsSettings keywordsSettings, IMetadataFetcherPlugin metadataFetcher, AppManager App, RectangleDrawing _rectangleDrawing)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }
            if (catalogSettings == null)
            {
                throw new ArgumentNullException("catalogSettings");
            }
            if (keywordsSettings == null)
            {
                throw new ArgumentNullException("keywordsSettings");
            }



            using (var form = new WebServicesDialog(settings.Copy(), catalogSettings.Copy(), keywordsSettings.Copy(), metadataFetcher, App, _rectangleDrawing))
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    if (catalogSettings.TypeOfCatalog != form._catalogSettings.TypeOfCatalog ||
                        catalogSettings.HISCentralUrl != form._catalogSettings.HISCentralUrl)
                    {
                        form.RefreshKeywords();
                    }

                    settings.Copy(form._settings);
                    catalogSettings.Copy(form._catalogSettings);
                    // keywordsSettings.Copy(form._keywordsSettings);
                }

                return(form.DialogResult);
            }
        }