Exemple #1
0
		private void AddNewServer()
		{
			ServerTree serverTree = this.Context.ServerTree;
			this.Context.UpdateType = (int)ServerUpdateType.Add;
			DicomServerEditComponent editor = new DicomServerEditComponent(serverTree);
			ApplicationComponentExitCode exitCode = ApplicationComponent.LaunchAsDialog(this.Context.DesktopWindow, editor, SR.TitleAddNewServer);
			this.Context.UpdateType = (int)ServerUpdateType.None; 
		}
		private void EditServer()
		{
			ServerTree serverTree = this.Context.ServerTree;
			this.Context.UpdateType = (int)ServerUpdateType.Edit;

			if (serverTree.CurrentNode.IsServer)
			{
				DicomServerEditComponent editor = new DicomServerEditComponent(serverTree);
				ApplicationComponentExitCode exitCode = ApplicationComponent.LaunchAsDialog(this.Context.DesktopWindow, editor, SR.TitleEditServer);
			}
			else
			{
				DicomServerGroupEditComponent editor = new DicomServerGroupEditComponent(serverTree, ServerUpdateType.Edit);
				ApplicationComponentExitCode exitCode = ApplicationComponent.LaunchAsDialog(this.Context.DesktopWindow, editor, SR.TitleEditServerGroup);
			}

			this.Context.UpdateType = (int)ServerUpdateType.None;
		}
        /// <summary>
        /// Constructor
        /// </summary>
        public DicomServerEditComponentControl(DicomServerEditComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;

            this.AcceptButton = _btnAccept;
            this.CancelButton = _btnCancel;

            AcceptClicked += new EventHandler(OnAcceptClicked);
            CancelClicked += new EventHandler(OnCancelClicked);

            this._serverName.DataBindings.Add("Text", _component, "ServerName", true, DataSourceUpdateMode.OnPropertyChanged);
            this._location.DataBindings.Add("Text", _component, "ServerLocation", true, DataSourceUpdateMode.OnPropertyChanged);
            this._ae.DataBindings.Add("Text", _component, "ServerAE", true, DataSourceUpdateMode.OnPropertyChanged);
            this._host.DataBindings.Add("Text", _component, "ServerHost", true, DataSourceUpdateMode.OnPropertyChanged);
            _btnAccept.DataBindings.Add("Enabled", _component, "AcceptEnabled", true, DataSourceUpdateMode.OnPropertyChanged);

            Binding portBinding = new Binding("Text", _component, "ServerPort", true, DataSourceUpdateMode.OnPropertyChanged);

            portBinding.Format += new ConvertEventHandler(OnPortBindingFormat);
            portBinding.Parse  += new ConvertEventHandler(OnPortBindingParse);
            _port.DataBindings.Add(portBinding);

            if (_component.ServerNameReadOnly)
            {
                _serverName.ReadOnly = true;
                _serverName.TabStop  = false;
            }

            this._isStreaming.DataBindings.Add("Checked", _component, "IsStreaming", true, DataSourceUpdateMode.OnPropertyChanged);
            this._headerServicePort.DataBindings.Add("Text", _component, "HeaderServicePort", true, DataSourceUpdateMode.OnPropertyChanged);
            this._wadoServicePort.DataBindings.Add("Text", _component, "WadoServicePort", true, DataSourceUpdateMode.OnPropertyChanged);
            this._headerServicePort.DataBindings.Add("Enabled", _component, "IsStreaming", true, DataSourceUpdateMode.OnPropertyChanged);
            this._wadoServicePort.DataBindings.Add("Enabled", _component, "IsStreaming", true, DataSourceUpdateMode.OnPropertyChanged);
            this._isPriorsServer.DataBindings.Add("Checked", _component, "IsPriorsServer", true, DataSourceUpdateMode.OnPropertyChanged);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public DicomServerEditComponentControl(DicomServerEditComponent component)
			: base(component)
		{
            InitializeComponent();

            _component = component;

			this.AcceptButton = _btnAccept;
			this.CancelButton = _btnCancel;

            AcceptClicked += new EventHandler(OnAcceptClicked);
            CancelClicked += new EventHandler(OnCancelClicked);

			this._serverName.DataBindings.Add("Text", _component, "ServerName", true, DataSourceUpdateMode.OnPropertyChanged);
			this._location.DataBindings.Add("Text", _component, "ServerLocation", true, DataSourceUpdateMode.OnPropertyChanged);
			this._ae.DataBindings.Add("Text", _component, "ServerAE", true, DataSourceUpdateMode.OnPropertyChanged);
			this._host.DataBindings.Add("Text", _component, "ServerHost", true, DataSourceUpdateMode.OnPropertyChanged);
			_btnAccept.DataBindings.Add("Enabled", _component, "AcceptEnabled", true, DataSourceUpdateMode.OnPropertyChanged);

			Binding portBinding = new Binding("Text", _component, "ServerPort", true, DataSourceUpdateMode.OnPropertyChanged);
			portBinding.Format += new ConvertEventHandler(OnPortBindingFormat);
			portBinding.Parse += new ConvertEventHandler(OnPortBindingParse);
        	_port.DataBindings.Add(portBinding);

            if (_component.ServerNameReadOnly)
            {
                _serverName.ReadOnly = true;
                _serverName.TabStop = false;
            }

        	this._isStreaming.DataBindings.Add("Checked", _component, "IsStreaming", true, DataSourceUpdateMode.OnPropertyChanged);
        	this._headerServicePort.DataBindings.Add("Text", _component, "HeaderServicePort", true, DataSourceUpdateMode.OnPropertyChanged);
			this._wadoServicePort.DataBindings.Add("Text", _component, "WadoServicePort", true, DataSourceUpdateMode.OnPropertyChanged);
			this._headerServicePort.DataBindings.Add("Enabled", _component, "IsStreaming", true, DataSourceUpdateMode.OnPropertyChanged);
			this._wadoServicePort.DataBindings.Add("Enabled", _component, "IsStreaming", true, DataSourceUpdateMode.OnPropertyChanged);
			this._isPriorsServer.DataBindings.Add("Checked", _component, "IsPriorsServer", true, DataSourceUpdateMode.OnPropertyChanged);
		}
Exemple #5
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DicomServerEditComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DicomServerEditComponent)component;
 }