Ejemplo n.º 1
0
        public static DialogResult ShowDialog(KeywordsSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            using (var form = new KeywordsDialog(settings.Copy()))
            {
                if (SearchSettings.AndSearch == false)
                {
                    form.keywordsUserControl1.radioButton1.Checked = true;
                }
                else if (SearchSettings.AndSearch == true)
                {
                    form.keywordsUserControl1.radioButton2.Checked = true;
                }

                if (form.ShowDialog() == DialogResult.OK)
                {
                    settings.SelectedKeywords = form.keywordsUserControl1.GetSelectedKeywords();

                    if (form.keywordsUserControl1.radioButton1.Checked == true)
                    {
                        SearchSettings.AndSearch = false;
                    }
                    else if (form.keywordsUserControl1.radioButton2.Checked == true)
                    {
                        SearchSettings.AndSearch = true;
                    }
                }

                return(form.DialogResult);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
        public static DialogResult ShowDialog(KeywordsSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }

            using (var form = new KeywordsDialog(settings.Copy()))
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    settings.SelectedKeywords = form.keywordsUserControl1.GetSelectedKeywords();
                }

                return(form.DialogResult);
            }
        }
Ejemplo n.º 4
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);
            }
        }