/// <summary>
        /// Insert PInvoke signature into code.
        /// </summary>
        void InsertButtonClick(object sender, EventArgs e)
        {
            Close();
            PInvokeCodeGenerator generator = new PInvokeCodeGenerator();

            string language = languageComboBox.Text;

            if (language == allLanguages)
            {
                language = GetSourceFileLanguage();
            }

            string signature = GetSelectedPInvokeSignature(language);

            if (signature.Length > 0)
            {
                TextEditorControl textEditor = GetTextEditorControl();
                if (textEditor != null)
                {
                    generator.Generate(textEditor.ActiveTextAreaControl.TextArea, signature);
                }
            }
            else
            {
                MessageService.ShowError(String.Format(StringParser.Parse("${res:ICSharpCode.PInvokeAddIn.InsertPInvokeSignaturesForm.NoSignatureFoundForLanguage}"), language));
            }
        }
		/// <summary>
		/// Insert PInvoke signature into code.
		/// </summary>
		void InsertButtonClick(object sender, EventArgs e)
		{
			Close();
			PInvokeCodeGenerator generator = new PInvokeCodeGenerator();
			
			string language = languageComboBox.Text;
			if (language == allLanguages) {
				language = GetSourceFileLanguage();
			}
			
			string signature = GetSelectedPInvokeSignature(language);
			
			if (signature.Length > 0) {
				TextEditorControl textEditor = GetTextEditorControl();
				if (textEditor != null) {
					generator.Generate(textEditor.ActiveTextAreaControl.TextArea, signature);
				}
			} else {
				MessageService.ShowError(String.Format(StringParser.Parse("${res:ICSharpCode.PInvokeAddIn.InsertPInvokeSignaturesForm.NoSignatureFoundForLanguage}"), language));
			}
		}