Esempio n. 1
0
        public object Clone()
        {
            MyServer server = new MyServer();

            server._port    = _port;
            server._sAE     = _sAE;
            server._sIP     = _sIP;
            server._timeout = _timeout;
            server._useTls  = _useTls;
            return(server);
        }
Esempio n. 2
0
        public MyServerList()
        {
            MyServer myServer = new MyServer(defaultServerAE, defaultServerIP, defaultServerPort, defaultServerTimeout, defaultServerUseTls);

            serverArrayList = new ArrayList();

            currentServerAE = myServer._sAE;
            serverArrayList.Add(myServer);

            originalServerAE   = myServer._sAE;
            originalServerIP   = myServer._sIP;
            originalServerPort = myServer._port;
            preConfigured      = false;
        }
Esempio n. 3
0
        public void CopyGlobalSettings()
        {
            // Read the PACSConfigDemo settings
            string            demoName       = Path.GetFileName(Application.ExecutablePath);
            DicomDemoSettings globalSettings = DicomDemoSettingsManager.LoadSettings(demoName);

            if (globalSettings != null && globalSettings.IsPreconfigured && globalSettings.FirstRun)
            {
                globalSettings.FirstRun = false;

                // Servers
                DicomAE defaultStore = globalSettings.GetServer(globalSettings.DefaultStore);
                if (defaultStore != null)
                {
                    MyServer storeServer = new MyServer(defaultStore);
                    _settings.StoreServers.serverArrayList.Clear();
                    _settings.StoreServers.serverArrayList.Add(storeServer);
                }

                DicomAE defaultImageQuery = globalSettings.GetServer(globalSettings.DefaultImageQuery);
                if (defaultImageQuery != null)
                {
                    MyServer imageQueryServer = new MyServer(defaultImageQuery);
                    _settings.QuerySCPServers.serverArrayList.Clear();
                    _settings.QuerySCPServers.serverArrayList.Add(imageQueryServer);
                }

                DicomAE defaultMwlQuery = globalSettings.GetServer(globalSettings.DefaultMwlQuery);
                if (defaultMwlQuery != null)
                {
                    MyServer mwlQueryServer = new MyServer(defaultMwlQuery);
                    _settings.QueryMWLServers.serverArrayList.Clear();
                    _settings.QueryMWLServers.serverArrayList.Add(mwlQueryServer);
                }

                // Client
                _settings.clientAE   = globalSettings.ClientAe.AE;
                _settings.clientPort = globalSettings.ClientAe.Port;

                DicomDemoSettingsManager.SaveSettings(demoName, globalSettings);
                Save();
            }
        }