【发布时间】:2014-10-21 18:36:48
【问题描述】:
我在 Ubuntu 上使用 MonoDevelop 编写了一个小型 C# 应用程序。我使用 Gtk#-library 来呈现图形用户界面控件。但是,当我在 Windows 上使用 mono 执行应用程序时,应用程序总是在 FileChooserDialog 的构造中挂起,这意味着用户界面线程不再响应。
FileChooserDialog OpenFileDialog = new FileChooserDialog ("Open file...", this, FileChooserAction.Open);
这行代码放在 OnMenuItemActivatedEvent 中,在 Ubuntu 上运行良好。谁能建议为什么它不能在 Windows 上运行?
【问题讨论】:
-
您的
Main方法是否标有[STAThread]? -
还没有。但是当我添加它时,我遇到了同样的行为。
标签: c# mono gtk# filechooser