|
گشتن
به دنبال كلاس پوشه ها
// created
on 04/11/2002 at 6:29 PM
// by Chris Andersen using SharpDevelop
http://www.icsharpcode.net
// This class give you the BrowseForfolder dialog without using
the API.
// Sample usage
/* BrowseForFolder test = new BrowseForFolder();
MessageBox.Show(test.ShowIt("bwah"));
*/
using System;
using System.Windows.Forms;
using System.Windows.Forms.Design;
public class BrowseForFolder : FolderNameEditor
{
// inherit the FolderNameEditor class
FolderNameEditor.FolderBrowser fBrowser;
public BrowseForFolder()
{
// contructor
// create an instance of FolderBrowser
fBrowser = new
System.Windows.Forms.Design.FolderNameEditor.FolderBrowser();
}
public string ShowIt(string textdescription)
{
// set the Description label
fBrowser.Description = textdescription;
fBrowser.ShowDialog(); // show the Windows
return fBrowser.DirectoryPath;// return whatever path choosen
}
~BrowseForFolder()
{
// destructor
fBrowser.Dispose();
}
}
نویسنده:کیوان
شجاعی
Email:kayvan.shojaie@gmail.com
|