Mono C#FileChooserButton设置为仅显示.tar.gz文件

时间:2012-07-26 17:53:48

标签: c# linux gtk monodevelop gtk#

如何在MonoDevelop C#GTK +上创建仅显示FileChooserButton个文件的.tar.gz

1 个答案:

答案 0 :(得分:2)

public MainWindow () : base(Gtk.WindowType.Toplevel)
{
    Build ();

    FileFilter filter  = new FileFilter();
    filter.Name = "tar.gz files";
    filter.AddPattern("*.tar.gz");
    filechooserbutton1.AddFilter(filter);
}