简体   繁体   English

如何使用C#编程语言使用Visual Studio编写FireFox扩展?

[英]How to write FireFox extension with Visual Studio using C# programming language?

I was wondering if it's possible to write Firefox extension using .Net Framework? 我想知道是否可以使用.Net Framework编写Firefox扩展? Had anybody such experience in writing Firefox extensions using C# programming language? 有没有人使用C#编程语言编写Firefox扩展的经验? Any good sites or guidelines would be very helpful. 任何好的网站或指南都会非常有用。

FFPlugin http://img81.imageshack.us/img81/3049/ffplugin.jpg FFPlugin http://img81.imageshack.us/img81/3049/ffplugin.jpg

Here is an example of what I need. 这是我需要的一个例子。 Extension to enter phone number and to send SMS Message. 分机输入电话号码和发送短信。 I draw it in Paint, so I'm sorry for having no artistic touch. 我在Paint画画,所以我很抱歉没有艺术感。

Assuming you're asking about writing an extension (and not a plugin), the best place to get started is with the info at the Mozilla Dev Center . 假设您要求编写扩展(而不是插件),最好的入门地点是Mozilla开发中心的信息

Konamiman is correct: extensions are mostly XUL (an XML grammar) and Javascript, packaged into a ZIP file with the extension .xpi . Konamiman是正确的:扩展主要是XUL(XML语法)和Javascript,打包成扩展.xpi的ZIP文件。 The various links from the page I linked should answer basic questions, like the one you posted above: 我链接的页面中的各种链接应该回答基本问题,例如您在上面发布的问题:

https://developer.mozilla.org/en/Building_an_Extension https://developer.mozilla.org/en/Building_an_Extension

https://developer.mozilla.org/en/Extension_Frequently_Asked_Questions https://developer.mozilla.org/en/Extension_Frequently_Asked_Questions

Firefox extensions are written primarily in Javascript. Firefox扩展主要使用Javascript编写。 See here: http://www.rietta.com/firefox/Tutorial/backend.html . 见这里: http//www.rietta.com/firefox/Tutorial/backend.html So unless you can find a way to convert C# code/.NET Framework objects to Javascript, you are out of luck. 因此,除非您能找到将C#代码/ .NET Framework对象转换为Javascript的方法,否则您运气不佳。

I'm not sure how you'd do for C#, but you can use XPCOM to call native code libraries: that's how the Glasser extension, for instance, is able to use the Windows-specific Aero effects. 我不确定你是如何为C#做的,但是你可以使用XPCOM来调用本机代码库:例如,Glasser扩展就可以使用Windows特有的Aero效果了。

IBM hosts a very good XPCOM tutorial at DeveloperWorks . IBM在DeveloperWorks上主持了一个非常好的XPCOM教程。

正如其他受访者所观察到的,Firefox扩展主要是用Javascript编写的:但是你很幸运,因为Script#是一个免费工具,它使开发人员可以编写C#源代码并随后将其“编译”为Javascript。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Visual Studio以不同语言运行C#应用程序 - Run C# Application in Different Language using Visual Studio 使用Visual Studio扩展C#的IEnvironment.StackTrace - IEnvironment.StackTrace using Visual Studio extension c# 使用 Visual Studio 2010 在 C# 中编程热键 - Programming a Hotkey in C# with Visual Studio 2010 如何在Visual Studio中使用C#语言检查文件进程? - How to check file process in visual studio in c# language? Selenium webdriver - 如何连接到由 Visual Studio 使用 C# 打开的同一个 firefox 实例 - Selenium webdriver - How to connect to the same firefox instance open by Visual Studio using C# 如何在Visual Studio Code中以.csproj扩展名创建C#项目? - How to create C# project with .csproj extension in Visual Studio Code? 如何添加 C# 扩展以在 Visual Studio 中创建新项目 - How to add C# extension to create a new project in visual studio 有没有办法使用visual studio和c#编写iphone和android应用程序? - Is there a way to write iphone and android apps using visual studio and c#? 如何使用C#应用程序向Firefox扩展发送消息? - How to send a message to a Firefox extension using a C# Application? Visual Studio的格式文档–如何用C#编写 - Visual Studio's Format Document – How to Write it in C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM