Esempio n. 1
0
        private void LoadSettings()
        {
            try {
                Config.Load();
                nuDicomPort.Value   = Config.Instance.Port;
                nuMaxPduSize.Value  = Config.Instance.MaxPduSize;
                nuSocketTo.Value    = Config.Instance.SocketTimeout;
                nuDimseTo.Value     = Config.Instance.DimseTimeout;
                nuThrottle.Value    = Config.Instance.ThrottleSpeed;
                cbAutoStart.Checked = AppUtility.IsAutoStartup("DICOM Print SCP");
                RefreshPrinters();
            } catch (Exception ex) {
#if DEBUG
                Dicom.Debug.Log.Error("Error: " + ex.ToString());
#else
                Dicom.Debug.Log.Error("Error: " + ex.Message);
#endif
            }
        }
Esempio n. 2
0
        private void SaveSettings()
        {
            try {
                Config.Instance.Port          = (int)nuDicomPort.Value;
                Config.Instance.MaxPduSize    = (int)nuMaxPduSize.Value;
                Config.Instance.SocketTimeout = (int)nuSocketTo.Value;
                Config.Instance.DimseTimeout  = (int)nuDimseTo.Value;
                Config.Instance.ThrottleSpeed = (int)nuThrottle.Value;
                Config.Save();

                AppUtility.SetAutoStartup("DICOM Print SCP", cbAutoStart.Checked);
                RefreshPrinters();
            } catch (Exception ex) {
#if DEBUG
                Dicom.Debug.Log.Error("Error: " + ex.ToString());
#else
                Dicom.Debug.Log.Error("Error: " + ex.Message);
#endif
            }
        }