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


C# System.Windows.Forms.FolderBrowserDialog.Dispose方法代码示例

本文整理汇总了C#中System.Windows.Forms.FolderBrowserDialog.Dispose方法的典型用法代码示例。如果您正苦于以下问题:C# System.Windows.Forms.FolderBrowserDialog.Dispose方法的具体用法?C# System.Windows.Forms.FolderBrowserDialog.Dispose怎么用?C# System.Windows.Forms.FolderBrowserDialog.Dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.FolderBrowserDialog的用法示例。


在下文中一共展示了System.Windows.Forms.FolderBrowserDialog.Dispose方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SelectScreenshotsFolder

        private void SelectScreenshotsFolder()
        {
            var selectFolder = new System.Windows.Forms.FolderBrowserDialog();
            try
            {
                if (String.IsNullOrEmpty(tboxScreenshotsPath.Text) == false)
                {
                    selectFolder.SelectedPath = tboxScreenshotsPath.Text;
                }
                //else selectFolder.RootFolder = Environment.SpecialFolder.Personal;

                if (selectFolder.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    tboxScreenshotsPath.Text = selectFolder.SelectedPath;
                }
            }
            finally { selectFolder.Dispose(); }
        }
开发者ID:midwan,项目名称:amigula,代码行数:18,代码来源:Preferences.xaml.cs

示例2: Add_Click

 private void Add_Click(object sender, RoutedEventArgs e)
 {
     var fb = new System.Windows.Forms.FolderBrowserDialog();
        fb.Description = "Find Manga Folder";
        fb.ShowNewFolderButton = false;
        if (fb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {
        if (!(bool)cbLook.IsChecked)
            if (!ImportList.Items.Contains(fb.SelectedPath))
                ImportList.Items.Add(fb.SelectedPath);
            else
                MessageBox.Show("This Item is Already in the Import List!", "Import Manga", MessageBoxButton.OK);
        else
        {
            foreach (var MangaDir in System.IO.Directory.EnumerateDirectories(fb.SelectedPath))
            {
                if (!ImportList.Items.Contains(MangaDir))
                    ImportList.Items.Add(MangaDir);
            }
        }
        }
        fb.Dispose();
 }
开发者ID:Mezzuchi,项目名称:MangaEplision,代码行数:23,代码来源:ImportWindow.xaml.cs

示例3: BrowseClicked

        /// <summary>
        /// Browse for output folder
        /// </summary>
        public void BrowseClicked()
        {
            // WPF doesn't have folder browser dialog, so we have to use the one from Windows.Forms
            System.Windows.Forms.FolderBrowserDialog dlg = new System.Windows.Forms.FolderBrowserDialog();
            dlg.SelectedPath = OutputPath;
            dlg.Description = "Select output directory.";
            dlg.ShowNewFolderButton = true;

            System.Windows.Forms.DialogResult result = dlg.ShowDialog();

            if(result == System.Windows.Forms.DialogResult.OK)
            {
                OutputPath = dlg.SelectedPath;
                InvokePropertyChanged("OutputPath");
            }

            dlg.Dispose();
        }
开发者ID:blacker-cz,项目名称:SimpleConverter,代码行数:21,代码来源:MainWindowViewModel.cs

示例4: Button_savefile_Click

        private void Button_savefile_Click(object sender, RoutedEventArgs e)
        {

            System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
            folderBrowserDialog1.Description = "フォルダを選択";
            folderBrowserDialog1.RootFolder = System.Environment.SpecialFolder.MyComputer;
            folderBrowserDialog1.SelectedPath = "C:\\Windows";
            folderBrowserDialog1.ShowNewFolderButton = true;
            if (folderBrowserDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.savefolder = folderBrowserDialog1.SelectedPath;
            }
            folderBrowserDialog1.Dispose();

        }
开发者ID:0tsukq,项目名称:LabLife,代码行数:15,代码来源:RecoderPanel.cs

示例5: Export

        private void Export()
        {
            SnapshotSettings snapSettings = SettingsManager.Instance.GetSnapshotSettings();
            System.Windows.Forms.FolderBrowserDialog browser = new System.Windows.Forms.FolderBrowserDialog();
            string subDirectory = snapSettings.GetCurrentSubdirectory();
            string parentDirectory = snapSettings.GetParentDirectory();

            //Initialise browser folder for easier navigation
            browser.SelectedPath = parentDirectory;

            browser.Description = "Choose directory for exporting";
            System.Windows.Forms.DialogResult result = browser.ShowDialog();

            if (result != System.Windows.Forms.DialogResult.OK)
                return;

            m_exporter = new ImageExporter();
            m_exporter.SetRootDirectory(browser.SelectedPath);
            if (!m_exporter.CanExport())
            {
                MessageBox.Show("There are no screenshots to export.\nExporting stopped.");
                return;
            }

            btnPlay.IsEnabled = false;
            btnStop.IsEnabled = false;
            preferencesMenu.IsEnabled = false;

            progressCircular.Visibility = Visibility.Visible;
            CancelLink.Visibility = System.Windows.Visibility.Visible;
            trayIcon.Icon = m_app_exporting;

            m_exporter_worker.DoWork += worker_DoWork;
            m_exporter_worker.RunWorkerCompleted += ExportWorker_RunWorkerCompleted;

            if (!m_exporter_worker.IsBusy)
                m_exporter_worker.RunWorkerAsync();

            browser.Dispose();
            btnExport.IsEnabled = false;
        }
开发者ID:khalidcawl,项目名称:Auto-snapshot,代码行数:41,代码来源:MainWindow.xaml.cs

示例6: browseLocalPath

 internal string browseLocalPath(string LocalPath)
 {
     var dialog = new System.Windows.Forms.FolderBrowserDialog();
     System.Windows.Forms.DialogResult result = dialog.ShowDialog();
     String path = dialog.SelectedPath;
     dialog.Dispose();
     return path;
 }
开发者ID:lelmarir,项目名称:CmisSync,代码行数:8,代码来源:Controller.cs


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