Example #1
0
		private void AddNewServerGroup()
		{
			ServerTree _serverTree = this.Context.ServerTree;
			this.Context.UpdateType = (int)ServerUpdateType.Add;
			DicomServerGroupEditComponent editor = new DicomServerGroupEditComponent(_serverTree, ServerUpdateType.Add);
			ApplicationComponentExitCode exitCode = ApplicationComponent.LaunchAsDialog(this.Context.DesktopWindow, editor, SR.TitleAddServerGroup);
			this.Context.UpdateType = (int)ServerUpdateType.None; 
		}
        /// <summary>
        /// Constructor
        /// </summary>
        public DicomServerGroupEditComponentControl(DicomServerGroupEditComponent component)
			: base(component)
		{
            InitializeComponent();

            _component = component;

			this.AcceptButton = _btnAccept;
			this.CancelButton = _btnCancel;
			
			AcceptClicked += new EventHandler(OnAcceptClicked);
            CancelClicked += new EventHandler(OnCancelClicked);

            this._serverGroupName.DataBindings.Add("Text", _component, "ServerGroupName", true, DataSourceUpdateMode.OnPropertyChanged);
            _btnAccept.DataBindings.Add("Enabled", _component, "AcceptEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
        }
Example #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public DicomServerGroupEditComponentControl(DicomServerGroupEditComponent component)
            : base(component)
        {
            InitializeComponent();

            _component = component;

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

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

            this._serverGroupName.DataBindings.Add("Text", _component, "ServerGroupName", true, DataSourceUpdateMode.OnPropertyChanged);
            _btnAccept.DataBindings.Add("Enabled", _component, "AcceptEnabled", true, DataSourceUpdateMode.OnPropertyChanged);
        }
Example #4
0
		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;
		}
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DicomServerGroupEditComponent)component;
 }
 public void SetComponent(IApplicationComponent component)
 {
     _component = (DicomServerGroupEditComponent)component;
 }