當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。