Files
mono/mcs/class/System.Windows.Forms/Gtk/FolderBrowserDialog.cs
T
Joel Basson 802417f479 Thu Jan 16 19:20:00 GMT+2 2003 Joel Basson <[email protected]>
* Applied patch from Alberto Fernandez with the following changes...
	Finished ProgressBar (Events?)
	Finished HScrollBar VScrollBar and ScrollBar
	Finished FolderBrowserDialog
	Base ComboBox
	Added DrawMode.cs
	Added ComboBoxStyle.cs
	Added Appearance.cs
	Added CheckState.cs
	Added TabAlignment
	Added TabAppearance.cs
	Added TabDrawMode.cs
	Added TabSizeMode.cs
	Added Panel.cs
	Added TabPage.cs
	Added TabControl.cs
	Added Cursors.cs
	Added MessageBoxDefaultButton.cs
	Added MessageBoxIcon.cs
	Added MessageBoxOptions.cs
	Changes in MessageBoxButtons.cs (Added values)
	Changes in MessageBox (Completed all functions, added return values).
	"Finished" CheckBox.cs
	"Finished" ComboBox.cs
	"Finished" RadioButton
	"Finished" GroupBox
	"Finished" Panel
	Changes in Form to work with new RadioButton.
	Fix double Click reported on MenuItems.
	"Finished" Application

svn path=/trunk/mcs/; revision=22123
2004-01-15 17:19:30 +00:00

97 lines
2.1 KiB
C#

//
// System.Windows.Forms.FolderBrowserDialog.cs
//
// Author:
// Dennis Hayes ([email protected])
// Gtk.
// Alberto Fernandez ([email protected])
//
// (C) 2002 Ximian, Inc
//
using System.Runtime.Remoting;
using System.ComponentModel;
namespace System.Windows.Forms {
// <summary>
//
// </summary>
// Beta specs do not specify what class to defrive from.
// Using CommonDialog because
public class FolderBrowserDialog : CommonDialog {
string folder;
string description;
//
// --- Constructor
//
[MonoTODO]
public FolderBrowserDialog() {
description = String.Empty;
folder = (Dialog as Gtk.FileSelection).Filename;
}
[MonoTODO]
public override void Reset(){
//
}
[MonoTODO]
protected override bool RunDialog(IntPtr hWndOwner){
this.Dialog.Run();
folder = (Dialog as Gtk.FileSelection).Filename;
return dialogRetValue;
}
//
// --- Public Properties
//
public string Description {
get { return description; }
set { description = value; }
}
[MonoTODO]
public Environment.SpecialFolder RootFolder {
get { return Environment.SpecialFolder.Desktop; }
set {
if (! Enum.IsDefined (typeof (Environment.SpecialFolder), value)){
throw new InvalidEnumArgumentException();
}
}
}
public string SelectedPath {
get { return (this.Dialog as Gtk.FileSelection).Filename; }
set { (this.Dialog as Gtk.FileSelection).Filename = value; }
}
public bool ShowNewFolderButton {
get { return (this.Dialog as Gtk.FileSelection).FileopCDir.Visible; }
set { (this.Dialog as Gtk.FileSelection).FileopCDir.Visible = value;}
}
public override String ToString(){
return "System.Windows.Forms.FolderBrowserDialog";
}
[MonoTODO]
internal override Gtk.Dialog CreateDialog (){
Gtk.FileSelection f = new Gtk.FileSelection(String.Empty);
f.FileList.Sensitive = false;
f.FileopDelFile.Visible = false;
f.FileopRenFile.Visible = false;
f.SelectionEntry.Visible = false;
return f;
}
internal override void OnCancel (){
(Dialog as Gtk.FileSelection).Filename = folder;
}
}
}