/// <summary>
        /// Adds the <see cref="NPCChatDialogBase"/> editor.
        /// </summary>
        /// <param name="chatManager">The <see cref="NPCChatManagerBase"/> instance.</param>
        /// <exception cref="ArgumentNullException"><paramref name="chatManager"/> is null.</exception>
        public static void AddNPCChatDialogEditor(NPCChatManagerBase chatManager)
        {
            if (chatManager == null)
                throw new ArgumentNullException("chatManager");

            if (_addedNPCChatManager)
                return;

            _addedNPCChatManager = true;

            NPCChatDialogUITypeEditorForm.NPCChatManager = chatManager;

            AddEditorsHelper(new EditorTypes(typeof(NPCChatDialogID), typeof(NPCChatDialogEditor)),
                new EditorTypes(typeof(NPCChatDialogID?), typeof(NPCChatDialogEditor)));
        }
Beispiel #2
0
        /// <summary>
        /// Adds the <see cref="NPCChatDialogBase"/> editor.
        /// </summary>
        /// <param name="chatManager">The <see cref="NPCChatManagerBase"/> instance.</param>
        /// <exception cref="ArgumentNullException"><paramref name="chatManager"/> is null.</exception>
        public static void AddNPCChatDialogEditor(NPCChatManagerBase chatManager)
        {
            if (chatManager == null)
            {
                throw new ArgumentNullException("chatManager");
            }

            if (_addedNPCChatManager)
            {
                return;
            }

            _addedNPCChatManager = true;

            NPCChatDialogUITypeEditorForm.NPCChatManager = chatManager;

            AddEditorsHelper(new EditorTypes(typeof(NPCChatDialogID), typeof(NPCChatDialogEditor)),
                             new EditorTypes(typeof(NPCChatDialogID?), typeof(NPCChatDialogEditor)));
        }