C#语言实例源码系列-实现本地磁盘目录

news2024/11/17 11:33:21
专栏分享
  • 点击跳转=>Unity3D特效百例
  • 点击跳转=>案例项目实战源码
  • 点击跳转=>游戏脚本-辅助自动化
  • 点击跳转=>Android控件全解手册

👉关于作者

众所周知,人生是一个漫长的流程,不断克服困难,不断反思前进的过程。在这个过程中会产生很多对于人生的质疑和思考,于是我决定将自己的思考,经验和故事全部分享出来,以此寻找共鸣 !!!
专注于Android/Unity和各种游戏开发技巧,以及各种资源分享(网站、工具、素材、源码、游戏等)
有什么需要欢迎私我,交流群让学习不再孤单

在这里插入图片描述

👉实践过程

😜效果

在这里插入图片描述

😜代码

class BaseClass
{
    public class Win32
    {
        public const uint SHGFI_ICON = 0x100;
        public const uint SHGFI_LARGEICON = 0x0; // 'Large icon
        public const uint SHGFI_SMALLICON = 0x1; // 'Small icon
        [DllImport("shell32.dll", EntryPoint = "ExtractIcon")]
        public static extern int ExtractIcon(IntPtr hInst, string lpFileName, int nIndex);
        [DllImport("shell32.dll", EntryPoint = "SHGetFileInfo")]
        public static extern IntPtr SHGetFileInfo(string pszPath, uint dwFileAttribute, ref SHFILEINFO psfi, uint cbSizeFileInfo, uint Flags);
        [DllImport("User32.dll", EntryPoint = "DestroyIcon")]
        public static extern int DestroyIcon(IntPtr hIcon);
        [DllImport("shell32.dll")]
        public static extern uint ExtractIconEx(string lpszFile, int nIconIndex, int[] phiconLarge, int[] phiconSmall, uint nIcons);
        [StructLayout(LayoutKind.Sequential)]
        public struct SHFILEINFO
        {
            public IntPtr hIcon;
            public IntPtr iIcon;
            public uint dwAttributes;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
            public string szDisplayName;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
            public string szTypeName;
        }
    }

    #region  文件夹的复制
    /// <summary>
    /// 文件夹的复制
    /// </summary>
    /// <param Ddir="string">要复制的目的路径</param>
    /// <param Sdir="string">要复制的原路径</param>
    public void Files_Copy(string Ddir, string Sdir)
    {
        DirectoryInfo dir = new DirectoryInfo(Sdir);
        string SbuDir = Ddir;
        try
        {
            if (!dir.Exists)//判断所指的文件或文件夹是否存在
            {
                return;
            }
            DirectoryInfo dirD = dir as DirectoryInfo;//如果给定参数不是文件夹则退出
            string UpDir = UpAndDown_Dir(Ddir);
            if (dirD == null)//判断文件夹是否为空
            {
                Directory.CreateDirectory(UpDir + "\\" + dirD.Name);//如果为空,创建文件夹并退出
                return;
            }
            else
            {
                Directory.CreateDirectory(UpDir + "\\" + dirD.Name);
            }
            SbuDir = UpDir + "\\" + dirD.Name + "\\";
            FileSystemInfo[] files = dirD.GetFileSystemInfos();//获取文件夹中所有文件和文件夹
            //对单个FileSystemInfo进行判断,如果是文件夹则进行递归操作
            foreach (FileSystemInfo FSys in files)
            {
                FileInfo file = FSys as FileInfo;
                if (file != null)//如果是文件的话,进行文件的复制操作
                {
                    FileInfo SFInfo = new FileInfo(file.DirectoryName + "\\" + file.Name);//获取文件所在的原始路径
                    SFInfo.CopyTo(SbuDir + "\\" + file.Name, true);//将文件复制到指定的路径中
                }
                else
                {
                    string pp = FSys.Name;//获取当前搜索到的文件夹名称
                    Files_Copy(SbuDir + FSys.ToString(), Sdir + "\\" + FSys.ToString());//如果是文件,则进行递归调用
                }
            }
        }
        catch
        {
            MessageBox.Show("文件制复失败。");
            return;
        }
    }
    #endregion

    #region  返回上一级目录
    /// <summary>
    /// 返回上一级目录
    /// </summary>
    /// <param dir="string">目录</param>
    /// <returns>返回String对象</returns>
    public string UpAndDown_Dir(string dir)
    {
        string Change_dir = "";
        Change_dir = Directory.GetParent(dir).FullName;
        return Change_dir;
    }
    #endregion

    public void listFolders(ToolStripComboBox tscb)//获取本地磁盘目录
    {
        string[] logicdrives = System.IO.Directory.GetLogicalDrives();
        for (int i = 0; i < logicdrives.Length; i++)
        {
            tscb.Items.Add(logicdrives[i]);
            tscb.SelectedIndex = 0;
        }
    }
    int k = 0;
    public void GOBack(ListView lv,ImageList il,string path)
    {

        if (AllPath.Length != 3)
        {
            string NewPath = AllPath.Remove(AllPath.LastIndexOf("\\")).Remove(AllPath.Remove(AllPath.LastIndexOf("\\")).LastIndexOf("\\")) + "\\";
            lv.Items.Clear();
            GetListViewItem(NewPath, il, lv);
            AllPath = NewPath;
        }
        else
        {
            if (k == 0)
            {
                lv.Items.Clear();
                GetListViewItem(path, il, lv);
                k++;
            }
        }
    }
    public string Mpath()
    {
        string path=AllPath;
        return path;
    }
    public static string AllPath = "";//---------
    public void GetPath(string path, ImageList imglist, ListView lv,int ppath)//-------
    {
            string pp = "";
            string uu = "";
            if (ppath == 0)
            {
                if (AllPath != path)
                {
                    lv.Items.Clear();
                    AllPath = path;
                    GetListViewItem(AllPath, imglist, lv);
                }
            }
            else
            {
                uu = AllPath + path;
                if (Directory.Exists(uu))
                {
                    AllPath = AllPath + path + "\\";
                    pp = AllPath.Substring(0, AllPath.Length - 1);
                    lv.Items.Clear();
                    GetListViewItem(pp, imglist, lv);
                }
                else
                {
                    uu = AllPath + path;
                    System.Diagnostics.Process.Start(uu);
                }
            }
    }
    public void GetListViewItem(string path, ImageList imglist, ListView lv)//获取指定路径下所有文件及其图标
    {
        lv.Items.Clear();
        Win32.SHFILEINFO shfi = new Win32.SHFILEINFO();
        try
        {
            string[] dirs = Directory.GetDirectories(path);
            string[] files = Directory.GetFiles(path);
            for (int i = 0; i < dirs.Length; i++)
            {
                string[] info = new string[4];
                DirectoryInfo dir = new DirectoryInfo(dirs[i]);
                if (dir.Name == "RECYCLER" || dir.Name == "RECYCLED" || dir.Name == "Recycled" || dir.Name == "System Volume Information")
                { }
                else
                {
                    //获得图标
                    Win32.SHGetFileInfo(dirs[i],
                                        (uint)0x80,
                                        ref shfi,
                                        (uint)System.Runtime.InteropServices.Marshal.SizeOf(shfi),
                                        (uint)(0x100 | 0x400)); //取得Icon和TypeName
                    //添加图标
                    imglist.Images.Add(dir.Name, (Icon)Icon.FromHandle(shfi.hIcon).Clone());
                    info[0] = dir.Name;
                    info[1] = "";
                    info[2] = "文件夹";
                    info[3] = dir.LastWriteTime.ToString();
                    ListViewItem item = new ListViewItem(info, dir.Name);
                    lv.Items.Add(item);
                    //销毁图标
                    Win32.DestroyIcon(shfi.hIcon);
                }
            }
            for (int i = 0; i < files.Length; i++)
            {
                string[] info = new string[4];
                FileInfo fi = new FileInfo(files[i]);
                string Filetype = fi.Name.Substring(fi.Name.LastIndexOf(".")+1,fi.Name.Length- fi.Name.LastIndexOf(".") -1);
                string newtype=Filetype.ToLower();
                if (newtype == "sys" || newtype == "ini" || newtype == "bin" || newtype == "log" || newtype == "com" || newtype == "bat" || newtype == "db")
                { }
                else
                {


                    //获得图标
                    Win32.SHGetFileInfo(files[i],
                                        (uint)0x80,
                                        ref shfi,
                                        (uint)System.Runtime.InteropServices.Marshal.SizeOf(shfi),
                                        (uint)(0x100 | 0x400)); //取得Icon和TypeName
                    //添加图标
                    imglist.Images.Add(fi.Name, (Icon)Icon.FromHandle(shfi.hIcon).Clone());
                    info[0] = fi.Name;
                    info[1] = fi.Length.ToString();
                    info[2] = fi.Extension.ToString();
                    info[3] = fi.LastWriteTime.ToString();
                    ListViewItem item = new ListViewItem(info, fi.Name);
                    lv.Items.Add(item);
                    //销毁图标
                    Win32.DestroyIcon(shfi.hIcon);
                }
            }
        }
        catch
        {
        }
    }
}
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }
    BaseClass bc = new BaseClass();
    private void Form1_Load(object sender, EventArgs e)
    {
        bc.listFolders(toolStripComboBox1);
    }

    private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
        bc.GetPath(toolStripComboBox1.Text, imageList1, listView1, 0);
    }

    private void listView1_DoubleClick(object sender, EventArgs e)
    {
        try
        {
            string pp = listView1.SelectedItems[0].Text;
            bc.GetPath(pp.Trim(), imageList1, listView1, 1);
        }
        catch
        {
            MessageBox.Show("无法打开此文件", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
    }

    private void toolStripButton2_Click(object sender, EventArgs e)
    {
        bc.GOBack(listView1, imageList1, toolStripComboBox1.Text);
    }
    private int T = 0;
    private string path;
    private static string MyPath;
    private static ArrayList al = new ArrayList();
    private void 剪切ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        if (listView1.SelectedItems.Count != 0)
        {
            al.Clear();
            for (int i = 0; i < listView1.SelectedItems.Count; i++)
            {
                al.Add(bc.Mpath() + "\\" + listView1.SelectedItems[i].Text);
            }
            T = 0;
        }
    }

    private void 复制ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        try
        {
            al.Clear();
            path = bc.Mpath() + "\\" + listView1.SelectedItems[0].Text;
            for (int i = 0; i < listView1.SelectedItems.Count; i++)
            {
                al.Add(bc.Mpath() + "\\" + listView1.SelectedItems[i].Text);
            }
            System.Collections.Specialized.StringCollection files = new System.Collections.Specialized.StringCollection();
            files.Add(path);
            Clipboard.SetFileDropList(files);
            MyPath = path;
            T = 1;
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
    }

    private void 粘贴ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        if (T == 0)
        {
            try
            {
                for (int i = 0; i < al.Count; i++)
                {
                    string name1 = al[i].ToString().Substring(al[i].ToString().LastIndexOf("\\") + 1, al[i].ToString().Length - al[i].ToString().LastIndexOf("\\") - 1);
                    string paths = bc.Mpath() + "\\" + name1;
                    if (File.Exists(al[i].ToString()))
                    {
                        if (al[i].ToString() != paths)
                        {
                            File.Move(al[i].ToString(), paths);
                        }
                    }
                    if (Directory.Exists(al[i].ToString()))
                    {
                        bc.Files_Copy(paths, al[i].ToString());
                        DirectoryInfo di = new DirectoryInfo(al[i].ToString());
                        di.Delete(true);
                    }
                }
                listView1.Items.Clear();
                bc.GetListViewItem(bc.Mpath(), imageList1, listView1);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        else
        {
            try
            {
                for (int i = 0; i < al.Count; i++)
                {
                    string name1 = al[i].ToString().Substring(al[i].ToString().LastIndexOf("\\") + 1, al[i].ToString().Length - al[i].ToString().LastIndexOf("\\") - 1);
                    string paths = bc.Mpath() + "\\" + name1;
                    if (File.Exists(al[i].ToString()))
                    {
                        if (al[i].ToString() != paths)
                        {
                            File.Copy(al[i].ToString(), paths, false);
                        }
                    }
                    if (Directory.Exists(al[i].ToString()))
                    {
                        bc.Files_Copy(paths, al[i].ToString());
                    }
                }
                listView1.Items.Clear();
                bc.GetListViewItem(bc.Mpath(), imageList1, listView1);
            }
            catch { }
        }
    }

    private void 全选ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        for (int i = 0; i < listView1.Items.Count; i++)
        {
            listView1.Items[i].Selected = true;
        }
    }

    private void 打开ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        try
        {
            string pp = listView1.SelectedItems[0].Text;
            bc.GetPath(pp.Trim(), imageList1, listView1, 1);
        }
        catch
        {
            MessageBox.Show("无法打开此文件", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
    }

    private void 重命名ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        if (listView1.SelectedItems.Count != 0)
        {
            listView1.SelectedItems[0].BeginEdit();
        }
    }

    private void 删除ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        try
        {
            if (listView1.SelectedItems.Count == 0)
            {
                MessageBox.Show("请选择文件", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                for (int i = 0; i < listView1.SelectedItems.Count; i++)
                {
                    string path = bc.Mpath() + "\\" + listView1.SelectedItems[i].Text;
                    if (File.GetAttributes(path).CompareTo(FileAttributes.Directory) == 0)
                    {
                        DirectoryInfo dinfo = new DirectoryInfo(path);
                        dinfo.Delete(true);
                    }
                    else
                    {
                        string path1 = bc.Mpath() + "\\" + listView1.SelectedItems[i].Text;
                        FileInfo finfo = new FileInfo(path1);
                        finfo.Delete();
                    }
                }
                listView1.Items.Clear();
                bc.GetListViewItem(bc.Mpath(), imageList1, listView1);
            }
        }
        catch
        { }
    }

    private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
    {
        Application.Exit();
    }

    private void listView1_AfterLabelEdit(object sender, LabelEditEventArgs e)
    {
        try
        {
            string MyPath = bc.Mpath() + "\\" + listView1.SelectedItems[0].Text;
            string newFilename = e.Label;
            string path2 = bc.Mpath() + "\\" + newFilename;
            if (File.Exists(MyPath))
            {
                if (MyPath != path2)
                {
                    File.Move(MyPath, path2);
                }
            }
            if (Directory.Exists(MyPath))
            {
                DirectoryInfo di = new DirectoryInfo(MyPath);
                di.MoveTo(path2);
            }
            listView1.Items.Clear();
            bc.GetListViewItem(bc.Mpath(), imageList1, listView1);
        }
        catch { }
    }
}
partial class Form1
{
    /// <summary>
    /// 必需的设计器变量。
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Windows 窗体设计器生成的代码

    /// <summary>
    /// 设计器支持所需的方法 - 不要
    /// 使用代码编辑器修改此方法的内容。
    /// </summary>
    private void InitializeComponent()
    {
        this.components = new System.ComponentModel.Container();
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
        this.tabControl1 = new System.Windows.Forms.TabControl();
        this.tabPage1 = new System.Windows.Forms.TabPage();
        this.toolStrip3 = new System.Windows.Forms.ToolStrip();
        this.toolStripComboBox1 = new System.Windows.Forms.ToolStripComboBox();
        this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
        this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
        this.listView1 = new System.Windows.Forms.ListView();
        this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
        this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
        this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
        this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
        this.imageList1 = new System.Windows.Forms.ImageList(this.components);
        this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
        this.剪切ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.复制ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.粘贴ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
        this.全选ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.打开ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.重命名ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
        this.删除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.tabControl1.SuspendLayout();
        this.toolStrip3.SuspendLayout();
        this.contextMenuStrip1.SuspendLayout();
        this.SuspendLayout();
        // 
        // tabControl1
        // 
        this.tabControl1.Controls.Add(this.tabPage1);
        this.tabControl1.Dock = System.Windows.Forms.DockStyle.Top;
        this.tabControl1.HotTrack = true;
        this.tabControl1.Location = new System.Drawing.Point(0, 0);
        this.tabControl1.Multiline = true;
        this.tabControl1.Name = "tabControl1";
        this.tabControl1.SelectedIndex = 0;
        this.tabControl1.Size = new System.Drawing.Size(497, 24);
        this.tabControl1.TabIndex = 1;
        // 
        // tabPage1
        // 
        this.tabPage1.BackColor = System.Drawing.Color.White;
        this.tabPage1.Location = new System.Drawing.Point(4, 21);
        this.tabPage1.Name = "tabPage1";
        this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
        this.tabPage1.Size = new System.Drawing.Size(489, 0);
        this.tabPage1.TabIndex = 0;
        this.tabPage1.Text = "本地驱动器";
        this.tabPage1.UseVisualStyleBackColor = true;
        // 
        // toolStrip3
        // 
        this.toolStrip3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.toolStripComboBox1,
        this.toolStripSeparator4,
        this.toolStripButton2});
        this.toolStrip3.Location = new System.Drawing.Point(0, 24);
        this.toolStrip3.Name = "toolStrip3";
        this.toolStrip3.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
        this.toolStrip3.Size = new System.Drawing.Size(497, 25);
        this.toolStrip3.TabIndex = 2;
        this.toolStrip3.Text = "toolStrip3";
        // 
        // toolStripComboBox1
        // 
        this.toolStripComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
        this.toolStripComboBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
        this.toolStripComboBox1.Name = "toolStripComboBox1";
        this.toolStripComboBox1.Size = new System.Drawing.Size(121, 25);
        this.toolStripComboBox1.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBox1_SelectedIndexChanged);
        // 
        // toolStripSeparator4
        // 
        this.toolStripSeparator4.Name = "toolStripSeparator4";
        this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25);
        // 
        // toolStripButton2
        // 
        this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
        this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.toolStripButton2.Name = "toolStripButton2";
        this.toolStripButton2.Size = new System.Drawing.Size(23, 22);
        this.toolStripButton2.Text = "toolStripButton2";
        this.toolStripButton2.ToolTipText = "上级文件夹";
        this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
        // 
        // listView1
        // 
        this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
        this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
        this.columnHeader1,
        this.columnHeader2,
        this.columnHeader3,
        this.columnHeader4});
        this.listView1.ContextMenuStrip = this.contextMenuStrip1;
        this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.listView1.FullRowSelect = true;
        this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
        this.listView1.LabelEdit = true;
        this.listView1.Location = new System.Drawing.Point(0, 49);
        this.listView1.Name = "listView1";
        this.listView1.Size = new System.Drawing.Size(497, 252);
        this.listView1.SmallImageList = this.imageList1;
        this.listView1.TabIndex = 3;
        this.listView1.UseCompatibleStateImageBehavior = false;
        this.listView1.View = System.Windows.Forms.View.Details;
        this.listView1.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listView1_AfterLabelEdit);
        this.listView1.DoubleClick += new System.EventHandler(this.listView1_DoubleClick);
        // 
        // columnHeader1
        // 
        this.columnHeader1.Text = "名称";
        this.columnHeader1.Width = 200;
        // 
        // columnHeader2
        // 
        this.columnHeader2.Text = "大小";
        // 
        // columnHeader3
        // 
        this.columnHeader3.Text = "类型";
        this.columnHeader3.Width = 80;
        // 
        // columnHeader4
        // 
        this.columnHeader4.Text = "更改时间";
        this.columnHeader4.Width = 150;
        // 
        // imageList1
        // 
        this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
        this.imageList1.ImageSize = new System.Drawing.Size(20, 20);
        this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
        // 
        // contextMenuStrip1
        // 
        this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.剪切ToolStripMenuItem,
        this.复制ToolStripMenuItem,
        this.粘贴ToolStripMenuItem,
        this.toolStripSeparator6,
        this.全选ToolStripMenuItem,
        this.打开ToolStripMenuItem,
        this.重命名ToolStripMenuItem,
        this.toolStripSeparator7,
        this.删除ToolStripMenuItem,
        this.退出ToolStripMenuItem});
        this.contextMenuStrip1.Name = "contextMenuStrip1";
        this.contextMenuStrip1.Size = new System.Drawing.Size(107, 192);
        // 
        // 剪切ToolStripMenuItem
        // 
        this.剪切ToolStripMenuItem.Name = "剪切ToolStripMenuItem";
        this.剪切ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
        this.剪切ToolStripMenuItem.Text = "剪切";
        this.剪切ToolStripMenuItem.Click += new System.EventHandler(this.剪切ToolStripMenuItem_Click);
        // 
        // 复制ToolStripMenuItem
        // 
        this.复制ToolStripMenuItem.Name = "复制ToolStripMenuItem";
        this.复制ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
        this.复制ToolStripMenuItem.Text = "复制";
        this.复制ToolStripMenuItem.Click += new System.EventHandler(this.复制ToolStripMenuItem_Click);
        // 
        // 粘贴ToolStripMenuItem
        // 
        this.粘贴ToolStripMenuItem.Name = "粘贴ToolStripMenuItem";
        this.粘贴ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
        this.粘贴ToolStripMenuItem.Text = "粘贴";
        this.粘贴ToolStripMenuItem.Click += new System.EventHandler(this.粘贴ToolStripMenuItem_Click);
        // 
        // toolStripSeparator6
        // 
        this.toolStripSeparator6.Name = "toolStripSeparator6";
        this.toolStripSeparator6.Size = new System.Drawing.Size(149, 6);
        // 
        // 全选ToolStripMenuItem
        // 
        this.全选ToolStripMenuItem.Name = "全选ToolStripMenuItem";
        this.全选ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
        this.全选ToolStripMenuItem.Text = "全选";
        this.全选ToolStripMenuItem.Click += new System.EventHandler(this.全选ToolStripMenuItem_Click);
        // 
        // 打开ToolStripMenuItem
        // 
        this.打开ToolStripMenuItem.Name = "打开ToolStripMenuItem";
        this.打开ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
        this.打开ToolStripMenuItem.Text = "打开";
        this.打开ToolStripMenuItem.Click += new System.EventHandler(this.打开ToolStripMenuItem_Click);
        // 
        // 重命名ToolStripMenuItem
        // 
        this.重命名ToolStripMenuItem.Name = "重命名ToolStripMenuItem";
        this.重命名ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
        this.重命名ToolStripMenuItem.Text = "重命名";
        this.重命名ToolStripMenuItem.Click += new System.EventHandler(this.重命名ToolStripMenuItem_Click);
        // 
        // toolStripSeparator7
        // 
        this.toolStripSeparator7.Name = "toolStripSeparator7";
        this.toolStripSeparator7.Size = new System.Drawing.Size(149, 6);
        // 
        // 删除ToolStripMenuItem
        // 
        this.删除ToolStripMenuItem.Name = "删除ToolStripMenuItem";
        this.删除ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
        this.删除ToolStripMenuItem.Text = "删除";
        this.删除ToolStripMenuItem.Click += new System.EventHandler(this.删除ToolStripMenuItem_Click);
        // 
        // 退出ToolStripMenuItem
        // 
        this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
        this.退出ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
        this.退出ToolStripMenuItem.Text = "退出";
        this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click);
        // 
        // Form1
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(497, 301);
        this.Controls.Add(this.listView1);
        this.Controls.Add(this.toolStrip3);
        this.Controls.Add(this.tabControl1);
        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
        this.MaximizeBox = false;
        this.Name = "Form1";
        this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
        this.Text = "获取本地磁盘目录";
        this.Load += new System.EventHandler(this.Form1_Load);
        this.tabControl1.ResumeLayout(false);
        this.toolStrip3.ResumeLayout(false);
        this.toolStrip3.PerformLayout();
        this.contextMenuStrip1.ResumeLayout(false);
        this.ResumeLayout(false);
        this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.TabControl tabControl1;
    private System.Windows.Forms.TabPage tabPage1;
    private System.Windows.Forms.ToolStrip toolStrip3;
    private System.Windows.Forms.ToolStripComboBox toolStripComboBox1;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
    private System.Windows.Forms.ToolStripButton toolStripButton2;
    private System.Windows.Forms.ListView listView1;
    private System.Windows.Forms.ColumnHeader columnHeader1;
    private System.Windows.Forms.ColumnHeader columnHeader2;
    private System.Windows.Forms.ColumnHeader columnHeader3;
    private System.Windows.Forms.ColumnHeader columnHeader4;
    private System.Windows.Forms.ImageList imageList1;
    private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
    private System.Windows.Forms.ToolStripMenuItem 剪切ToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 复制ToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 粘贴ToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
    private System.Windows.Forms.ToolStripMenuItem 全选ToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 打开ToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 重命名ToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
    private System.Windows.Forms.ToolStripMenuItem 删除ToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 退出ToolStripMenuItem;
}

需要的再直接Call我,直接发。

👉其他

📢作者:小空和小芝中的小空
📢转载说明-务必注明来源:https://zhima.blog.csdn.net/
📢这位道友请留步☁️,我观你气度不凡,谈吐间隐隐有王者霸气💚,日后定有一番大作为📝!!!旁边有点赞👍收藏🌟今日传你,点了吧,未来你成功☀️,我分文不取,若不成功⚡️,也好回来找我。

温馨提示点击下方卡片获取更多意想不到的资源。
空名先生

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/111598.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

POMO: Policy Optimization with Multiple Optima for Reinforcement Learning学习笔记

文章目录摘要零、一些基础1.梯度近似2.策略梯度定理3.REINFORCE4.REINFORCE with Baseline5.REINFORCE Actor-Critic一、介绍二、相关工作&#xff08;1&#xff09;深度强化学习构建法&#xff08;2&#xff09;推理技术&#xff08;3&#xff09;深度强化学习改善法三、激励四…

制作 iOS 证书

准备工作 您需要 注册并加入 Apple Developer Program&#xff0c;才能在 App Store 上架应用。请准备一台 macOS 系统的电脑&#xff0c;用于证书制作。 创建 App ID 登录 Apple Developer&#xff0c;选择 Certificates, Identifiers & Profiles 选项。 选择 Identifi…

自学编程和计算机科班出身的差别在哪里

前不久逛知乎的时候看到一个问题&#xff1a;自学编程和计算机科班出身的差别在哪里&#xff1f; 自己回答了一下&#xff0c;获得了比较多的点赞和评论&#xff0c;在这里也分享给大家。 985 通信专业学长&#xff0c;转行程序员&#xff0c;聊一聊我的看法&#xff1a;说一千…

k8s之Job 与 CronJob

写在前面 语雀原文阅读效果更佳&#xff1a; 5、Job与CronJob 语雀 《5、Job与CronJob》 Job 与 CronJob 接下来给大家介绍另外一类资源对象&#xff1a;Job&#xff0c;我们在日常的工作中经常都会遇到一些需要进行批量数据处理和分析的需求&#xff0c;当然也会有按时间来…

RK3568平台开发系列讲解(工具命令篇)常用 GIT 命令汇总

🚀返回专栏总目录 文章目录 一、GIT BASICS二、GIT DIFF三、UNDOING CHANGES四、REWRITING GIT HISTORY五、GIT BRANCHES六、REMOTE REPOSITORIES七、GIT CONFIG八、GIT LOG九、GIT RESET十、GIT PULL十一、GIT PUSH沉淀、分享、成长,让自己和他人都能有所收获!😄 一、GI…

基于51单片机的酒精气体检测器设计

使用说明&#xff1a; 上电以后&#xff0c;需要预热一段时间&#xff0c;此时lcd显示Loading... &#xff08;预热过程为电压先上升后下降的改成&#xff0c;通过检测电压来检测是否预热完成&#xff09; &#xff0c; 预热完成后显示酒精浓度&#xff0c;按下按下按键key1即…

MySQL:互联网公司常用分库分表方案汇总

本文目录 一、数据库瓶颈 IO瓶颈 CPU瓶颈 二、分库分表 水平分库 水平分表 垂直分库 垂直分表 三、分库分表工具 四、分库分表步骤 五、分库分表问题 非partition key的查询问题 非partition key跨库跨表分页查询问题 扩容问题 六、分库分表总结 七、分库分表示例 …

因特网概述

目录1 网络、互连网&#xff08;互联网&#xff09;和因特网2 因特网发展的三个阶段3 因特网的标准化工作4 因特网的组成1 网络、互连网&#xff08;互联网&#xff09;和因特网 网络&#xff08;Network&#xff09;由若干结点&#xff08;Node&#xff09;和连接这些结点的链…

2022年山东省职业院校技能大赛高职组“网络系统管理”赛项规程

2022年山东省职业院校技能大赛高职组“网络系统管理”赛项规程一、赛项名称赛项名称&#xff1a;网络系统管理赛项组别&#xff1a;高职组赛项类别&#xff1a;电子与信息大类二、竞赛目的本赛项旨在借鉴世界技能大赛的办赛理念与技术规程&#xff0c;通过竞赛让参赛选手经历一…

论文导读 | 关于内存子图匹配算法的调研

前言 近年来&#xff0c;图数据结构在学术界和工业界的应用越来越广泛&#xff0c;包括社交网络分析、道路分析、化学分子合成、生物蛋白质网络分析、金融欺诈检测等等。子图匹配&#xff08;Subgraph Matching&#xff09;是图分析领域研究的一个重要课题&#xff0c;其旨在一…

批发进销存软件哪个好用?求测评

产品产量增加&#xff0c;在其他条件不变的情况下&#xff0c;就会形成规模效应&#xff0c;这样产品的生产成本就会降低。批发市场就可以对接大批量生产和出售单价更低的商品。而零售业往往也会采取批发货物的方式来降级成本。但是产品种类多&#xff0c;对于的供应商和客户也…

FactoryBean

FactoryBean ①简介 FactoryBean是Spring提供的一种整合第三方框架的常用机制。和普通的bean不同&#xff0c;配置一个FactoryBean类型的bean&#xff0c;在获取bean的时候得到的并不是class属性中配置的这个类的对象&#xff0c;而是getObject()方法的返回值。通过这种机制&…

网友:我30多岁了,现在转行学编程来得及吗?

这些年&#xff0c;互联网行业的变化发展很快&#xff0c;很多公司也是借助互联网发展的大趋势发展的非常好。 水涨船高&#xff0c;行业好&#xff0c;意味着互联网行业的从业者的工资也就跟着高&#xff0c;很多互联网行业刚入门的月薪基本都已经过万了&#xff0c;一些传统行…

Android设计模式详解之命令模式

前言 命令模式是行为型设计模式之一&#xff1b; 定义&#xff1a;将一个请求封装成一个对象&#xff0c;从而让用户使用不同的请求把客户端参数化&#xff1b;对请求排队或者记录日志&#xff0c;以及支持可撤销的操作&#xff1b; 使用场景&#xff1a; 需要抽象出待执行…

自动化测试高手-价值篇

自动化测试的最终交付价值是什么&#xff1a;自动化测试项目的最终交付价值是它产生的收益&#xff0c;也就是投入回报率比&#xff0c;ROI&#xff0c;一个成功的自动化测试项目必然是获得了高ROI的收益。 自动化测试高手就是要做出成功的自动化测试项目&#xff0c;不仅要写代…

linux命令date

linux命令date 文章目录linux命令date一、date二、使用&#xff08;一&#xff09;结合格式&#xff0c;格式输出数据&#xff08;二&#xff09;结合选项&#xff08;options&#xff09;一、date date命令可以获取到当前系统时间&#xff0c;主要是为了shell脚本的 date用法…

Html中锚点的使用

概述 URL是由多个部分组成。包括协议、主机&#xff08;域名&#xff09;、端口、路径、查询参数和锚点 https://www.example.com:80/path/to/myfile.html?key1value1&key2value2#anchor锚点&#xff08;anchor&#xff09;是网页内部的定位点&#xff0c;使用 # 加上锚…

3_Spring_IOC原理分析_重要

IOC底层原理 1 XML解析技术读取配置文件 <bean id"empDao" class"com.msb.dao.impl.EmpDaoImpl"></bean> 将上面的信息读取进入程序 对象的ID ,一个是对象的类的全路径名 2 反射技术实例化对象,放到容器中 获得类的字节码 Class clazz Clas…

论文导读 | GPU与LSM-tree的优化--以加速compaction和scan为例

GPU是一种新硬件&#xff0c;相比较于CPU&#xff0c;有较高的读写带宽和更强的并行能力&#xff0c;在很多领域都有非常好的应用。今天我们以LSM-tree上的compaction和scan为例&#xff0c;介绍GPU如何在加速数据库的操作中发挥作用。 一、GPU的发展历程 图1&#xff1a;GPU的…

基于uniapp+ssm+mysql一站式婚庆服务平台app设计

开发软件&#xff1a;Idea HBuilder mysql 开发技术&#xff1a; SSM Vue uniapp 用户功能&#xff1a; 注册登陆&#xff0c;填写基本的个人信息&#xff0c;就可以注册&#xff0c;注册完成后即可登陆 查看店铺&#xff0c;在首页有很多的店铺&#xff0c;有婚纱店&…