Ubuntu下Mono Develop的Message.Show();

不知道为什么..在Ubuntu下的Mono Develop不支持最基本需求的Message.Show()..
在网上找到这样的方法…算是解决了:

public static void ShowMsg(Gtk.Window parent_window, DialogFlags flags, MessageType msgtype, ButtonsType btntype, string msg)
{
MessageDialog md = new MessageDialog (parent_window, flags, msgtype, btntype, msg);
md.Run ();
md.Destroy();
}

public static void ShowMsg(string msg)
{
MessageDialog md = new MessageDialog (null, DialogFlags.Modal, MessageType.Other, ButtonsType.Ok, msg);
md.Run ();
md.Destroy();
}

Advertisements

About tangochen

A high school dropout...
This entry was posted in Programming and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s