zoukankan      html  css  js  c++  java
  • ASP.NET] 选择文件夹的对话框

    using System.Windows.Forms.Design;
    using System.Windows.Forms;

    namespace TMS_WEB.Common
    {
      public class FolderDialog : FolderNameEditor
        {
            FolderNameEditor.FolderBrowser fDialog = new System.Windows.Forms.Design.FolderNameEditor.FolderBrowser();
            public FolderDialog()
            {
            }
            public DialogResult DisplayDialog()
            {
                return DisplayDialog("请选择一个文件夹");
            }
           
            public DialogResult DisplayDialog(string description)
            {
                fDialog.Description = description;
                return fDialog.ShowDialog();
            }
            public string Path
            {
                get
                {
                    return fDialog.DirectoryPath;
                }
            }

      ~FolderDialog()
            {
                fDialog.Dispose();
            }
        }
    }

    添加:System.Windows.Forms.Design;
    System.Windows.Forms;

    FolderDialog f = new FolderDialog();
       f.DisplayDialog();

  • 相关阅读:
    kubernetes yaml文件格式
    docker 镜像上传至私有仓库
    Docker Compose编排容器
    jenkins+gitlab+ansible+dockerfile+k8s自动发布代码
    kubernetes 命令行
    关于HDFS的读写流程
    vue中watched属性
    app中rem算法
    vue使用中的随笔
    react 表单获取多个input
  • 原文地址:https://www.cnblogs.com/zengwei/p/2126331.html
Copyright © 2011-2022 走看看