private void OnBrowseButtonClick(object sender, EventArgs e) { var dialog = new MonoDevelop.Components.SelectFileDialog(GettextCatalog.GetString("Add Library")) { TransientFor = (Gtk.Window)Toplevel, CurrentFolder = DEFAULT_LIB_DIR, }; dialog.AddFilter(GettextCatalog.GetString("Static Library"), STATIC_LIB_FILTER); dialog.AddFilter(GettextCatalog.GetString("Dynamic Library"), DYNAMIC_LIB_FILTER); dialog.AddAllFilesFilter(); if (dialog.Run()) { libAddEntry.Text = dialog.SelectedFile; } }
protected override string ShowBrowseDialog(string name, string startIn) { var fd = new SelectFileDialog(name, Action); if (startIn != null) { fd.CurrentFolder = startIn; } fd.SetFilters(FileFilters); fd.TransientFor = GetTransientFor(); if (fd.Run()) { return(fd.SelectedFile); } return(null); }
protected override string ShowBrowseDialog(string name, string start_in) { SelectFileDialog fd = new SelectFileDialog(name); if (start_in != null) { fd.InitialFileName = start_in; } fd.SetFilters(filterSet); fd.TransientFor = GetTransientFor(); if (fd.Run()) { return(fd.SelectedFile); } else { return(null); } }
private void OnBrowseButtonClick (object sender, EventArgs e) { var dialog = new MonoDevelop.Components.SelectFileDialog (GettextCatalog.GetString ("Add Library")) { TransientFor = (Gtk.Window) Toplevel, CurrentFolder = DEFAULT_LIB_DIR, }; dialog.AddFilter (GettextCatalog.GetString ("Static Library"), STATIC_LIB_FILTER); dialog.AddFilter (GettextCatalog.GetString ("Dynamic Library"), DYNAMIC_LIB_FILTER); dialog.AddAllFilesFilter (); if (dialog.Run ()) libAddEntry.Text = dialog.SelectedFile; }