Exemplo n.º 1
0
        private void AddModality()
        {
            SCPConfig cfg = _mgt.GetSCPConfig();

            if (cfg == null)
            {
                return;
            }

            FormModality frm = new FormModality(null);

            if (frm.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            Modality modality = frm.Modality;

            if (modality == null)
            {
                return;
            }

            cfg.KnownModalities.Add(modality);

            RefreshModalityList();
            SelectModality(modality);
            RefreshModalityButton();
        }
Exemplo n.º 2
0
        private void SaveSetting()
        {
            SCPConfig cfg = _mgt.GetSCPConfig();

            if (cfg == null)
            {
                return;
            }

            cfg.AETitle                = this.textBoxAETitle.Text;
            cfg.Port                   = (int)this.numericUpDownPort.Value;
            cfg.MaxPduLength           = (int)this.numericUpDownPDULength.Value;
            cfg.AssociationTimeOut     = (int)this.numericUpDownTimeOut.Value;
            cfg.EnableModalityChecking = this.radioButtonNotAllowAll.Checked;
            cfg.EnableAETitleChecking  = this.checkBoxEnableAETitleChecking.Checked;
        }
Exemplo n.º 3
0
        private void LoadSetting()
        {
            SCPConfig cfg = _mgt.GetSCPConfig();

            if (cfg == null)
            {
                return;
            }

            this.textBoxAETitle.Text                   = cfg.AETitle;
            this.numericUpDownPort.Value               = cfg.Port;
            this.numericUpDownPDULength.Value          = cfg.MaxPduLength;
            this.numericUpDownTimeOut.Value            = cfg.AssociationTimeOut;
            this.radioButtonNotAllowAll.Checked        = cfg.EnableModalityChecking;
            this.checkBoxEnableAETitleChecking.Checked = cfg.EnableAETitleChecking;

            RefreshModalityList();
            RefreshModalityButton();
        }
Exemplo n.º 4
0
        private void DeleteModality()
        {
            SCPConfig cfg = _mgt.GetSCPConfig();

            if (cfg == null)
            {
                return;
            }

            Modality modality = GetSelectedModality();

            if (modality == null)
            {
                return;
            }

            cfg.KnownModalities.Remove(modality);

            RefreshModalityList();
            RefreshModalityButton();
        }
Exemplo n.º 5
0
        private void RefreshModalityList()
        {
            SCPConfig cfg = _mgt.GetSCPConfig();

            if (cfg == null)
            {
                return;
            }

            int index = 1;

            this.listViewModality.Items.Clear();
            foreach (Modality mod in cfg.KnownModalities)
            {
                ListViewItem item = this.listViewModality.Items.Add((index++).ToString());
                item.SubItems.Add(mod.AETitle);
                item.SubItems.Add(mod.IPAddress);
                //item.SubItems.Add(mod.Port.ToString());
                item.SubItems.Add(mod.Description);
                item.Tag = mod;
            }
        }