GTK# 和 Windows 窗体有什么区别? [英] What is the difference between GTK# and Windows Forms?

查看:36
本文介绍了GTK# 和 Windows 窗体有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GTK# 和 windows 窗体有什么区别?它们完全不同吗?

What is the difference between GTK# and windows forms? Are they totally different?

谢谢

推荐答案

Gtk#:

GTK# 是 Gtk+ 工具包的 .NET 绑定.该工具包是用 C 语言编写的,以提高速度和兼容性,而 GTK# 绑定提供了一个易于使用的面向对象的 API 以供托管使用.Mono 项目正在积极开发它,并且有各种可用的实际应用程序使用它(Banshee , F-Spot, BeagleMonoDevelop).

GTK# is a .NET binding for the Gtk+ toolkit. The toolkit is written in C for speed and compatibility, while the GTK# binding provides an easy to use, object oriented API for managed use. It is in active development by the Mono project, and there are various real-world applications available that use it (Banshee , F-Spot, Beagle, MonoDevelop).

一般来说,GTK# 应用程序是使用 MonoDevelop 编写的,它提供了一个用于创建 GTK# 的可视化设计器图形用户界面.

In general, GTK# applications are written using MonoDevelop, which provides a visual designer for creating GTK# GUIs.

平台:Unix、Windows、OSX

Platforms: Unix, Windows, OSX

优点:

  • 对可访问性的良好支持通过其 Gtk+ 遗产.
  • 非常适合处理的布局引擎国际化环境,以及适应字体大小而不会中断应用程序.
  • 应用程序与 Gnome 集成桌面.
  • Gtk+ 开发人员熟悉 API.
  • 大型 Gtk+ 社区.
  • 有一个 Win32 端口可用,带有Windows XP 上的原生外观.
  • API 在这方面相当稳定点,句法糖正在添加以改进它.
  • Unicode 支持非常出色.

缺点:

  • Gtk+ 应用程序运行起来像外国的MacOS X 上的应用程序.
  • 文档不完整.

Windows.Forms:

Windows.Forms 是 Microsoft 开发的对 Win32 工具包的绑定.作为数百万 Windows 开发人员(尤其是内部企业应用程序)使用的流行工具包,Mono 项目决定生成一个兼容的实现(Winforms),以允许这些开发人员轻松地将他们的应用程序移植到 Linux 和其他 Mono 平台上运行.

Windows.Forms is a binding developed by Microsoft to the Win32 toolkit. As a popular toolkit used by millions of Windows developers (especially for internal enterprise applications), the Mono project decided to produce a compatible implementation (Winforms) to allow these developers to easily port their applications to run on Linux and other Mono platforms.

.Net 实现是与 Win32 工具包的绑定,而 Mono 实现是用 C# 编写的,以允许它在多个平台上工作.大多数 Windows.Forms API 都可以在 Mono 上运行,但是一些应用程序(尤其是第三方控件)偶尔会绕过 API 并直接 P/Invoke 到 Win32 API.这些调用可能必须更改才能在 Mono 上运行.

Whereas the .Net implementation is a binding to the Win32 toolkit, the Mono implementation is written in C# to allow it to work on multiple platforms. Most of the Windows.Forms API will work on Mono, however some applications (and especially third party controls) occasionally bypass the API and P/Invoke straight to the Win32 API. These calls will likely have to changed to work on Mono.

通常,Winforms 应用程序是使用 Microsoft 的 Visual Studio 或 SharpDevelop 编写的,它们都提供用于创建 Winforms GUI 的可视化设计器.

In general, Winforms applications are written using Microsoft's Visual Studio or SharpDevelop, which both provide a visual designer for creating Winforms GUIs.

平台:Windows、Unix、OSX

Platforms: Windows, Unix, OSX

优点:

  • 存在大量文档(书籍、教程、在线文档).
  • 由活跃的开发者组成的大型社区.
  • 移植现有的最简单的方法Windows.Forms 应用程序.

缺点:

  • 国际化可能很棘手具有固定布局.
  • 在非 Windows 平台上看起来很陌生.
  • 调用 Win32 API 的代码不是便携.

来源:选择合适的工具包

这篇关于GTK# 和 Windows 窗体有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆