/// <summary>
        /// Called to handle the "add" action.
        /// </summary>
        /// <param name="addedItems"></param>
        /// <returns>True if items were added, false otherwise.</returns>
        protected override bool AddItems(out IList <ProcedureTypeSummary> addedItems)
        {
            addedItems = new List <ProcedureTypeSummary>();
            ProcedureTypeEditorComponent editor   = new ProcedureTypeEditorComponent();
            ApplicationComponentExitCode exitCode = ApplicationComponent.LaunchAsDialog(
                this.Host.DesktopWindow, editor, SR.TitleAddProcedureType);

            if (exitCode == ApplicationComponentExitCode.Accepted)
            {
                addedItems.Add(editor.ProcedureTypeSummary);
                return(true);
            }
            return(false);
        }
        /// <summary>
        /// Called to handle the "edit" action.
        /// </summary>
        /// <param name="items">A list of items to edit.</param>
        /// <param name="editedItems">The list of items that were edited.</param>
        /// <returns>True if items were edited, false otherwise.</returns>
        protected override bool EditItems(IList <ProcedureTypeSummary> items, out IList <ProcedureTypeSummary> editedItems)
        {
            editedItems = new List <ProcedureTypeSummary>();
            ProcedureTypeSummary item = CollectionUtils.FirstElement(items);

            ProcedureTypeEditorComponent editor   = new ProcedureTypeEditorComponent(item.ProcedureTypeRef);
            ApplicationComponentExitCode exitCode = ApplicationComponent.LaunchAsDialog(
                this.Host.DesktopWindow, editor, SR.TitleUpdateProcedureType + " - " + "(" + item.Id + ") " + item.Name);

            if (exitCode == ApplicationComponentExitCode.Accepted)
            {
                editedItems.Add(editor.ProcedureTypeSummary);
                return(true);
            }
            return(false);
        }