本文整理汇总了C#中System.Windows.Forms.FolderBrowserDialog.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# FolderBrowserDialog.Dispose方法的具体用法?C# FolderBrowserDialog.Dispose怎么用?C# FolderBrowserDialog.Dispose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.FolderBrowserDialog
的用法示例。
在下文中一共展示了FolderBrowserDialog.Dispose方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: button1_Click
private void button1_Click(object sender, EventArgs e)
{
if (subdivisions > 3)
{
if (MessageBox.Show("Warning: this will create " + Math.Pow(2,subdivisions * subdivisions) + " image icons. Proceed?", "Warning!", MessageBoxButtons.OKCancel) != DialogResult.OK)
{
return;
}
}
try
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "Select the directory that you wish to create your icons in.";
if (fbd.ShowDialog() == DialogResult.OK)
{
directory = fbd.SelectedPath;
}
fbd.Dispose();
}
catch (ArgumentException err)
{
MessageBox.Show("There was an error. " +
"Check the path.\r\nERROR:" + err.Message + " " + err.StackTrace);
}
CreateSilkScreenTiles();
}
示例2: BtnAdd_Click
private void BtnAdd_Click(object sender, EventArgs e)
{
var dialog =
new FolderBrowserDialog
{
Description = "Select a folder",
RootFolder = Environment.SpecialFolder.Desktop,
ShowNewFolderButton = false
};
if (dialog.ShowDialog(this) == DialogResult.OK)
{
var folder = dialog.SelectedPath;
// Check for duplicates
var bDuplicate = false;
foreach (ListViewItem item in m_lstFolders.Items)
{
if (string.Compare(folder, item.Text, StringComparison.OrdinalIgnoreCase) != 0)
continue;
bDuplicate = true;
break;
}
// Add item to ListView
if (!bDuplicate)
m_lstFolders.Items.Add(folder);
}
dialog.Dispose();
}
示例3: button2_Click
// Opens browse dialgoue box for output path.
private void button2_Click(object sender, RoutedEventArgs e)
{
var dialog = new System.Windows.Forms.FolderBrowserDialog();
System.Windows.Forms.DialogResult result = dialog.ShowDialog();
textBox3.Text = dialog.SelectedPath;
dialog.Dispose();
}
示例4: GetOutputDirectory
private void GetOutputDirectory()
{
System.Windows.Forms.FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "Select an output folder for the created classes.";
fbd.ShowNewFolderButton = true;
if (m_GuiDataLayerOutputDirectory.Text.Length == 0)
{
if (m_LastSelectedOutputdirectory.Length > 0)
{
fbd.SelectedPath = m_LastSelectedOutputdirectory;
}
}
else
{
fbd.SelectedPath = m_GuiDataLayerOutputDirectory.Text;
}
if (fbd.ShowDialog(this) == DialogResult.OK)
{
m_LastSelectedOutputdirectory = fbd.SelectedPath;
m_GuiDataLayerOutputDirectory.Text = m_LastSelectedOutputdirectory;
}
fbd.Dispose();
}
示例5: btnBrowseModFolder_Click
private void btnBrowseModFolder_Click(object sender, EventArgs e)
{
FolderBrowserDialog fldrBrowserdlg = new FolderBrowserDialog();
fldrBrowserdlg.ShowDialog();
txtModDirectory.Text = fldrBrowserdlg.SelectedPath;
fldrBrowserdlg.Dispose();
settings.SaveSetting("ModDirectory", txtModDirectory.Text);
}
示例6: buttonOpenDirectory_Click
private void buttonOpenDirectory_Click(object sender, EventArgs e)
{
var dialog = new FolderBrowserDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
textBoxSaveDirectory.Text = dialog.SelectedPath;
}
dialog.Dispose();
}
示例7: btnBrowseDocument_Click
private void btnBrowseDocument_Click(object sender, RoutedEventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
if (dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
string path = txtDirectory.Text = dialog.SelectedPath;
dialog.Dispose();
}
示例8: btnBrowse2_Click
private void btnBrowse2_Click(object sender, RoutedEventArgs e)
{
var d = new FolderBrowserDialog();
d.ShowNewFolderButton = true;
d.ShowDialog();
if(d.SelectedPath != null && !d.SelectedPath.Equals(""))
txtManipulatedPath.Text = System.IO.Path.GetFullPath(d.SelectedPath);
d.Dispose();
}
示例9: OnClickBrowse
private void OnClickBrowse(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.Description = "Select directory containing the map files";
dialog.ShowNewFolderButton = false;
if (dialog.ShowDialog() == DialogResult.OK)
textBox1.Text = dialog.SelectedPath;
dialog.Dispose();
}
示例10: cmdFolder_Click
private void cmdFolder_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "Select the Output Directory";
fbd.SelectedPath = ".";
fbd.ShowDialog(this);
txtPath.Text = fbd.SelectedPath;
fbd.Dispose();
}
示例11: btnBrowseLocation_Click
private void btnBrowseLocation_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
textLocation.Text = dialog.SelectedPath;
}
dialog.Dispose();
}
示例12: txtUrl_Click
private void txtUrl_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
{
txtUrl.Text = fbd.SelectedPath;
}
fbd.Dispose();
}
示例13: GetFolder
public static string GetFolder(string title)
{
string result = "";
FolderBrowserDialog d = new FolderBrowserDialog();
d.Description = title;
d.ShowNewFolderButton = true;
if (d.ShowDialog() == DialogResult.OK) result = d.SelectedPath;
d.Dispose(); d = null;
return result;
}
示例14: directoryBrowse_Click
private void directoryBrowse_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
{
explorerText.Text = fbd.SelectedPath;
fileBrowser.Url = new Uri(explorerText.Text);
}
fbd.Dispose();
}
示例15: button2_Click
private void button2_Click(object sender, EventArgs e)
{
FolderBrowserDialog dd = new FolderBrowserDialog();
dd.SelectedPath = this.LocalFilePath.Text.Trim();
if (dd.ShowDialog() == DialogResult.OK)
{
this.LocalFilePath.Text = dd.SelectedPath;
}
dd.Dispose();
}