views:

66

answers:

2

I have a C# application. Currently all modules are written in .NET 2 and it uses some executables that have linux ports. So I was wondering what toolkit should I use on Windows and MacOS to compile it max easy on both? On Windows Some guys told me that on Windows I can use WinForms, but on Mac I must use MonoMac, but the transition is hard to make. I need something to be done easily.

+1  A: 

GTK# may be an option. I don't conciser it to be convenient though, but it is a matter of taste.

In my humble opinion, you should use different GUI toolkits for each platform ( this is usually a topic of holy wars, but i think, if your budget is enough for that, you really should consider doing this). I can name only a few completely cross-platform applications, which we written using only one GUI toolkit that really fit all systems altogether.

n535
GTK is ugly and almost unusable on Windows.
blez
It is not unusable at all, ugly however.
n535
GTK+ perfectly usable on Windows. It may look out of place however on Windows, but it's totally usable.
Zac Bowling
+1  A: 

Port it to Mono (NOT MonoMac) and it should work on both.

http://www.mono-project.com/Guide:_Porting_Winforms_Applications

You should be able to recompile and run for both platforms once you have completed the port.

vdoogs
You mean using the starndart Mono WinForms emulation? Many people told me it's not stable.
blez
It is not an emulation, and it is stable. It is also 100% (or nearly) complete. It is a problem with the software, which uses P/Invoke, not with the mono's implementation.
n535
You should look at this other article on StackOverflow if you are not yet convinced: http://stackoverflow.com/questions/18450/is-mono-ready-for-prime-time
vdoogs
So I can recompile my WinForms app freely if I don't use many pinvokes or check the platform before using them?
blez
If there are no PInvokes, you don't have to recompile it. You can use the Mono Migration Analyzer (MoMa) to find out, if there will be any problems running on a mono platform.
n535
Yes, please use the MoMa (http://mono-project.com/MoMA) and let us know if there are any showstopping issues that display from the report.
vdoogs
It uses WinPCAP and some PInvokes, everything else seems ok. I wonder will I be able to use tcpdump with Process's class and to monitor its output stream on Mac, to replace the WinPcap Stuff there?
blez
I found windump. I guess I'll use it instead of winpcap. Thanks all.
blez