当前位置: 首页>>代码示例>>C#>>正文


C# FolderBrowserDialog.Dispose方法代码示例

本文整理汇总了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();
        }
开发者ID:RAStemen,项目名称:MosaicMason,代码行数:27,代码来源:SilkScreenTileMakerForm.cs

示例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();
        }
开发者ID:arsaccol,项目名称:SLED,代码行数:30,代码来源:SledMultiFolderSelectionForm.cs

示例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();
 }
开发者ID:ducksFANjason,项目名称:IMDIM,代码行数:8,代码来源:MainWindow.xaml.cs

示例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();
        }
开发者ID:ksumrall,项目名称:SumDataTierGenerator,代码行数:26,代码来源:MiscSettings.cs

示例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);
 }
开发者ID:Rhayle,项目名称:KSPMMTool,代码行数:8,代码来源:frmPreferences.cs

示例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();
 }
开发者ID:jvanrhyn,项目名称:Ember,代码行数:9,代码来源:PreferencesForm.cs

示例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();
        }
开发者ID:khalidcawl,项目名称:Auto-snapshot,代码行数:9,代码来源:PreferencesWindow.xaml.cs

示例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();
 }
开发者ID:sivarajankumar,项目名称:dentalsmile,代码行数:9,代码来源:SettingsForm.xaml.cs

示例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();
 }
开发者ID:polserver,项目名称:poltools,代码行数:9,代码来源:MapReplace.cs

示例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();
 }
开发者ID:SarathR,项目名称:MS-Sql-Server-Script-generator,代码行数:9,代码来源:ScriptGen.cs

示例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();
 }
开发者ID:fendy3002,项目名称:MapperGenerator,代码行数:9,代码来源:FormAppSetting.cs

示例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();
 }
开发者ID:Nacro8,项目名称:xiaobier,代码行数:9,代码来源:Form1.cs

示例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;
 }
开发者ID:faze79,项目名称:rmo-rugbymania,代码行数:10,代码来源:MyBox.cs

示例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();
 }
开发者ID:mintwans,项目名称:cpsc483,代码行数:10,代码来源:reLiveMain.cs

示例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();
 }
开发者ID:appliedi,项目名称:MerchantTribe,代码行数:10,代码来源:CreateSiteForm.cs


注:本文中的System.Windows.Forms.FolderBrowserDialog.Dispose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。