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);
            }
        }
Example #2
0
        private void bntAddLocalDataSource_Click(object sender, EventArgs e)
        {
            var typeOfCatalog = CurrentTypeOfCatalog;

            switch (typeOfCatalog)
            {
            case TypeOfCatalog.HisCentral:
                if (AdvancedHisCentralOptionsDialog.ShowDialog(_catalogSettings) == DialogResult.OK)
                {
                    RefreshWebServices();
                }
                break;

            case TypeOfCatalog.LocalMetadataCache:
                if (_metadataFetcher != null)
                {
                    _metadataFetcher.AddServices();
                    RefreshWebServices();
                }
                break;
            }
        }