为monomac创建丰富的GUI [英] to create rich GUI for monomac

查看:113
本文介绍了为monomac创建丰富的GUI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实时问题是,我已经在Windows的C#中开发了一个应用程序,现在已经根据客户要求运行了,他还需要在Mac上运行它,因此我必须针对MAC OS对其进行改造,主要问题是我在项目中使用了Tab或List之类的控件,但在Widgets选项中找不到此类控件.

Real time problem is that ,I have developed an app in c# for windows ,now acc to clients requirement ,he need it to run on mac also ,so I have to reform it for MAC OS ,the main problem is coming that I have used the controls like Tab ,or List in my project ,but I cant find such controls in Widgets option.

推荐答案

一个可能的选择是使用System.Windows.Forms在Mac OS上.您甚至可以在Windows上开发代码.如果您在不使用任何特定于平台的功能或其他不兼容功能的情况下准确地进行了所有操作,那么即使在Mac上,该代码也可以在Mono上运行,而无需重新编译.

但是,从我所见,Mac OS X是最不适合外国人的平台.特别是,Mac UI具有不同的主菜单概念,这对于不同的应用程序是常见的,但是在切换应用程序时会得到不同的内容.如果您在Mac OS X上运行具有菜单的Forms应用程序,则不仅会看到常规的Windows风格的应用程序菜单,而且还会看到丑陋的Mac风格的主菜单",这与任何合理的设置都几乎没有关系.同样,在激活的应用程序和Z顺序顶部的应用程序之间也没有像Windows那样严格的协调.应该考虑到这一点.

我找到了主菜单的某种分辨率:您可以在mono上使用MonobjC(命令行将是"monobjc your_application.exe",而不是"monobjc your_application.exe",并且具有两个UI线程:一个正在运行System.Windows.Forms.Application ,另一个-仅显示Mac样式主菜单的Cocoa应用程序(以及可选的其他功能),您仍然可以使用MonobjC for Mono for Windows构建此类应用程序,但在Visual Studio下,它不允许您调试代码并使用Designer.可以通过MonoDevelop UI进行以下操作:
http://en.wikipedia.org/wiki/Monobjc [ http://en.wikipedia.org/wiki/Cocoa_(API) [ http://www.monobjc.net/ [ ^ ],
https://developer.apple.com/technologies/mac/cocoa.html [ ^ ],
http://en.wikipedia.org/wiki/MonoDevelop [ http://monodevelop.com/ [ ^ ].

请查看我过去的答案:
针对Windows和Mac部署的Mono建议 [ ^ ],
在Windows 7上为ipad/iphone编程 [ ^ ],
关于移动操作系统 [学习为Mac编写C# [需要制作可在其上运行的小型应用程序iphone-Ipad(也许是愚蠢的问题:() [如何制作Mac软件? ....... [
One possible option is to use System.Windows.Forms on Mac OS. You can even develop the code on Windows. If you do everything accurately, without using any platform-specific or other incompatible feature, this code will work on Mono without recompilation even on Mac.

However, from what I ever saw, Mac OS X is the platform most hostile to foreigners. In particular, Mac UI has a different concept of a main menu, which is common for different application but gets different content as you switch the application. If you run Forms application having a menu under Mac OS X, you see both regular Windows-style application menu, and also the ugly Mac-style "Main Menu" on top, pretty much irrelevant to anything reasonable. Also, there is no such a strict coordination between activated applications and applications on top in Z-order, like you have on Windows. This should be taken into account.

I found some resolution of the main menu: you can use MonobjC on top of mono (and the command line will be "monobjc your_application.exe", not ""monobjc your_application.exe" and have two UI threads: one running System.Windows.Forms.Application, another one — Cocoa Application showing just the Mac-style main menu (and, optionally, something else). You still can build such application using MonobjC for Mono for Windows, but under Visual Studio, it won''t allow you to debug code and use the Designer. This is possible using the MonoDevelop UI:
http://en.wikipedia.org/wiki/Monobjc[^],
http://en.wikipedia.org/wiki/Cocoa_(API)[^],
http://www.monobjc.net/[^],
https://developer.apple.com/technologies/mac/cocoa.html[^],
http://en.wikipedia.org/wiki/MonoDevelop[^],
http://monodevelop.com/[^].

Please see my past answers:
Mono Recommendations For Windows and Mac Deployment[^],
Programming for ipad/iphone on Windows 7[^],
about mobile operating systems[^],
Learning write c# for mac[^],
Need to make small apllication that runs on iphone-Ipad (maybe stupid question : ( )[^],
how can i make mac software?..............[^].

—SA


这篇关于为monomac创建丰富的GUI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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