예제 #1
0
파일: Module.cs 프로젝트: sakpung/webstudy
        public static FindOtherPatientIdsOptions GetFindOtherPatientIdOptions(AdvancedSettings settings)
        {
            FindOtherPatientIdsOptions options = null;

            try
            {
                settings.RefreshSettings();
                options = settings.GetAddInCustomData <FindOtherPatientIdsOptions>(Source, OptionsName);
                if (options == null)
                {
                    options = new FindOtherPatientIdsOptions();
                }
            }
            catch (Exception e)
            {
                if (options == null)
                {
                    options = new FindOtherPatientIdsOptions();
                }

                Logger.Global.SystemMessage(LogType.Error, e.Message);
            }

            return(options);
        }
예제 #2
0
파일: Module.cs 프로젝트: sakpung/webstudy
        // Called when the external store addin is loaded by the PACSFramework
        public override void Load(string serviceDirectory, string displayName)
        {
            try
            {
                // Open 'advanced.config' which contains all settings for CSStorageServerManger.exe addins (including this addin)
                AdvancedSettings settings = AdvancedSettings.Open(serviceDirectory);

                ServiceDirectory = serviceDirectory;
                DisplayName      = displayName;

                if (ServiceLocator.IsRegistered <DicomServer>())
                {
                    _Server     = ServiceLocator.Retrieve <DicomServer>();
                    ServiceName = _Server.Name;
                }
                else
                {
                    _Server = new DicomServer(string.Empty);
                }

                if (!ServiceLocator.IsRegistered <SettingsChangedNotifier>())
                {
                    SettingsChangedNotifier configChangedNotifier = new SettingsChangedNotifier(settings);

                    configChangedNotifier.SettingsChanged += new EventHandler(configChangedNotifier_SettingsChanged);
                    configChangedNotifier.Enabled          = true;
                    ServiceLocator.Register <SettingsChangedNotifier>(configChangedNotifier);
                }
                else
                {
                    ServiceLocator.Retrieve <SettingsChangedNotifier>().SettingsChanged += new EventHandler(configChangedNotifier_SettingsChanged);
                }

                ConfigureUSAF(settings);
            }
            catch (Exception e)
            {
                if (_Options == null)
                {
                    _Options = new FindOtherPatientIdsOptions();
                }

                Logger.Global.SystemMessage(LogType.Error, e.Message);
            }
        }
예제 #3
0
파일: Module.cs 프로젝트: sakpung/webstudy
        private static void ConfigureUSAF(AdvancedSettings settings)
        {
            //string name = Assembly.GetExecutingAssembly().GetName().Name;

            _Options = GetFindOtherPatientIdOptions(settings);
        }