Files
mono/mcs/class/System.Windows.Forms/Gtk/OpenFileDialog.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

70 lines
1.6 KiB
C#

//
// System.Windows.Forms.OpenFileDialog.cs
//
// Author:
// stubbed out by Paul Osman ([email protected])
// Dennis Hayes ([email protected])
// Aleksey Ryabchuk ( [email protected] )
// (C) 2002 Ximian, Inc
//
using System.ComponentModel;
using System.IO;
using System.Runtime.Remoting;
using System;
namespace System.Windows.Forms {
// <summary>
// Represents a common dialog box that displays the control
// that allows the user to open a file.
// </summary>
public sealed class OpenFileDialog : FileDialog {
bool showReadOnly;
bool readOnlyChecked;
public OpenFileDialog(){
Reset();
}
public bool Multiselect {
get { return (Dialog as Gtk.FileSelection).SelectMultiple; }
set { (Dialog as Gtk.FileSelection).SelectMultiple = value;}
}
[MonoTODO]
public bool ReadOnlyChecked {
get { return readOnlyChecked; }
set { readOnlyChecked = value; }
}
[MonoTODO]
public bool ShowReadOnly {
get { return showReadOnly; }
set { showReadOnly = value;}
}
[MonoTODO]
public Stream OpenFile() {
return new FileStream ( FileName, FileMode.Open, FileAccess.Read );
}
public override void Reset() {
base.Reset ( );
CheckFileExists = true;
Multiselect = false;
ShowReadOnly = false;
ReadOnlyChecked = false;
}
public override string ToString(){
return String.Format (
"System.Windows.Forms.OpenFileDialog: Title: {0}, FileName: {1}",
this.Title,
this.FileName);
}
[MonoTODO]
internal override Gtk.Dialog CreateDialog (){
return new Gtk.FileSelection (String.Empty);
}
}
}