using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace WindowsFormsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } OpenFileDialog ofd = new OpenFileDialog(); FolderBrowserDialog fbd = new FolderBrowserDialog(); private void button1_Click(object sender, EventArgs e) { ofd.Multiselect = true; if (ofd.ShowDialog() == DialogResult.OK) { string[] fileNameAndPath = ofd.FileNames; string[] filename = ofd.SafeFileNames; for (int i = 0; i < ofd.SafeFileNames.Count(); i++) { listView1.Items.Add(filename[i] ); } } } private void button2_Click(object sender, EventArgs e) { if (fbd.ShowDialog() == DialogResult.OK) { string foldername = fbd.SelectedPath; foreach (string f in Directory.GetFiles(foldername)) listView1.Items.Add(Path.GetFileName((f))); } } private void button3_Click(object sender, EventArgs e) { listView1.Items.Clear(); } private void button4_Click(object sender, EventArgs e) { listView1.Items.Remove(listView1.SelectedItems[0]); } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { Application.Exit(); } private void infoToolStripMenuItem_Click(object sender, EventArgs e) { MessageBox.Show("lalala"); } private void button5_Click(object sender, EventArgs e) { for (int i = 0; i < System.Windows.Form.listView1; i++) { } } } }
System.IO.BinaryReader
System.IO.BinaryReader.BaseStream
System.IO.File.ReadAllBytes
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)