• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FolderBrowserDialog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FolderBrowserDialog的典型用法代码示例。如果您正苦于以下问题:C# FolderBrowserDialog类的具体用法?C# FolderBrowserDialog怎么用?C# FolderBrowserDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FolderBrowserDialog类属于命名空间,在下文中一共展示了FolderBrowserDialog类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Button_Click_1

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog ofd = new FolderBrowserDialog();
            DialogResult result = ofd.ShowDialog();

            if (result == DialogResult.OK)
            {
                baseDirectoryName = ofd.SelectedPath;
                baseDirectoryLabel.Content = baseDirectoryName;
            }
        }
开发者ID:blargism,项目名称:DevServiceManager,代码行数:11,代码来源:AddPage.xaml.cs


示例2: GetManualInstallationPath

        private static bool GetManualInstallationPath(out string installationPath)
        {
            string gnomoriaPath = "";
            installationPath = null;
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
            }
            while (!File.Exists(gnomoriaPath))
            {
                using (FolderBrowserDialog fbd = new FolderBrowserDialog
                {
                    Description = "Gnomoria installation folder (containing Gnomoria.exe)",
                    ShowNewFolderButton = false
                })
                {
                    if (fbd.ShowDialog() != DialogResult.OK)
                    {
                        return false;
                    }

                    installationPath = Settings.Default.GnomoriaInstallationPath = fbd.SelectedPath;
                    gnomoriaPath = Path.Combine(installationPath, Reference.OriginalExecutable);
                }
                Settings.Default.Save();
            }
            return true;
        }
开发者ID:Gnomodia,项目名称:Gnomodia,代码行数:28,代码来源:Program.cs


示例3: browse_Click

        private void browse_Click(object sender, EventArgs e)
        {
            //FileDialogs do not work well on Vista
            bool useClassicFolderBrowser = IsVistaOrHigher();
            if (useClassicFolderBrowser)
            {
                using (FolderBrowserDialog browse = new FolderBrowserDialog())
                {
                    browse.Description = "Select CS-Script search directorty to add.";
                    browse.SelectedPath = textBox1.Text;

                    if (browse.ShowDialog() == DialogResult.OK)
                        textBox1.Text = browse.SelectedPath;
                }
            }
            else
            {
                using (FileDialogs.SelectFolderDialog dialog = new FileDialogs.SelectFolderDialog())
                {
                    if (DialogResult.OK == dialog.ShowDialog())
                    {
                        if (dialog.SelectedPath != "")
                            textBox1.Text = dialog.SelectedPath;
                    }
                }
            }
        }
开发者ID:Diullei,项目名称:Storm,代码行数:27,代码来源:searchDirs.cs


示例4: linkLabel1_LinkClicked_1

        private void linkLabel1_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e)
        {
            FolderBrowserDialog fd = new FolderBrowserDialog();
            fd.Description = "Select a `parent' folder of projects.\r\nRepository folders are located under the folder you select via this window.";
            fd.SelectedPath = parent.basepath;
            if (fd.ShowDialog() == DialogResult.OK)
            {
                /*GitJobParameters p = new GitJobParameters();
                p.dir = parent.curdir;
                p.toadd = parent.toadd;
                p.tochange = parent.tochange;
                p.toremove = parent.toremove;*/

                parent.jobman.ExecuteAllJobs();

                //parent.git.StartCommitChanges(p);
                parent.basepath = fd.SelectedPath;
                if (parent.basepath.Substring(parent.basepath.Length - 1) != "\\")
                    parent.basepath += "\\";
                parent.fsw.Path = parent.basepath;
                this.textBox1.Text = parent.basepath;

                parent.jobman = new JobManager(parent, parent.basepath);
                parent.RefreshList();
            }
        }
开发者ID:HToyokawa,项目名称:AutoGitClient,代码行数:26,代码来源:Form1.cs


示例5: cmdBrowse_Click

 private void cmdBrowse_Click( object sender, EventArgs e ) {
     FolderBrowserDialog dlg = new FolderBrowserDialog();
     DialogResult res = dlg.ShowDialog();
     if( res == System.Windows.Forms.DialogResult.OK ) {
         txtPath.Text = dlg.SelectedPath;
     }
 }
开发者ID:BenjaTheGamer,项目名称:depressurizer,代码行数:7,代码来源:DlgSteamPath.cs


示例6: MenuItemCallback

        /// <summary>
        /// This function is the callback used to execute a command when the a menu item is clicked.
        /// See the Initialize method to see how the menu item is associated to this function using
        /// the OleMenuCommandService service and the MenuCommand class.
        /// </summary>
        private void MenuItemCallback(object sender, EventArgs e)
        {
            //MessageBox.Show("Not finished yet.");
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            fbd.SelectedPath = "D:/";
            if (fbd.ShowDialog() == DialogResult.OK)
            {
                ImageCatchManager.Instance.SetDirPath(fbd.SelectedPath);
            }

            //// Show a Message Box to prove we were here
            //IVsUIShell uiShell = (IVsUIShell)GetService(typeof(SVsUIShell));
            //Guid clsid = Guid.Empty;
            //int result;
            //Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(uiShell.ShowMessageBox(
            //           0,
            //           ref clsid,
            //           "VSBackGroundPackage",
            //           string.Format(CultureInfo.CurrentCulture, "Inside {0}.MenuItemCallback()", this.ToString()),
            //           string.Empty,
            //           0,
            //           OLEMSGBUTTON.OLEMSGBUTTON_OK,
            //           OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_FIRST,
            //           OLEMSGICON.OLEMSGICON_INFO,
            //           0,        // false
            //           out result));
        }
开发者ID:niuboren,项目名称:TestVSBackGround,代码行数:32,代码来源:VSBackGroundPackagePackage.cs


示例7: OnClicked

    void OnClicked(object sender, ToolBarButtonClickEventArgs e)
    {
        FolderBrowserDialog dialog = new FolderBrowserDialog();

           if (dialog.ShowDialog(this) == DialogResult.OK) {
           statusbar.Text = dialog.SelectedPath;
           }
    }
开发者ID:sciruela,项目名称:MonoWinformsTutorial,代码行数:8,代码来源:Main.cs


示例8: ShowDialog

 internal DialogResult ShowDialog(IWin32Window owner)
 {
     FolderBrowserDialog dialog = new FolderBrowserDialog();
     DialogResult result = dialog.ShowDialog();
     Folder = dialog.SelectedPath;
     dialog.Dispose();
     return result;
 }
开发者ID:Knightshade,项目名称:4Hud,代码行数:8,代码来源:OpenFolderDialog.cs


示例9: button3_Click

 private void button3_Click(object sender, RoutedEventArgs e)
 {
     FolderBrowserDialog openFolderDlg = new FolderBrowserDialog();
     openFolderDlg.ShowDialog();
     if (openFolderDlg.SelectedPath != string.Empty)
         outputpath = openFolderDlg.SelectedPath;
     this.textBox2.Text = outputpath;
 }
开发者ID:silibili,项目名称:Clustering-Algorithm-in-csharp,代码行数:8,代码来源:MainWindow.xaml.cs


示例10: Execute

 public void Execute(CoroutineExecutionContext context)
 {
     var dialog = new FolderBrowserDialog();
     if(!String.IsNullOrEmpty(SelectedFolder))
         dialog.SelectedPath = SelectedFolder;
     var result = dialog.ShowDialog();
     SelectedFolder = dialog.SelectedPath;
     Completed(this, new ResultCompletionEventArgs { WasCancelled = result != DialogResult.OK });
 }
开发者ID:mcdudr01,项目名称:CECS550CShell,代码行数:9,代码来源:ShowFolderDialogResult.cs


示例11: btnBrowseForFolder_Click

 private void btnBrowseForFolder_Click(object sender, EventArgs e)
 {
     FolderBrowserDialog fbd = new FolderBrowserDialog();
     fbd.Description = "Select a folder for saving this file ";
     if (fbd.ShowDialog() == DialogResult.OK)
     {
         txtCurrentLocation.Text = fbd.SelectedPath;
     }
 }
开发者ID:Disclosure,项目名称:PasteAsFile,代码行数:9,代码来源:frmMain.cs


示例12: OnClickCDsBrowse

 private void OnClickCDsBrowse(object sender, EventArgs e)
 {
     var d = new FolderBrowserDialog();
     d.Description = "Select the folder that does (or will) contain your local copy of the CD images archive:";
     d.SelectedPath = CdImagesFolderBox.Text;
     d.ShowNewFolderButton = true;
     d.ShowDialog();
     CdImagesFolderBox.Text = d.SelectedPath;
 }
开发者ID:sillsdev,项目名称:masterinstaller,代码行数:9,代码来源:InitUtils.cs


示例13: buttonOpen_Click

 private void buttonOpen_Click(object sender, EventArgs e)
 {
     FolderBrowserDialog dialog = new FolderBrowserDialog();
     dialog.SelectedPath = textBoxWebClientPath.Text;
     if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         textBoxWebClientPath.Text = dialog.SelectedPath;
     }
 }
开发者ID:san90279,项目名称:UK_OAS,代码行数:9,代码来源:FormInitial.cs


示例14: btnEditFolder_ButtonClick

 private void btnEditFolder_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     FolderBrowserDialog folder = new FolderBrowserDialog();
     DialogResult result = folder.ShowDialog();
     if (result == DialogResult.OK)
     {
         btnEditFolder.Text = folder.SelectedPath;
     }
 }
开发者ID:USAID-DELIVER-PROJECT,项目名称:ethiopia-hcmis-facility,代码行数:9,代码来源:AutoBackup.cs


示例15: OnClickMasterInstallerBrowse

 private void OnClickMasterInstallerBrowse(object sender, EventArgs e)
 {
     var d = new FolderBrowserDialog();
     d.Description = "Select the folder that contains your local copy of the Master Installer source files:";
     d.SelectedPath = MasterInstallerFolderBox.Text;
     d.ShowNewFolderButton = false;
     d.ShowDialog();
     MasterInstallerFolderBox.Text = d.SelectedPath;
 }
开发者ID:sillsdev,项目名称:masterinstaller,代码行数:9,代码来源:InitUtils.cs


示例16: btnBrowseDir_Click

 private void btnBrowseDir_Click(object sender, RoutedEventArgs e)
 {
     FolderBrowserDialog dialog = new FolderBrowserDialog {
         Description = "Select the directory containing PCSX2"
     };
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         this.tbPcsx2Dir.Text = dialog.SelectedPath;
     }
 }
开发者ID:CyberFoxHax,项目名称:PCSXBonus,代码行数:10,代码来源:wndSettings.cs


示例17: BT_FileOutput_Copy_Click

        private void BT_FileOutput_Copy_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog FBD = new FolderBrowserDialog();

            if (FBD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ViewLeader.EncipheringView.FileOutput_Path = FBD.SelectedPath;
            }

        }
开发者ID:RyuAsuka,项目名称:SecretSound,代码行数:10,代码来源:DWindow.xaml.cs


示例18: conversion_folder_btn_Click

        private void conversion_folder_btn_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new FolderBrowserDialog();
            var result = dialog.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                pipeline.ConvertedFilesFolder = dialog.SelectedPath;
            }

        }
开发者ID:Narekmarg,项目名称:File-Downloader,代码行数:10,代码来源:MainWindow.xaml.cs


示例19: button_find_Click

 private void button_find_Click(object sender, EventArgs e)
 {
     FolderBrowserDialog folderDialog = new FolderBrowserDialog();
     if (folderDialog.ShowDialog() == DialogResult.OK)
     {
         path = folderDialog.SelectedPath;
         textbox_src.Text = path;
         fw.Path = path;
         rkey.SetValue("path", path);
     }
 }
开发者ID:jeebro,项目名称:notificator,代码行数:11,代码来源:Form1.cs


示例20: ChooseImagesDir_Click

        private void ChooseImagesDir_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new FolderBrowserDialog();
            if (dlg.ShowDialog() == DialogResult.Cancel) return;

            App.Settings.ImagesDirectory = dlg.SelectedPath;
            App.Settings.Save();

            var world = (WorldModel)DataContext;
            world.ImagesDirectory = dlg.SelectedPath;
        }
开发者ID:igorshapiro,项目名称:Framer,代码行数:11,代码来源:DesignControl.xaml.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# FolderType类代码示例发布时间:2022-05-24
下一篇:
C# Folder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap