Form

 namespace FileProperties
{
public partial class Form1 : Form
{
private string currentFolderPath; public Form1()
{
InitializeComponent();
} protected void ClearAllFields()
{
listBoxFolders.Items.Clear();
listBoxFiles.Items.Clear();
textBoxFolder.Text = "";
textBoxFolder.Text = "";
textBoxFileName.Text = "";
textBoxCreationTime.Text = "";
textBoxLastAccessTime.Text = "";
textBoxLastWriteTime.Text = "";
textBoxFileSize.Text = "";
} protected void DisplayFileInfo(string fileFullName)
{
FileInfo theFile = new FileInfo(fileFullName);
if (!theFile.Exists)
throw new FileNotFoundException("File not found: " + fileFullName);
textBoxFileName.Text = theFile.Name;
textBoxCreationTime.Text = theFile.CreationTime.ToLongTimeString();
textBoxLastAccessTime.Text = theFile.LastAccessTime.ToLongDateString();
textBoxLastWriteTime.Text = theFile.LastWriteTime.ToLongDateString();
textBoxFileSize.Text = theFile.Length + " bytes"; // enable move, copy, delete buttons
textBoxNewPath.Text = theFile.FullName;
textBoxNewPath.Enabled = true;
buttonCopyTo.Enabled = true;
buttonDelete.Enabled = true;
buttonMoveTo.Enabled = true;
} protected void DisplayFolderList(string folderFullName)
{
DirectoryInfo theFolder = new DirectoryInfo(folderFullName);
if (!theFolder.Exists)
throw new DirectoryNotFoundException("Folder not found: "
+ folderFullName);
ClearAllFields();
DisableMoveFeatures();
textBoxFolder.Text = theFolder.FullName;
currentFolderPath = theFolder.FullName; // list all subfolders in folder foreach (DirectoryInfo nextFolder in theFolder.GetDirectories())
listBoxFolders.Items.Add(nextFolder.Name); // list all files in folder foreach (FileInfo nextFile in theFolder.GetFiles())
listBoxFiles.Items.Add(nextFile.Name);
} protected void OnDisplayButtonClick(object sender, EventArgs e)
{
try
{
string folderPath = textBoxInput.Text;
DirectoryInfo theFolder = new DirectoryInfo(folderPath);
if (theFolder.Exists)
{
DisplayFolderList(theFolder.FullName);
return;
}
FileInfo theFile = new FileInfo(folderPath);
if (theFile.Exists)
{
DisplayFolderList(theFile.Directory.FullName);
int index = listBoxFiles.Items.IndexOf(theFile.Name);
listBoxFiles.SetSelected(index, true);
return;
}
throw new FileNotFoundException("There is no file or folder with "
+ "this name: " + textBoxInput.Text);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
} void DisableMoveFeatures()
{
textBoxNewPath.Text = "";
textBoxNewPath.Enabled = false;
buttonCopyTo.Enabled = false;
buttonDelete.Enabled = false;
buttonMoveTo.Enabled = false;
} protected void OnListBoxFilesSelected(object sender, EventArgs e)
{
try
{
string selectedString = listBoxFiles.SelectedItem.ToString();
string fullFileName = Path.Combine(currentFolderPath, selectedString);
DisplayFileInfo(fullFileName);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
} protected void OnListBoxFoldersSelected(object sender, EventArgs e)
{
try
{
string selectedString = listBoxFolders.SelectedItem.ToString();
string fullPathName = Path.Combine(currentFolderPath, selectedString);
DisplayFolderList(fullPathName);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
} protected void OnUpButtonClick(object sender, EventArgs e)
{
try
{
string folderPath = new FileInfo(currentFolderPath).DirectoryName;
DisplayFolderList(folderPath);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
} protected void OnDeleteButtonClick(object sender, EventArgs e)
{
try
{
string filePath = Path.Combine(currentFolderPath,
textBoxFileName.Text);
string query = "Really delete the file\n" + filePath + "?";
if (MessageBox.Show(query,
"Delete File?", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
File.Delete(filePath);
DisplayFolderList(currentFolderPath);
}
}
catch (Exception ex)
{
MessageBox.Show("Unable to delete file. The following exception"
+ " occurred:\n" + ex.Message, "Failed");
}
} protected void OnMoveButtonClick(object sender, EventArgs e)
{
try
{
string filePath = Path.Combine(currentFolderPath,
textBoxFileName.Text);
string query = "Really move the file\n" + filePath + "\nto "
+ textBoxNewPath.Text + "?";
if (MessageBox.Show(query,
"Move File?", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
File.Move(filePath, textBoxNewPath.Text);
DisplayFolderList(currentFolderPath);
}
}
catch (Exception ex)
{
MessageBox.Show("Unable to move file. The following exception"
+ " occurred:\n" + ex.Message, "Failed");
}
}
protected void OnCopyButtonClick(object sender, EventArgs e)
{
try
{
string filePath = Path.Combine(currentFolderPath,
textBoxFileName.Text);
string query = "Really copy the file\n" + filePath + "\nto "
+ textBoxNewPath.Text + "?";
if (MessageBox.Show(query,
"Copy File?", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
File.Copy(filePath, textBoxNewPath.Text);
DisplayFolderList(currentFolderPath);
}
}
catch (Exception ex)
{
MessageBox.Show("Unable to copy file. The following exception"
+ " occurred:\n" + ex.Message, "Failed");
}
}
}
}

Designer

 namespace FileProperties
{ partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null; /// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
} #region Windows Form Designer generated code /// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.label14 = new System.Windows.Forms.Label();
this.textBoxNewPath = new System.Windows.Forms.TextBox();
this.buttonDelete = new System.Windows.Forms.Button();
this.buttonCopyTo = new System.Windows.Forms.Button();
this.buttonMoveTo = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.textBoxLastAccessTime = new System.Windows.Forms.TextBox();
this.textBoxLastWriteTime = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.textBoxCreationTime = new System.Windows.Forms.TextBox();
this.textBoxFileSize = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.buttonDisplay = new System.Windows.Forms.Button();
this.textBoxFolder = new System.Windows.Forms.TextBox();
this.buttonUp = new System.Windows.Forms.Button();
this.textBoxInput = new System.Windows.Forms.TextBox();
this.textBoxFileName = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.listBoxFiles = new System.Windows.Forms.ListBox();
this.listBoxFolders = new System.Windows.Forms.ListBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox5.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox5
//
this.groupBox5.Controls.Add(this.label14);
this.groupBox5.Controls.Add(this.textBoxNewPath);
this.groupBox5.Controls.Add(this.buttonDelete);
this.groupBox5.Controls.Add(this.buttonCopyTo);
this.groupBox5.Controls.Add(this.buttonMoveTo);
this.groupBox5.Location = new System.Drawing.Point(, );
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(, );
this.groupBox5.TabIndex = ;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Move, Delete or Copy File";
//
// label14
//
this.label14.Location = new System.Drawing.Point(, );
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(, );
this.label14.TabIndex = ;
this.label14.Text = "New Location";
//
// textBoxNewPath
//
this.textBoxNewPath.Location = new System.Drawing.Point(, );
this.textBoxNewPath.Name = "textBoxNewPath";
this.textBoxNewPath.Size = new System.Drawing.Size(, );
this.textBoxNewPath.TabIndex = ;
//
// buttonDelete
//
this.buttonDelete.Location = new System.Drawing.Point(, );
this.buttonDelete.Name = "buttonDelete";
this.buttonDelete.Size = new System.Drawing.Size(, );
this.buttonDelete.TabIndex = ;
this.buttonDelete.Text = "Delete";
this.buttonDelete.Click += new System.EventHandler(this.OnDeleteButtonClick);
//
// buttonCopyTo
//
this.buttonCopyTo.Location = new System.Drawing.Point(, );
this.buttonCopyTo.Name = "buttonCopyTo";
this.buttonCopyTo.Size = new System.Drawing.Size(, );
this.buttonCopyTo.TabIndex = ;
this.buttonCopyTo.Text = "Copy To";
this.buttonCopyTo.Click += new System.EventHandler(this.OnCopyButtonClick);
//
// buttonMoveTo
//
this.buttonMoveTo.Location = new System.Drawing.Point(, );
this.buttonMoveTo.Name = "buttonMoveTo";
this.buttonMoveTo.Size = new System.Drawing.Size(, );
this.buttonMoveTo.TabIndex = ;
this.buttonMoveTo.Text = "Move To";
this.buttonMoveTo.Click += new System.EventHandler(this.OnMoveButtonClick);
//
// label3
//
this.label3.Location = new System.Drawing.Point(, );
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(, );
this.label3.TabIndex = ;
this.label3.Text = "Creation time";
//
// textBoxLastAccessTime
//
this.textBoxLastAccessTime.Enabled = false;
this.textBoxLastAccessTime.Location = new System.Drawing.Point(, );
this.textBoxLastAccessTime.Name = "textBoxLastAccessTime";
this.textBoxLastAccessTime.Size = new System.Drawing.Size(, );
this.textBoxLastAccessTime.TabIndex = ;
//
// textBoxLastWriteTime
//
this.textBoxLastWriteTime.Enabled = false;
this.textBoxLastWriteTime.Location = new System.Drawing.Point(, );
this.textBoxLastWriteTime.Name = "textBoxLastWriteTime";
this.textBoxLastWriteTime.Size = new System.Drawing.Size(, );
this.textBoxLastWriteTime.TabIndex = ;
//
// label6
//
this.label6.Location = new System.Drawing.Point(, );
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(, );
this.label6.TabIndex = ;
this.label6.Text = "Last modification time";
//
// label1
//
this.label1.Location = new System.Drawing.Point(, );
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(, );
this.label1.TabIndex = ;
this.label1.Text = "Enter name of folder to be examined and click Display";
//
// label5
//
this.label5.Location = new System.Drawing.Point(, );
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(, );
this.label5.TabIndex = ;
this.label5.Text = "Last access time";
//
// textBoxCreationTime
//
this.textBoxCreationTime.Enabled = false;
this.textBoxCreationTime.Location = new System.Drawing.Point(, );
this.textBoxCreationTime.Name = "textBoxCreationTime";
this.textBoxCreationTime.Size = new System.Drawing.Size(, );
this.textBoxCreationTime.TabIndex = ;
//
// textBoxFileSize
//
this.textBoxFileSize.Enabled = false;
this.textBoxFileSize.Location = new System.Drawing.Point(, );
this.textBoxFileSize.Name = "textBoxFileSize";
this.textBoxFileSize.Size = new System.Drawing.Size(, );
this.textBoxFileSize.TabIndex = ;
//
// label7
//
this.label7.Location = new System.Drawing.Point(, );
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(, );
this.label7.TabIndex = ;
this.label7.Text = "File Size";
//
// label8
//
this.label8.Location = new System.Drawing.Point(, );
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(, );
this.label8.TabIndex = ;
this.label8.Text = "Folders";
//
// label2
//
this.label2.Location = new System.Drawing.Point(, );
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(, );
this.label2.TabIndex = ;
this.label2.Text = "Files";
//
// label4
//
this.label4.Location = new System.Drawing.Point(, );
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(, );
this.label4.TabIndex = ;
this.label4.Text = "File name";
//
// buttonDisplay
//
this.buttonDisplay.Location = new System.Drawing.Point(, );
this.buttonDisplay.Name = "buttonDisplay";
this.buttonDisplay.Size = new System.Drawing.Size(, );
this.buttonDisplay.TabIndex = ;
this.buttonDisplay.Text = "Display";
this.buttonDisplay.Click += new System.EventHandler(this.OnDisplayButtonClick);
//
// textBoxFolder
//
this.textBoxFolder.Enabled = false;
this.textBoxFolder.Location = new System.Drawing.Point(, );
this.textBoxFolder.Name = "textBoxFolder";
this.textBoxFolder.Size = new System.Drawing.Size(, );
this.textBoxFolder.TabIndex = ;
//
// buttonUp
//
this.buttonUp.Location = new System.Drawing.Point(, );
this.buttonUp.Name = "buttonUp";
this.buttonUp.Size = new System.Drawing.Size(, );
this.buttonUp.TabIndex = ;
this.buttonUp.Text = "Up";
this.buttonUp.Click += new System.EventHandler(this.OnUpButtonClick);
//
// textBoxInput
//
this.textBoxInput.Location = new System.Drawing.Point(, );
this.textBoxInput.Name = "textBoxInput";
this.textBoxInput.Size = new System.Drawing.Size(, );
this.textBoxInput.TabIndex = ;
//
// textBoxFileName
//
this.textBoxFileName.Enabled = false;
this.textBoxFileName.Location = new System.Drawing.Point(, );
this.textBoxFileName.Name = "textBoxFileName";
this.textBoxFileName.Size = new System.Drawing.Size(, );
this.textBoxFileName.TabIndex = ;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.textBoxLastAccessTime);
this.groupBox2.Controls.Add(this.textBoxCreationTime);
this.groupBox2.Controls.Add(this.textBoxLastWriteTime);
this.groupBox2.Location = new System.Drawing.Point(, );
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(, );
this.groupBox2.TabIndex = ;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Details of Selected File";
//
// listBoxFiles
//
this.listBoxFiles.Location = new System.Drawing.Point(, );
this.listBoxFiles.Name = "listBoxFiles";
this.listBoxFiles.Size = new System.Drawing.Size(, );
this.listBoxFiles.TabIndex = ;
this.listBoxFiles.SelectedIndexChanged += new System.EventHandler(this.OnListBoxFilesSelected);
//
// listBoxFolders
//
this.listBoxFolders.Location = new System.Drawing.Point(, );
this.listBoxFolders.Name = "listBoxFolders";
this.listBoxFolders.Size = new System.Drawing.Size(, );
this.listBoxFolders.TabIndex = ;
this.listBoxFolders.SelectedIndexChanged += new System.EventHandler(this.OnListBoxFoldersSelected);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.groupBox5);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.textBoxFileSize);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.textBoxFileName);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.textBoxFolder);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Location = new System.Drawing.Point(, );
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(, );
this.groupBox1.TabIndex = ;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Contents of folder";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(, );
this.Controls.Add(this.label1);
this.Controls.Add(this.label8);
this.Controls.Add(this.label2);
this.Controls.Add(this.buttonDisplay);
this.Controls.Add(this.buttonUp);
this.Controls.Add(this.textBoxInput);
this.Controls.Add(this.listBoxFiles);
this.Controls.Add(this.listBoxFolders);
this.Controls.Add(this.groupBox1);
this.Name = "Form1";
this.Text = "FilePropertiesAndMovement Sample";
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout(); } #endregion private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox textBoxNewPath;
private System.Windows.Forms.Button buttonDelete;
private System.Windows.Forms.Button buttonCopyTo;
private System.Windows.Forms.Button buttonMoveTo;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBoxLastAccessTime;
private System.Windows.Forms.TextBox textBoxLastWriteTime;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textBoxCreationTime;
private System.Windows.Forms.TextBox textBoxFileSize;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button buttonDisplay;
private System.Windows.Forms.TextBox textBoxFolder;
private System.Windows.Forms.Button buttonUp;
private System.Windows.Forms.TextBox textBoxInput;
private System.Windows.Forms.TextBox textBoxFileName;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ListBox listBoxFiles;
private System.Windows.Forms.ListBox listBoxFolders;
private System.Windows.Forms.GroupBox groupBox1; }
}

C# 操作文件夹、文件的更多相关文章

  1. python 遍历文件夹 文件

    python 遍历文件夹 文件   import os import os.path rootdir = "d:\data" # 指明被遍历的文件夹 for parent,dirn ...

  2. android多国语言文件夹文件汇总

    android多国语言文件夹文件汇总如下: 中文(中国):values-zh-rCN 中文(台湾):values-zh-rTW 中文(香港):values-zh-rHK 英语(美国):values-e ...

  3. java基础IO删除文件夹文件

    /** * 定义一个方法,能够删除任意文件夹,文件夹路径由键盘录入 注意:不要在C盘下做测试,请选定无用的文件夹测试! */ 1.键盘录入 private static File getfile() ...

  4. PHP文件夹文件拷贝/复制函数 dir_copy($src = '', $dst = '')

    /* * 文件夹文件拷贝 * * @param string $src 来源文件夹 * @param string $dst 目的地文件夹 * @return bool */ function dir ...

  5. java实现基于关键字的文件夹(文件)的搜索、文件夹(文件)的复制、删除

    最近在做一个项目,需要实现这几项功能,上网查了很多资料,自己研究了好几天终于实现了,现在与大家分享一下. 一.JAVA实现文件夹的搜索   在百度搜索N个技术文章,从哪些大牛们共享的资料中终于写出了我 ...

  6. JavaSE 文件递归之删除&amp;获取文件夹文件夹中全部的以.jpg的文件的绝对路径

    1.递归删除文件 假设一个文件夹以下还有子文件夹,进行删除的话会 报错,这个时候要使用递归的方式来删除这个文件文件夹中的全部文件以及文件夹 package cn.itcast.digui; impor ...

  7. Shell脚本递归打印指定文件夹中全部文件夹文件

    #!/bin/bash #递归打印当前文件夹下的全部文件夹文件. PRINTF() { ls $1 | while read line #一次读取每一行放到line变量中 do [ -d $1/$li ...

  8. C#获取文件夹/文件的大小以及占用空间 转摘自:http://www.cnblogs.com/chenpeng-dota/articles/2176470.html

    C#获取文件夹/文件的大小以及占用空间 今天,头给了个任务:写个方法,我会给你个路径,计算这个路径所占用的磁盘空间 . 然后,找了很多资料.但大部分都是获取文件夹/文件的大小的.对于占用空间的没有成品 ...

  9. C# 压缩 解压 复制文件夹,文件的操作

    命名空间:namespace System.IO.Compression 压缩: //目标文件夹 string fileDirPath = "/Downloads/试题" + us ...

  10. 文件夹文件遍历并插入数据库的操作,IO Directory File的递归操作

    在我们管理内容管理系统时,数据量大时,对机器的依赖性就比较强了,比如,我要将一个文件夹中的很多图片上传到网站,一个个上传会很花时间,就想到了通过遍历文件夹得到文件名,并将路径与文件保存到数据库中对应的 ...

随机推荐

  1. win10系统不能ping通vmware虚假机解决办法

    在使用vmware安装虚拟机后,在虚拟机里面可以上网,但就是不能在宿主机通过远程连接工具连接 同时也不能ping通虚拟机 检查网络配置 查看网关 在宿主机打开 ip地址填写刚刚查看的网关,同时把子网掩 ...

  2. [转帖]Linux 中的零拷贝技术,第 2 部分

    Linux 中的零拷贝技术,第 2 部分 https://www.ibm.com/developerworks/cn/linux/l-cn-zerocopy2/index.html   Linux 中 ...

  3. centos 7.2安装git2.x版本

    前言 今天在我的centos7.2开发环境安装git2.x时候遇到了各种问题,还好一一解决,为方便大家,这里列出遇到的问题和解决办法,yum默认安装的git1.8版本的,公司git服务器在window ...

  4. python 手机App数据抓取实战一

    前言 当前手机使用成为互联网主流,每天手机App产生大量数据,学习爬虫的人也不能只会爬取网页数据,我们需要学习如何从手机 APP 中获取数据,本文就以豆果美食为例,讲诉爬取手机App的流程 环境准备 ...

  5. C++中的swap(交换函数)

    交换两个变量的值很简单. 比如 int a = 1; b = 2; 交换a b的值 这个很简单 很容易想到的是找个中间变量比如  int temp  = a; a = b; b = temp; 不需要 ...

  6. BM算法解析(计算机算法-设计与分析导论(第三版))

    转载请声明

  7. 为什么用JS取不到cookie的值?解决方法如下!

    注意:cookie是基于域名来储存的.要放到测试服务器上或者本地localhost服务器上才会生效.cookie具有不同域名下储存不可共享的特性.单纯的本地一个html页面打开是无效的. 明明在浏览中 ...

  8. Abandoning Roads CodeForces - 1149D (最小生成树)

    大意: 给定无向图, 边权只有两种, 对于每个点$x$, 输出所有最小生成树中, 点$1$到$x$的最短距离. 先将边权为$a$的边合并, 考虑添加边权为$b$的边. 每条路径只能经过每个连通块一次, ...

  9. javaweb常识

    Tomcat下载地址www.apache.org 在电脑中查看java版本:cmd中输入java -version tomcat解压后目录 bin:放可执行文件(如startup.bat   shut ...

  10. JavaScript引入

    三种引入方式 js标签引入的三种方式 1.行间式 写在标签的事件属性中 <div onclick="alert('hello')"></div>(点击出弹窗 ...