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();
}

About TangoChen

Interest driven for tech & music.
This entry was posted in Tech and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.