Exemple #1
0
        public void Create()
        {
            DicomEditorCreateToolComponent creator = new DicomEditorCreateToolComponent();
            ApplicationComponentExitCode   result  = ApplicationComponent.LaunchAsDialog(this.Context.DesktopWindow, creator, SR.TitleCreateTag);

            if (result == ApplicationComponentExitCode.Accepted)
            {
                try
                {
                    this.Context.DumpManagement.EditTag(creator.TagId, creator.Value, false);
                }
                catch (DicomException)
                {
                    this.Context.DesktopWindow.ShowMessageBox(SR.MessageTagCannotBeCreated, MessageBoxActions.Ok);
                    return;
                }

                this.Context.UpdateDisplay();
            }
        }
        public void Create()
        {
            var creator = new DicomEditorCreateToolComponent();
            var result  = ApplicationComponent.LaunchAsDialog(this.Context.DesktopWindow, creator, SR.TitleCreateTag);

            if (result != ApplicationComponentExitCode.Accepted)
            {
                return;
            }

            try
            {
                //We can only edit tags in the DicomTagDictionary, currently.
                Context.DumpManagement.EditTag(creator.TagId, creator.Value, false);
                Context.UpdateDisplay();
            }
            catch (DicomException)
            {
                Context.DesktopWindow.ShowMessageBox(SR.MessageTagCannotBeCreated, MessageBoxActions.Ok);
            }
        }